diff hgext/show.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 e3674c2a585c
children 6890b7e991a4
line wrap: on
line diff
--- a/hgext/show.py	Sat Mar 17 15:22:14 2018 +0900
+++ b/hgext/show.py	Sat Mar 17 11:23:04 2018 +0900
@@ -260,7 +260,7 @@
     shortesttmpl = formatter.maketemplater(ui, '{shortest(node, %d)}' % nodelen,
                                            resources=tres)
     def shortest(ctx):
-        return shortesttmpl.render({'ctx': ctx, 'node': ctx.hex()})
+        return shortesttmpl.renderdefault({'ctx': ctx, 'node': ctx.hex()})
 
     # We write out new heads to aid in DAG awareness and to help with decision
     # making on how the stack should be reconciled with commits made since the