[PATCH] revert: simplify help message, better error message on reverting a merge

Matt Mackall mpm at selenic.com
Mon Jun 6 15:45:31 CDT 2011


On Mon, 2011-06-06 at 07:24 +0200, rupert THURNER wrote:
> # HG changeset patch
> # User rupert THURNER <rupert.thurner at gmail.com>
> # Date 1307337677 -7200
> # Node ID 986bc79f5c28b986d0f1177fa2c23bc8ac012c81
> # Parent  e597ef52a7c21ffe862339225bd915438f2dddcc
> revert: simplify help message, better error message on reverting a merge
> 
> Currently the help message of revert does not fit on a small terminal,
> but rephrasing a little bit makes it short enough to fit again. Trying
> a revert after rolling back a merge gives an error message which may
> confuse. Print a command which should execute without leading to an
> error message again.

I'm afraid you've still got extra boat anchors in here.

A patch should do -one thing-. Every additional thing you add to a patch
makes it exponentially less likely it'll get accepted.

> -                           'use "hg update", see "hg help revert"'))
> +                           'use "hg update --clean", "hg revert -r"'))

You are now advising users to run a command that nukes all their
changes. Iffy. It's probably better to direct people to the help and
only the help.

> -    ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
> +    ('d', 'date', '', _('tipmost revision matching date, see "hg help dates"'), _('DATE')),

We've got a bunch of commands that take dates, let's not be changing
them piecemeal.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list