[PATCH 0 of 6] improve help and hints, then add 'update --bookmark'

Kevin Bullock kbullock+mercurial at ringworld.org
Wed Dec 7 11:40:52 CST 2011


The first two patches fix up some of the checking that merge does, and makes
its abort messages more consistent.

The third patch improves wording of bookmarks help.

The remaining three add a -B/--bookmark switch to the update command, to
provide a way to move the active bookmark forward along with the working
directory. This provides an equivalent to Git's concept of "fast-forward
merge", and is useful for those who use bookmarks for lightweight feature
branches.

The -B switch is only necessary when you have an active bookmark that is not
at a branch tip. This can happen for example when you pull changes and either
(1) your bookmark is only local; or (2) the pull doesn't move the bookmark,
possibly because a different bookmark is tracking the upstream changes.

Note that if a pull updates a _shared_ bookmark (something not possible in Git
because of the way it namespaces "branches"), then using 'update -B' is not
necessary. In this case, the pull tells the user that the bookmark was
updated. The last patch in the series adds a hint to merge to use 'hg update
MARK' to make the 'current' bookmark active again (i.e., update the working
directory to the new location of the bookmark), for those users whose brains
have been thoroughly broken by Git's branching model.

I expect this new switch to be controversial. :) Some of the discussion about
how to handle this case is recorded at <http://titanpad.com/hg-bookmarks>.


More information about the Mercurial-devel mailing list