histedit: report the unacceptable changeset
authortimeless <timeless@mozdev.org>
Wed, 23 Dec 2015 07:37:45 +0000
changeset 27712 bb810c8b3eca
parent 27711 7a678a12a5cf
child 27713 fb2c77ba577a
histedit: report the unacceptable changeset
hgext/histedit.py
tests/test-histedit-arguments.t
tests/test-histedit-base.t
tests/test-histedit-commute.t
--- a/hgext/histedit.py	Mon Jan 11 22:00:07 2016 -0500
+++ b/hgext/histedit.py	Wed Dec 23 07:37:45 2015 +0000
@@ -1302,12 +1302,14 @@
             ha = node.hex(nodetoverify)
             if _constraints.noother in constraints and ha not in expected:
                 raise error.ParseError(
-                    _('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.ParseError(
-                    _('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.ParseError(_(
                         'duplicated command for changeset %s') %
--- a/tests/test-histedit-arguments.t	Mon Jan 11 22:00:07 2016 -0500
+++ b/tests/test-histedit-arguments.t	Wed Dec 23 07:37:45 2015 +0000
@@ -171,7 +171,8 @@
   > pick c8e68270e35a 3 four
   > pick 08d98a8350f3 4 five
   > EOF
-  hg: parse error: may not use "pick" with changesets other than the ones listed
+  hg: parse error: pick "363035386362" changeset was not a candidate
+  (only use listed changesets)
   [255]
 
 Test malformed line
--- a/tests/test-histedit-base.t	Mon Jan 11 22:00:07 2016 -0500
+++ b/tests/test-histedit-base.t	Wed Dec 23 07:37:45 2015 +0000
@@ -232,7 +232,8 @@
   > base d273e35dcdf2 B
   > pick b2f90fd8aa85 I
   > EOF
-  hg: parse error: may not use "base" with changesets within the edited list
+  hg: parse error: 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
--- a/tests/test-histedit-commute.t	Mon Jan 11 22:00:07 2016 -0500
+++ b/tests/test-histedit-commute.t	Wed Dec 23 07:37:45 2015 +0000
@@ -282,7 +282,8 @@
   > pick de71b079d9ce e
   > pick 38b92f448761 c
   > EOF
-  hg: parse error: may not use "pick" with changesets other than the ones listed
+  hg: parse error: pick "646537316230" changeset was not a candidate
+  (only use listed changesets)
   $ hg log --graph
   @  changeset:   7:803ef1c6fcfd
   |  tag:         tip