Every contract shall do both of the following:
(a)
Provide for the exclusion of uses other than agricultural, and other than those compatible with agricultural uses, for the duration of the contract.
(b)
Be binding upon, and inure to the benefit of, all successors in interest of the owner. Whenever land under a contract is divided, the owner of any parcel may exercise, independent of any other owner of a portion of the divided land, any of the rights of the owner in the original contract, including the right to give notice of nonrenewal and to petition for cancellation. The effect of any such action by the owner of a parcel created by the division of land under contract shall not be imputed to the owners of the remaining parcels and shall have no effect on the contract as it applies to the remaining parcels of the divided land. Except as provided in Section 51243.5, on and after the effective date of the annexation by a city of any land under contract with a county, the city shall succeed to all rights, duties, and powers of the county under the contract.