all hands on deck , became a familiar cry and men in foul weather capes clawed their way into the tops to get the sail off her before the ship went over on her beam ends or the canvas was thrashed to ribbons .