If the lessor transfers the property leased, or any part thereof, or any part of his interest therein, the transferee, in the absence of a contract to the contrary, shall possess all the rights, and, if the lessee so elects, be subject to all the liabilities of the lessor as to the property or part transferred so long as he is the owner of it; ...