In case of ejection, the occupant shall be entitled to enter upon the land, and gather and remove all crops sown thereon prior to entry of judgment.