Mercurial > hg
comparison mercurial/debugcommands.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 | efc4fb344c05 |
children | 143219fc2620 |
comparison
equal
deleted
inserted
replaced
36987:4b744c7b35ce | 36988:317382151ac3 |
---|---|
2453 ui.note(("* expanded:\n"), templater.prettyformat(newtree), '\n') | 2453 ui.note(("* expanded:\n"), templater.prettyformat(newtree), '\n') |
2454 | 2454 |
2455 if revs is None: | 2455 if revs is None: |
2456 tres = formatter.templateresources(ui, repo) | 2456 tres = formatter.templateresources(ui, repo) |
2457 t = formatter.maketemplater(ui, tmpl, resources=tres) | 2457 t = formatter.maketemplater(ui, tmpl, resources=tres) |
2458 ui.write(t.render(props)) | 2458 ui.write(t.renderdefault(props)) |
2459 else: | 2459 else: |
2460 displayer = logcmdutil.maketemplater(ui, repo, tmpl) | 2460 displayer = logcmdutil.maketemplater(ui, repo, tmpl) |
2461 for r in revs: | 2461 for r in revs: |
2462 displayer.show(repo[r], **pycompat.strkwargs(props)) | 2462 displayer.show(repo[r], **pycompat.strkwargs(props)) |
2463 displayer.close() | 2463 displayer.close() |