Every owner or lessee of a tract of land abutting upon any railroad or railway, or through which any railroad or railway has been or may be constructed, who has built a hog-tight fence along all sides of such land, except the side abutting against the railroad right of way, may demand of the owners or operators of such railroad or railway that the right of way adjacent to such tract of land be enclosed with a hog-tight fence. Upon such demand, such owners or operators shall erect the hog-tight fence and maintain the same in good repair so long as the owner of such tract of land shall continue to maintain a hog-tight fence around the other sides of the enclosure.