[PATCH 2 of 4] commit: warn when resurrecting a closed changeset

Martin Geisler mg at lazybytes.net
Sun May 9 18:12:18 CDT 2010


Matt Mackall <mpm at selenic.com> writes:

> On Sun, 2010-05-09 at 22:50 +0200, Gilles Moris wrote:

>> # HG changeset patch
>> # User Gilles Moris <gilles.moris at free.fr>
>> # Date 1273437726 -7200
>> # Node ID 3615f282d6f08fb99976b86816ff37c019b8187a
>> # Parent  9ab8b7dc5065557877d765b4f524ceb9cb1751e3
>> commit: warn when resurrecting a closed changeset
>> 
>> diff -r 9ab8b7dc5065 -r 3615f282d6f0 mercurial/commands.py
>> --- a/mercurial/commands.py	Sun May 09 22:37:18 2010 +0200
>> +++ b/mercurial/commands.py	Sun May 09 22:42:06 2010 +0200
>> @@ -743,6 +743,11 @@
>>            (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)):
>>          ui.status(_('created new head\n'))
>>  
>> +    if not opts.get('close_branch'):
>> +        for r in parents:
>> +            if repo[r].extra().get('close'):
>> +                ui.status(_('resurrecting closed changeset %d\n') % r)
>> +
>
> We might want -f here. s/resurrecting/reopening/ and s/changeset/branch
> head/?

Yeah, I agree with you on all three points. The current concept is
open/closed branch heads, so we shouldn't talk about resurrecting.

Also, it's not the closed changeset that is reopened (the changeset
remains "closed" since it does not change) it is the branch head that is
reopened by virtue of being moved forward to a non-closed (open)
changeset.

-- 
Martin Geisler

Fast and powerful revision control: http://mercurial.selenic.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100510/7197cb05/attachment.pgp>


More information about the Mercurial-devel mailing list