diff mercurial/templatekw.py @ 32929:7f1d07d2c8f8

templatekw: use common "rev:node" format as the default of predecessors I'm not sure if this is better. If we're planning to add a template keyword that returns obsoleted nodes unavailable in the repo (i.e. they have no valid revision numbers), we might want to use the current "node"-only format everywhere.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Jun 2017 13:34:18 +0900
parents 498e9dcc5fa9
children 11c0bb4ccc76
line wrap: on
line diff
--- a/mercurial/templatekw.py	Sat Jun 17 13:23:55 2017 +0900
+++ b/mercurial/templatekw.py	Sat Jun 17 13:34:18 2017 +0900
@@ -570,7 +570,7 @@
 
     return _hybrid(None, predecessors,
                    lambda x: {'ctx': repo[x], 'revcache': {}},
-                   lambda d: short(scmutil.binnode(d['ctx'])))
+                   lambda d: _formatrevnode(d['ctx']))
 
 @templatekeyword('p1rev')
 def showp1rev(repo, ctx, templ, **args):