# HG changeset patch # User Pierre-Yves David # Date 1497626509 -7200 # Node ID 31d3be16e65c52ca08f3859d60cff79d0eab786e # Parent 20c1e035101b0d0885b889893d6125ae68aea113 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. diff -r 20c1e035101b -r 31d3be16e65c hgext3rd/evolve/templatekw.py --- 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"]) diff -r 20c1e035101b -r 31d3be16e65c tests/test-evolve-templates.t --- 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)