template: use hex-node in successors
AS pointed by yuya on the list, the raw data for the template should be hex and
not binary.
--- a/hgext3rd/evolve/templatekw.py Fri Jun 16 17:16:26 2017 +0200
+++ b/hgext3rd/evolve/templatekw.py Fri Jun 16 17:21:49 2017 +0200
@@ -93,11 +93,12 @@
return ''
ssets, _ = closestsuccessors(repo, ctx.node())
+ ssets = [[node.hex(n) for n in ss] for ss in ssets]
data = []
gen = []
for ss in ssets:
- subgen = '[%s]' % ', '.join(map(node.short, ss))
+ subgen = '[%s]' % ', '.join(n[:12] for n in ss)
gen.append(subgen)
h = templatekw._hybrid(iter(subgen), ss, lambda x: {'successor': x},
lambda d: "%s" % d["successor"])
--- a/tests/test-evolve-templates.t Fri Jun 16 17:16:26 2017 +0200
+++ b/tests/test-evolve-templates.t Fri Jun 16 17:21:49 2017 +0200
@@ -128,6 +128,14 @@
o []
+ $ hg log -GT '{successors|json}\n'
+ o ""
+ |
+ | @ [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]]
+ |/
+ o ""
+
+
$ hg up 'desc(A1)' --hidden
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
working directory parent is obsolete! (a468dc9b3633)