Mercurial > public > mercurial-scm > hg
comparison mercurial/filemerge.py @ 36988: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 | a4a95bd7158d |
children | 3723b42ff953 |
comparison
equal
deleted
inserted
replaced
36987:4b744c7b35ce | 36988:317382151ac3 |
---|---|
561 """ | 561 """ |
562 if ctx.node() is None: | 562 if ctx.node() is None: |
563 ctx = ctx.p1() | 563 ctx = ctx.p1() |
564 | 564 |
565 props = {'ctx': ctx} | 565 props = {'ctx': ctx} |
566 templateresult = template.render(props) | 566 templateresult = template.renderdefault(props) |
567 | 567 |
568 label = ('%s:' % label).ljust(pad + 1) | 568 label = ('%s:' % label).ljust(pad + 1) |
569 mark = '%s %s' % (label, templateresult) | 569 mark = '%s %s' % (label, templateresult) |
570 | 570 |
571 if mark: | 571 if mark: |