Bookmarks with hg update question
Jensen, Aaron
ajensen at webmd.net
Tue Jun 28 19:10:37 UTC 2016
> Here is a test case where the bookmark does not jump to some unrelated branch when I execute ‘hg update’
You're correct that hg update doesn't take you to another branch. Unfortunately, that's not the problem. The problem is when the bookmark you're working on is on the same branch as your stable code base, which is illustrated by your final example.
When I create a branch, Mercurial tells me:
> hg branch feature_a
marked working directory as branch feature_a
(branches are permanent and global, did you want a bookmark?)
This implies that branches and bookmarks are equivalent, except that bookmarks aren't permanent. But, this auto-movement of the bookmark to the tip of the branch the bookmark is on breaks that equivalency. It doesn't switch my actual, physical Mercurial branch, but it does switch my logical, functional branch.
I think the problem is we're seeing bookmarks as two different things. I see them, and Mercurial itself tells me, that they are equivalent to branches. I think you see them as a non-global, personal, never-shared branch. In that case, it kind of makes sense that the bookmark would move. But I have to squint really hard and that hurts my eyes. (Don't current versions of Mercurial also push bookmarks by default so they are global?) Even if they are non-global, personal, no-one-will-ever see them, I would prefer to move them myself, by merging the tip of the current branch into my bookmark.
I want bookmarks to behave just like branches, except for not being permanent. Every feature we develop currently requires a permanent branch. Everytime we push, Mercurial sends every single head to the server. We have so many branches on occasion we actually exceed the HTTP maximum header size. We've had to create a daily job to close and merge the heads of dead branches so we don't encounter this problem. Bookmarks, if they really behaved like branches and also weren't permanent would solve this problem.
More information about the Mercurial
mailing list