[PATCH evolve-ext] fold: add argument to handle ambiguous case

Jordi GutiƩrrez Hermoso jordigh at octave.org
Thu May 28 17:56:12 CDT 2015


On Thu, 2015-05-28 at 14:01 -0700, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1432845532 25200
> #      Thu May 28 13:38:52 2015 -0700
> # Node ID 0821817a84792210498107777181dcc9f1d68ec7
> # Parent  69e5de3e6129185469c2cbf98383ac6d58260d0c
> fold: add argument to handle ambiguous case
[snip]
> +            ui.write_err(_('multiple revisions specified not including the'
> +            ' parent of the working.\n'
> +            'Please use one of:\n'
> +            '   --exact to fold exactly these revisions\n'
> +            '   --chain to fold the chain from these revisions upto the parent'
> +            'of the working copy\n'))
> +            return 1

Too verbose. Mercurial error messages must fit in a single line, plus
an optional hint, which must also fit in a single line. Like the Bard
wrote, "brevity is the soul of wit."

If we really are going to error out in this case, which I still
oppose, this error should raise util.Abort with a one-line error
message and perhaps a one-line hint. If you cannot fit a clear
explanation in that space, the average user will not read it and/or
will not understand it.






More information about the Mercurial-devel mailing list