I actually answered a very similar question awhile back: https://www.reddit.com/r/AskHistorians/comments/2a5eif/in_les_miserables_they_showed_a_whole_bunch_of/cisjocg
The tl;dr: no, it is not close at all to how ships were brought into drydock. You wouldn't do that in a storm, the guys at the bottom of the dock would literally be underwater (how else would the ship float into it) and you'd certainly cut off that unruly top-hamper and rigging dragging in the water before attempting it.