mercurial/templater.py
changeset 34328 dd28b1f55eb8
parent 34326 e60c601953d7
child 34329 6367318327f0
--- a/mercurial/templater.py	Sun Sep 24 12:43:57 2017 +0900
+++ b/mercurial/templater.py	Sun Sep 24 15:22:46 2017 +0900
@@ -768,10 +768,7 @@
     # TODO: perhaps this should be evalfuncarg(), but it can't because hgweb
     # abuses generator as a keyword that returns a list of dicts.
     joinset = evalrawexp(context, mapping, args[0])
-    if util.safehasattr(joinset, 'itermaps'):
-        jf = joinset.joinfmt
-        joinset = [jf(x) for x in joinset.itermaps()]
-
+    joinfmt = getattr(joinset, 'joinfmt', pycompat.identity)
     joiner = " "
     if len(args) > 1:
         joiner = evalstring(context, mapping, args[1])
@@ -782,7 +779,7 @@
             first = False
         else:
             yield joiner
-        yield x
+        yield joinfmt(x)
 
 @templatefunc('label(label, expr)')
 def label(context, mapping, args):