mercurial/templater.py
changeset 32873 2ecce24dfcd3
parent 32684 af854b1b36f8
child 32970 11c0bb4ccc76
--- a/mercurial/templater.py	Wed Jun 14 20:56:34 2017 -0400
+++ b/mercurial/templater.py	Sat Apr 22 19:56:47 2017 +0900
@@ -1298,6 +1298,10 @@
                               (self.map[t][1], inst.args[1]))
         return self.cache[t]
 
+    def render(self, mapping):
+        """Render the default unnamed template and return result as string"""
+        return stringify(self('', **mapping))
+
     def __call__(self, t, **mapping):
         ttype = t in self.map and self.map[t][0] or 'default'
         if ttype not in self.ecache: