[PATCH 4 of 6 V2] merge: include obsolete calculation for branchtips

Sean Farley sean.michael.farley at gmail.com
Mon Jan 13 11:14:21 CST 2014


pierre-yves.david at ens-lyon.org writes:

> On 01/12/2014 02:25 PM, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley at gmail.com>
>> # Date 1383779296 21600
>> #      Wed Nov 06 17:08:16 2013 -0600
>> # Node ID b97f7e3553f1694abd360e30c0e4a9eac59f393a
>> # Parent  460212c85977dbeec5007558fa26293a4a0d11f4
>> merge: include obsolete calculation for branchtips
>>
>> Previously, a bare update would ignore any successor changesets thus
>> potentially leaving you on an obsolete head. This happens commonly when there
>> is an old bookmark that hasn't been moved forward which is the motivating
>> reason for this patch series.
>>
>> Now, we will check for successor changesets if two conditions hold:
>>    1) we are doing a bare update
>>    2) *and* the branchtip returned normally is obsolete
>
> This is a slghlty different version of what we discussed in New-York.
>
> 2) should be "if current working directory parent is a head and obsolete"

Hmm, then I was probably confused.

> If update can move up along standard topology it should alway just do it.

Then should a bare update from an obsolete head go to the tip of just the
successors or the branchtip of the foreground set?

>> If we are in this situation, then we calculate the branchtip of the successor
>> set and update to that changeset.
>>
>> In addition, we also preserves the no-op update clause added by Siddharth
>> Agarwal in ab2362e1672e by checking that the successor set is not the same as
>> set(p1).
>>
>> Tests will be updated in the next patch because it requires a non-obvious fix
>> to the test case.
>>
>> diff --git a/mercurial/merge.py b/mercurial/merge.py
>
> Code sound fine from afar. I need to apply the patch and have a deeper look.


More information about the Mercurial-devel mailing list