Patchwork [3,of,7] histedit: report the unacceptable changeset

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 23, 2015, 9:06 a.m.
Message ID <77ab1997cf96c07f6c24.1450861602@waste.org>
Download mbox | patch
Permalink /patch/12281/
State Superseded
Headers show

Comments

timeless@mozdev.org - Dec. 23, 2015, 9:06 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1450856265 0
#      Wed Dec 23 07:37:45 2015 +0000
# Node ID 77ab1997cf96c07f6c244be93ed70844852dde02
# Parent  bd24bc6edb3572fef1636e5723269275246aa42f
histedit: report the unacceptable changeset

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1233,12 +1233,14 @@ 
             ha = node.hex(nodetoverify)
             if _constraints.noother in constraints and ha not in expected:
                 raise error.Abort(
-                    _('may not use "%s" with changesets '
-                      'other than the ones listed') % action.verb)
+                    _('%s "%s" changeset was not a candidate')
+                     % (action.verb, node.short(ha)),
+                    hint=_('only use listed changesets'))
             if _constraints.forceother in constraints and ha in expected:
                 raise error.Abort(
-                    _('may not use "%s" with changesets '
-                      'within the edited list') % action.verb)
+                    _('%s "%s" changeset was not an edited list candidate')
+                     % (action.verb, node.short(ha)),
+                    hint=_('only use listed changesets'))
             if _constraints.noduplicates in constraints and ha in seen:
                 raise error.Abort(_('duplicated command for changeset %s') %
                         ha[:12])
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
@@ -170,7 +170,8 @@ 
   > pick c8e68270e35a 3 four
   > pick 08d98a8350f3 4 five
   > EOF
-  abort: may not use "pick" with changesets other than the ones listed
+  abort: pick "363035386362" changeset was not a candidate
+  (only use listed changesets)
   [255]
 
 Test malformed line
diff --git a/tests/test-histedit-base.t b/tests/test-histedit-base.t
--- a/tests/test-histedit-base.t
+++ b/tests/test-histedit-base.t
@@ -231,7 +231,8 @@ 
   > base d273e35dcdf2 B
   > pick b2f90fd8aa85 I
   > EOF
-  abort: may not use "base" with changesets within the edited list
+  abort: base "643237336533" changeset was not an edited list candidate
+  (only use listed changesets)
 
   $ hg --config experimental.histeditng=False histedit 5 --commands - 2>&1 << EOF | fixbundle
   > base cd010b8cd998 A