[PATCH evolve-ext] uncommit: abort when rev specifies the current changeset

Sean Farley sean.michael.farley at gmail.com
Sat Nov 1 12:40:01 CDT 2014


Pierre-Yves David writes:

> On 10/29/2014 01:07 AM, Nathan Goldbaum wrote:
>> # HG changeset patch
>> # User Nathan Goldbaum <ngoldbau at ucsc.edu>
>> # Date 1414544788 25200
>> #      Tue Oct 28 18:06:28 2014 -0700
>> # Node ID 34989d80484df48893be948ff0a47dd33aaeaf2e
>> # Parent  b7d85cd8ec7bd5a4ba5a61d156745269a999450b
>> uncommit: abort when rev specifies the current changeset
>>
>> The uncommit command now fails when the rev argument indicates the current
>> changeset. Previously this aborted in the changeset obsolescence machinery when
>> the current commit tries to obsolete itself.
>>
>> Using the rev argument like this indicates a misunderstanding, so printing an
>> uncommit-specific error should make it easier to understand what went wrong.
>
> The intend looks good. We should probably check for both p1 and p2. (not 
> just p1).
>
> The message is a bit cryptic to me.
>
>     abort: cannot reapply changes to the current changeset
>
> We should probably mention "uncommit" and "parent" in the error. Simple 
> proposal:
>
>    abort: uncommit to parent make no sense

I've been following this patch discussion on IRC and must admit that I
am a bit confused. How is 'hg uncommit foo' different from 'hg uncommit
--rev . foo'?


More information about the Mercurial-devel mailing list