[PATCH 2 of 4] histedit: improve missing rule suggestion

Augie Fackler raf at durin42.com
Wed Dec 2 09:13:36 CST 2015


On Wed, Dec 02, 2015 at 02:13:34AM -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1449042095 0
> #      Wed Dec 02 07:41:35 2015 +0000
> # Node ID 97b0c60ab14023b65afdaa0563c8efbea6da66a8
> # Parent  f28057210ae315e245f61b04b584900c84f274f1
> histedit: improve missing rule suggestion
>
> include actual suggested text
>
> diff --git a/hgext/histedit.py b/hgext/histedit.py
> --- a/hgext/histedit.py
> +++ b/hgext/histedit.py
> @@ -1130,7 +1130,7 @@
>      if missing:
>          raise error.Abort(_('missing rules for changeset %s') %
>                  missing[0][:12],
> -                hint=_('do you want to use the drop action?'))
> +                hint=_('consider adding: "drop %s"') % missing[0][:12])
>      return parsed
>
>  def newnodestoabort(state):
> diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
> --- a/tests/test-histedit-arguments.t
> +++ b/tests/test-histedit-arguments.t
> @@ -164,7 +164,7 @@
>    > pick 08d98a8350f3 4 five
>    > EOF
>    abort: missing rules for changeset c8e68270e35a
> -  (do you want to use the drop action?)
> +  (consider adding: "drop c8e68270e35a")

how about (use "drop c8e68270e35a" to discard the change) instead of
"consider adding?" I'd like it to be at least somewhat informative in
the space available so as to avoid cargo-culting leading to dataloss.

>    [255]
>
>  Test that extra revisions are detected
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list