Mercurial > public > mercurial-scm > hg-stable
diff mercurial/logcmdutil.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 | 255f635c3204 |
children | de117f579431 |
line wrap: on
line diff
--- a/mercurial/logcmdutil.py Sat Mar 17 15:22:14 2018 +0900 +++ b/mercurial/logcmdutil.py Sat Mar 17 11:23:04 2018 +0900 @@ -285,7 +285,7 @@ t = formatter.maketemplater(self.repo.ui, '{join(obsfate, "\n")}', defaults=templatekw.keywords, resources=tres) - obsfate = t.render({'ctx': ctx, 'revcache': {}}).splitlines() + obsfate = t.renderdefault({'ctx': ctx, 'revcache': {}}).splitlines() if obsfate: for obsfateline in obsfate: @@ -858,7 +858,7 @@ resources=tres) def formatnode(repo, ctx): props = {'ctx': ctx, 'repo': repo, 'revcache': {}} - return templ.render(props) + return templ.renderdefault(props) return formatnode def displaygraph(ui, repo, dag, displayer, edgefn, getrenamed=None, props=None):