[PATCH 3 of 3] merge: add file ancestor linknode to mergestate

Durham Goode durham at fb.com
Thu Feb 11 16:41:42 EST 2016


On 2/11/16, 1:38 PM, "Pierre-Yves David" <pierre-yves.david at ens-lyon.org> wrote:

>
>
>On 02/05/2016 07:02 PM, Durham Goode wrote:
>> # HG changeset patch
>> # User Durham Goode <durham at fb.com>
>> # Date 1454696534 28800
>> #      Fri Feb 05 10:22:14 2016 -0800
>> # Node ID d32dc6274ec43680fb8dfa9883d00175cf4b1c40
>> # Parent  3f5345de185eaae10a33c8c97afe3d2649b604f6
>> merge: add file ancestor linknode to mergestate
>>
>> During a merge, each file has a current commitnode+filenode, an other
>> commitnode+filenode, and an ancestor commitnode+filenode. The ancestor
>> commitnode is not stored though, and we rely on the ability for the filectx() to
>> look up the commitnode by using the filenode's linkrev. In alternative backends
>> (like remotefilelog), linkrevs may have restriction that prevent arbitrary
>> linkrev look up given a filenode.
>
>Don't we have the changeset node from each side that would allow us to 
>make a proper initialisation of the linkrev adjustement?
>
>If not, could we get that instead?

That's potentially expensive.  We'd have to do the whole bid-merge logic again to determine which of the common ancestors is the correct one to use (the one that contains the desired filenode).


More information about the Mercurial-devel mailing list