terminology confusion: bookmark vs named head

Stephen Lee sphen.lee at gmail.com
Mon Dec 16 18:20:40 CST 2013


On Mon, Dec 16, 2013 at 8:28 PM, Martin Geisler <martin at geisler.net> wrote:
> anatoly techtonik <techtonik at gmail.com> writes:
>
>>  On Mon, Dec 16, 2013 at 4:54 AM, Stephen Lee <sphen.lee at gmail.com> wrote:
>>
>>> The only command that causes bookmark confusion for me is a bare (no
>>> arguments) "hg up" which moves the active bookmark to the head you
>>> are updating to. This has been a point of discussion in the past, but
>>> no conclusions were made.
>>
>> Even "hg push/pull" still doesn't look great for my original purpose
>> for bookmarks and "hg up" as you describe is really awful, but I guess
>> it at least doesn't move bookmarks between named branches?
>
> Only because 'hg up' itself doesn't move between named branches. It's
> important to understand that the behavior of bookmarks is bolted onto
> the existing behavior of Mercurial -- for better and for worse.
>
> I've had great trouble with the distinction between 'hg up' and 'hg up
> default' introduced by bookmarks. I'm only very rarely using 'hg up'
> without giving it an explicit revision. My thinking is something like
> this: why would I want to update without telling update where to go to?
> After a pull, I look at the graph and decide where to go. This meant
> that I again and again "lost" (deactivated and left behind) my active
> bookmark. That is probably a problem with my workflow and maybe
> bookmarks work fine if you've been used to them from the beginning.
>

It's not a problem with your workflow Martin - we have been having
this problem too. :(

In an all bookmarks workflow, "hg up" aborts with "all heads are
bookmarked" so you always have to name the head, and the move
behaviour never triggers.
This means a linear merge ('fast-forward merge' from Git) needs to be
done as two steps "hg up x; hg book y" which is less than ideal.

As you said: bookmark behaviour is bolted onto normal Mercurial
behaviour. Mercurial does not distinguish the "checkout" usage of "hg
up" from it's linear merge usage and hence bookmarks cannot either.

Steve


More information about the Mercurial-devel mailing list