An action may be brought by any person against another who claims an estate or interest in real property adverse to him for the purpose of determining such adverse claims; and by any man or woman against his or her wife or husband or alleged wife or husband who have not lived together as man and wife within the two years preceding, and who at the death of such plaintiff might have or claim to have an interest in his or her estate, and a decree for the plaintiff shall debar all claims of the defendant in the property of the plaintiff then owned or afterwards acquired: Provided, that no such relief shall be granted against such husband or wife or alleged wife or husband, except in case the summons in said action is personally served on such defendant.
If the defendant in such action disclaim in his answer any interest or estate in the property, or suffer judgment to be taken against him without answer, the plaintiff cannot recover costs. In any case in which judgment has been or shall be docketed, whether such judgment is in favor of or against the person bringing such action, or is claimed by him, or affects real estate claimed by him, or whether such judgment is in favor of or against the person against whom such action may be brought, or is claimed by him, or affects real estate claimed by him, the lien of said judgment shall be such claim of an estate or interest in real estate as is contemplated by this section. (1893, c. 6; 1903, c. 763; Rev., s. 1589; 1907, c. 888; C.S., s. 1743.)