Some thoughts about Mercurial bookmarks

Jensen, Aaron ajensen at webmd.net
Tue May 12 17:33:34 UTC 2015


> 2. Calling hg update moves the bookmark automatically
> 
> This issue bugs me because I didn't expect that hg update would move a
> bookmark. I think it's rather confusing because some poeple like to track
> changes periodically by doing hg pull && hg update. If no argument is 
> specified you may move the bookmark by mistake.
> 
> It's even more unsafe when you use the special @ bookmark that is a bit 
> similar to Git's master branch. Someone may move the "stable" @ 
> bookmark to the most recent feature bookmark which are still 
> experimental code.

+1 

I couldn't agree more. This is the only reason we don't recommend widespread use of bookmarks. I'm quite flabbergasted at this design choice. Branches don't behave this way: when I pull and update and my working directory is on a branch, I stay on that branch. If bookmarks are supposed to be lightweight branches, when I pull and update, I should stay on my bookmark, not move my bookmark off to some other most-likely-unrelated revision.

I would *love* to see this behavior change so that when you're on a bookmark and you pull and update, you stay on your bookmark.


More information about the Mercurial mailing list