Is it possible to move a bookmark from one head to another without committing any file changes? I’ve tried:
hg update <destination-head>
hg bookmark bookmark-to-move -f
hg commit
But Mercurial complains nothing changed and when I try to hg push -f I get no changes found. Any ideas?
You need to use the
-Bflag tohg pushin order to make it move the bookmark.If a bookmark is already exported (present in both source and destination), then a simple
hg pushwill move the bookmark forward in the destination. In your case, the local bookmark is not a descendant of the remote bookmark, and sohg pushalone will no move it.Using
will work and move the remote bookmark as you want.