[PATCH] bookmarks: resolve divergent bookmark when moving forward

Sean Farley sean.michael.farley at gmail.com
Wed Mar 27 22:38:41 CDT 2013


Stephen Lee writes:

> On Thu, Mar 28, 2013 at 9:41 AM, Sean Farley
> <sean.michael.farley at gmail.com> wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley at gmail.com>
>> # Date 1364421288 18000
>> #      Wed Mar 27 16:54:48 2013 -0500
>> # Node ID 3839baf52f2f24c289487111a95e9e835d1e1c4d
>> # Parent  a7d0ddc7540b2691f8a5af8006588a80e582754a
>> bookmarks: resolve divergent bookmark when moving forward
>>
>> This patch handles both cases of moving a bookmark forward 1) when running 'hg
>> up' on a bookmark that has descendents, and 2) when running 'hg book NAME' on a
>> descendents of a the active bookmark.
>>
>
> What do you mean by "handling" these cases? What happens before and
> after this patch?

Sorry; I meant to flag this as RFC so I could get some
feedback. Anyways, before this patch when there was a divergent
bookmark on a target changeset that you're moving a bookmark to, then
both bookmarks would be there. Example,

$ hg init test && cd test
$ echo a>a
$ hg ci -Am0
$ echo b>>a
$ hg ci -m1
$ hg book -r 0 @
$ hg book -r 1 @default
$ hg up @
$ hg up

You'll see that the divergent is still lying around when it should be
taken care of automatically. Applying this patch will fix that up but I
wanted to make sure other behavior wasn't affected.

> I'm interested in making the bookmark workflow smoother - in what way
> does this help?

Me too :-) This helps by resolving divergent bookmarks when the
resolution is trivial.


More information about the Mercurial-devel mailing list