mercurial/templater.py
changeset 37019 c97b936d8bb5
parent 37014 a5311d7f4af8
child 37067 04aafcec00b9
--- a/mercurial/templater.py	Mon Mar 19 21:09:23 2018 +0900
+++ b/mercurial/templater.py	Fri Mar 16 21:39:32 2018 +0900
@@ -770,11 +770,11 @@
 
     def render(self, t, mapping):
         """Render the specified named template and return result as string"""
-        mapping = pycompat.strkwargs(mapping)
-        return templateutil.stringify(self(t, **mapping))
+        return templateutil.stringify(self.generate(t, mapping))
 
-    def __call__(self, t, **mapping):
-        mapping = pycompat.byteskwargs(mapping)
+    def generate(self, t, mapping):
+        """Return a generator that renders the specified named template and
+        yields chunks"""
         ttype = t in self.map and self.map[t][0] or 'default'
         if ttype not in self.ecache:
             try: