[PATCH] revert: improve merge advice and favor its error over all

Patrick Mézard pmezard at gmail.com
Sun Nov 21 11:01:16 CST 2010


Le 21/11/10 17:42, Greg Ward a écrit :
> On Sun, Nov 21, 2010 at 8:40 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>>>> # HG changeset patch
>>>> # User timeless <timeless at gmail.com>
>>>> # Date 1290278508 -7200
>>>> # Node ID 3fd4e4e8138226a0bc66dad00f2dc3324e9b209c
>>>> # Parent  42ac864ed3946df2a3b7b87dcbc05cd4d35a62c3
>>>> revert: improve merge advice and favor its error over all
>>>
>>> In crew: http://hg.intevation.org/mercurial/crew/rev/3fd4e4e81382
>>
>> (For the archive)
>>
>> It changes the (frustrating for the user) use case:
>>
>>  Pre: uncommitted merge
>>
>>  (1)
>>  $ hg revert
>>  abort: no files or directories specified; use --all to revert the whole repo
>>
>>  User: Hmm. ok let's try that!
>>
>>  (2)
>>  $ hg revert --all
>>  abort: uncommitted merge - please provide a specific revision
>>
>>  User: wtf, now what?
>>
>> To:
>>
>>  (1)
>>  $ hg revert
>>  abort: uncommitted merge - use "hg update", see "hg help revert"
>>
>>  User: reads 'hg help' revert and the uses hg update
>>
>> (which could have been explained in the change message.)
> 
> OK, you've convinced me that moving the error check is a good thing.
> But I'm *not* convinced that the new error message is an improvement.

Yes, the message is a little unexpected but "hg help revert" explains in details what's going on. That's an improvement for me.

--
Patrick Mézard


More information about the Mercurial-devel mailing list