mercurial/templater.py
changeset 17982 e06e9fd2d99f
parent 17890 ca6850b9dd9e
child 17991 d605a82cf189
--- a/mercurial/templater.py	Wed Nov 28 16:15:05 2012 -0600
+++ b/mercurial/templater.py	Wed Nov 28 14:55:42 2012 -0800
@@ -8,6 +8,7 @@
 from i18n import _
 import sys, os, re
 import util, config, templatefilters, parser, error
+import types
 
 # template parsing
 
@@ -140,6 +141,10 @@
         v = context._defaults.get(key, '')
     if util.safehasattr(v, '__call__'):
         return v(**mapping)
+    if isinstance(v, types.GeneratorType):
+        v = list(v)
+        mapping[key] = v
+        return v
     return v
 
 def buildfilter(exp, context):