terminology confusion: bookmark vs named head

Sean Farley sean.michael.farley at gmail.com
Wed Dec 18 21:39:55 CST 2013


sphen.lee at gmail.com writes:

> On Thu, Dec 19, 2013 at 12:29 PM, Matt Mackall <mpm at selenic.com> wrote:
>> On Thu, 2013-12-19 at 12:00 +1100, Stephen Lee wrote:
>>> > The former tries to figure out if there's an unambiguous place to move
>>> > forward to and then goes to it, moving any current bookmark.
>>
>>> What I am looking for is an alternate spelling to get the first
>>> behaviour when the place to move to *is* ambiguous and I need to
>>> specify it.
>>
>> Suggest any spelling that is doesn't start with 'm' and end with 'erge'
>> and we'll have a starting point.
>>
>
> Thanks Matt.  During the last round of discussion on this topic we
> came the conclusion that merge should always result in the wc having 2
> parents. Thus it was ruled out as a possibility.
>
> Would it be possible/logical for a bare update to select @ as the
> implicit target if:
>  1) All heads are bookmarked
>  2) The @ bookmark exists, and no divergent copies exist
>  3) @ is a descendant of . (dot)

At the 2.9 sprint we talked a little about order of precedence for a
bare update. While it wouldn't solve everything, it would be a smaller
chunk to bite off (it's on my to-do but haven't gotten to it yet):

   - X (FOO at divergent)
 /
A -- Y
 \
   - Z (BAR)

where Z has active bookmark FOO. Then the order of precedence could be:

1) Choose X first since it has the active bookmarks divergence and is a
descendant of A

2) Choose Y second since it is anonymous

3) Never(?) choose Z since that would potentially conflate two branches
of work (you would update to BAR via 'hg up BAR' and manually move FOO
via 'hg book FOO')

A wiki should probably be started on this, or maybe added to http://mercurial.selenic.com/wiki/MultipleHeads


More information about the Mercurial-devel mailing list