In case adjoining owners or occupants of land shall use the same for pasturing sheep or swine, each shall keep that one’s share of the partition fence in such condition as shall restrain such sheep or swine.