histedit: show correct hash ID at verification error
node.short() on 'ha' in verifyactions() causes broken hash ID, because
it is initialized with node.hex()-ed node value.
--- a/hgext/histedit.py Sat Jan 30 18:00:11 2016 +0900
+++ b/hgext/histedit.py Mon Feb 01 20:29:20 2016 +0900
@@ -1315,12 +1315,12 @@
if _constraints.noother in constraints and ha not in expected:
raise error.ParseError(
_('%s "%s" changeset was not a candidate')
- % (action.verb, node.short(ha)),
+ % (action.verb, ha[:12]),
hint=_('only use listed changesets'))
if _constraints.forceother in constraints and ha in expected:
raise error.ParseError(
_('%s "%s" changeset was not an edited list candidate')
- % (action.verb, node.short(ha)),
+ % (action.verb, ha[:12]),
hint=_('only use listed changesets'))
if _constraints.noduplicates in constraints and ha in seen:
raise error.ParseError(_(
--- a/tests/test-histedit-arguments.t Sat Jan 30 18:00:11 2016 +0900
+++ b/tests/test-histedit-arguments.t Mon Feb 01 20:29:20 2016 +0900
@@ -171,7 +171,7 @@
> pick c8e68270e35a 3 four
> pick 08d98a8350f3 4 five
> EOF
- hg: parse error: pick "363035386362" changeset was not a candidate
+ hg: parse error: pick "6058cbb6cfd7" changeset was not a candidate
(only use listed changesets)
[255]
--- a/tests/test-histedit-base.t Sat Jan 30 18:00:11 2016 +0900
+++ b/tests/test-histedit-base.t Mon Feb 01 20:29:20 2016 +0900
@@ -232,7 +232,7 @@
> base d273e35dcdf2 B
> pick b2f90fd8aa85 I
> EOF
- hg: parse error: base "643237336533" changeset was not an edited list candidate
+ hg: parse error: base "d273e35dcdf2" changeset was not an edited list candidate
(only use listed changesets)
$ hg --config experimental.histeditng=False histedit 5 --commands - 2>&1 << EOF | fixbundle
--- a/tests/test-histedit-commute.t Sat Jan 30 18:00:11 2016 +0900
+++ b/tests/test-histedit-commute.t Mon Feb 01 20:29:20 2016 +0900
@@ -282,7 +282,7 @@
> pick de71b079d9ce e
> pick 38b92f448761 c
> EOF
- hg: parse error: pick "646537316230" changeset was not a candidate
+ hg: parse error: pick "de71b079d9ce" changeset was not a candidate
(only use listed changesets)
$ hg log --graph
@ changeset: 7:803ef1c6fcfd