diff mercurial/templatekw.py @ 37686:b1b1b0626f59

templates: make divergentnodes in whyunstable keyword be a hybrid list
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 14 Apr 2018 20:34:14 +0800
parents 76cd5816268e
children 24fee31fda05
line wrap: on
line diff
--- 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')