diff mercurial/templater.py @ 17631:0b241d7a8c62

templating: make new-style templating features work with command line lists
author Matt Mackall <mpm@selenic.com>
date Fri, 21 Sep 2012 18:54:00 -0500
parents 099c778ceb33
children 523625e46760
line wrap: on
line diff
--- a/mercurial/templater.py	Thu Sep 20 23:30:59 2012 -0400
+++ b/mercurial/templater.py	Fri Sep 21 18:54:00 2012 -0500
@@ -164,6 +164,9 @@
 def runmap(context, mapping, data):
     func, data, ctmpl = data
     d = func(context, mapping, data)
+    if util.safehasattr(d, '__call__'):
+        d = d()
+
     lm = mapping.copy()
 
     for i in d: