diff mercurial/templatekw.py @ 29623:33bf8bd8c5b9 stable

templatekw: fix join format of revset() function It's been broken since e4609ec959f8, which made makemap() return a dict of multiple keywords. Because the default joinfmt() randomly picks one item from a dict, we have to make revset() select d[name] explicitly.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 22 Jul 2016 22:00:46 +0900
parents 119702a8b415
children 1a129dd05b7d
line wrap: on
line diff
--- a/mercurial/templatekw.py	Fri Jul 22 11:29:42 2016 +0000
+++ b/mercurial/templatekw.py	Fri Jul 22 22:00:46 2016 +0900
@@ -547,7 +547,8 @@
     revs = [str(r) for r in revs]  # ifcontains() needs a list of str
     f = _showlist(name, revs, **args)
     return _hybrid(f, revs,
-                   lambda x: {name: x, 'ctx': repo[int(x)], 'revcache': {}})
+                   lambda x: {name: x, 'ctx': repo[int(x)], 'revcache': {}},
+                   lambda d: d[name])
 
 @templatekeyword('subrepos')
 def showsubrepos(**args):