diff mercurial/templater.py @ 36991:317382151ac3

templater: rename .render(mapping) to .renderdefault(mapping) (API) I'm going to add templ.render(t, mapping) and templ.generate(t, mapping) in place of stringify(templ(t, **mapping)) and templ(t, **mapping) respectively. .. api:: The ``render(mapping)`` method of the templater has been renamed to ``renderdefault(mapping)``.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Mar 2018 11:23:04 +0900
parents 4b744c7b35ce
children de117f579431
line wrap: on
line diff
--- a/mercurial/templater.py	Sat Mar 17 15:22:14 2018 +0900
+++ b/mercurial/templater.py	Sat Mar 17 11:23:04 2018 +0900
@@ -723,7 +723,7 @@
                 raise IOError(inst.args[0], encoding.strfromlocal(reason))
         return self.cache[t]
 
-    def render(self, mapping):
+    def renderdefault(self, mapping):
         """Render the default unnamed template and return result as string"""
         mapping = pycompat.strkwargs(mapping)
         return templateutil.stringify(self('', **mapping))