When a petition shall be filed for the satisfaction of a mortgage, the court shall have the power only to decree and compel the delivery of the possession of the premises to the purchaser thereof.