--- a/mercurial/templatekw.py Mon Mar 26 17:00:12 2018 +0800
+++ b/mercurial/templatekw.py Sat Apr 14 20:34:14 2018 +0800
@@ -809,8 +809,10 @@
for entry in entries:
if entry.get('divergentnodes'):
dnodes = entry['divergentnodes']
- entry['divergentnodes'] = ''.join(formatnode(dnode)
- for dnode in dnodes)
+ dnhybrid = _hybrid(None, [dnode.hex() for dnode in dnodes],
+ lambda x: {'ctx': repo[x]},
+ lambda x: formatnode(repo[x]))
+ entry['divergentnodes'] = dnhybrid
tmpl = '{instability}:{divergentnodes} {reason} {node|short}'
return templateutil.mappinglist(entries, tmpl=tmpl, sep='\n')
--- a/tests/test-obsolete-divergent.t Mon Mar 26 17:00:12 2018 +0800
+++ b/tests/test-obsolete-divergent.t Sat Apr 14 20:34:14 2018 +0800
@@ -725,6 +725,8 @@
content-divergent: 4:70d5a63ca112 (draft) predecessor a178212c3433
$ hg log -r 1a2a9b5b0030 --hidden -T '{whyunstable%"{instability}:{divergentnodes} {reason} {node}\n"}'
content-divergent: 4:70d5a63ca112 (draft) predecessor a178212c3433c4e77b573f6011e29affb8aefa33
+ $ hg log -r 1a2a9b5b0030 --hidden -T '{whyunstable%"{instability}:{divergentnodes % " {node} ({phase})"} {reason} {node}\n"}'
+ content-divergent: 70d5a63ca112acb3764bc1d7320ca90ea688d671 (draft) predecessor a178212c3433c4e77b573f6011e29affb8aefa33
#if serve