[PATCH 2 of 2] graft: record intermediate grafts in extras

Durham Goode durham at fb.com
Mon Apr 6 12:46:49 CDT 2015



On 4/6/15 10:16 AM, Pierre-Yves David wrote:
>
>
> On 04/05/2015 07:24 PM, Durham Goode wrote:
>> # HG changeset patch
>> # User Durham Goode <durham at fb.com>
>> # Date 1428261122 25200
>> #      Sun Apr 05 12:12:02 2015 -0700
>> # Node ID 3b9829c02481efdc20a2bb1ee3d30494844e3569
>> # Parent  409103499e22860c64bd334e671753dfcf0072a6
>> graft: record intermediate grafts in extras
>>
>> Previously the extra field for a graft only contained the original 
>> commit hash.
>> This made it impossible to use graft to copy a commit more than once, 
>> because
>> the extras fields did not change after the second graft.
>>
>> The fix is to add an extra.intermediate-source field that records the 
>> immediate
>> predecessor to graft. This changes hashes for commits that have been 
>> grafted
>> twice, which is why the test was affected.
>
> I'm definitly not thrilled by this series. It seems to over stretch 
> `hg graft` role and add significant overlap with feature provided by 
> the changeset evolution concept.
The motivation comes from users wanting to keep a copy of their current 
commit, for future reference or easy reverting.  The few user's I've 
seen want this have immediately tried graft as a way to copy a commit.  
If there is a better solution for this situation, we can use that 
(unfortunately backup bundles are not good enough for this).

As for overlapping with evolve: until evolve is turned on for every 
Mercurial user, I don't think we should block new, useful features being 
added to core due to some possible overlap with an extension most people 
don't have.


More information about the Mercurial-devel mailing list