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

Greg Ward greg-hg at gerg.ca
Sun Nov 21 10:42:26 CST 2010


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.

Greg


More information about the Mercurial-devel mailing list