mercurial/templater.py
changeset 10061 9e2ab10728a2
parent 9842 d3dbdca92458
child 10264 d6512b3e9ac0
--- a/mercurial/templater.py	Sun Dec 13 18:06:24 2009 +0100
+++ b/mercurial/templater.py	Sun Dec 13 18:06:24 2009 +0100
@@ -77,8 +77,14 @@
             raise SyntaxError(_("error expanding '%s%%%s'") % (key, format))
         lm = map.copy()
         for i in v:
-            lm.update(i)
-            yield self.process(format, lm)
+            if isinstance(i, dict): 
+                lm.update(i)
+                yield self.process(format, lm)
+            else:
+                # v is not an iterable of dicts, this happen when 'key'
+                # has been fully expanded already and format is useless.
+                # If so, return the expanded value.
+                yield i
 
     def _filter(self, expr, get, map):
         if expr not in self.cache: