[PATCH 2 of 3] graft: preserve original source in subsequent grafts

Stefano Tortarolo stefano.tortarolo at gmail.com
Mon Nov 14 13:20:07 CST 2011


2011/11/12 Mads Kiilerich <mads at kiilerich.com>

> Stefano Tortarolo wrote, On 11/12/2011 02:05 PM:
>
>  # HG changeset patch
>> # User Stefano Tortarolo<stefano.tortarolo@**gmail.com<stefano.tortarolo at gmail.com>
>> >
>> # Date 1321100140 -3600
>> # Node ID b7644d5507d26bc84c8d171d4a6a13**883021b2d3
>> # Parent  211d35717f64f723be889a6016c529**d244f702ef
>> graft: preserve original source in subsequent grafts
>>
>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>> --- a/mercurial/commands.py
>> +++ b/mercurial/commands.py
>> @@ -2613,7 +2613,10 @@
>>              cont = False
>>
>>          # commit
>> -        extra = {'source': ctx.hex()}
>> +        source = ctx.extra().get('source')
>> +        if not source:
>> +            source = ctx.hex()
>> +        extra = {'source': source}
>>          user = ctx.user()
>>          if opts.get('user'):
>>              user = opts['user']
>>
>
> (For reference, Matt said
>
>> A closely related question is what 'source' to set for a graft of a
>> graft. We should probably copy the original source.
>>
> )
>
> It is hard to tell which of the previous identities that is most
> important, so wouldn't it be better to preserve all of them?
>
> Changing 'source' to a list would be slightly incompatible with 2.0, but
> that might be acceptable considering the impact.
>
>
Yes, I'll resend a new series in a few minutes, but I'd change 'source' in
'sources'.

Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111114/b825477d/attachment.html>


More information about the Mercurial-devel mailing list