diff -r c2a4dfe2a336 -r 8463433c2689 mercurial/formatter.py --- a/mercurial/formatter.py Wed Jun 10 14:29:13 2015 -0500 +++ b/mercurial/formatter.py Wed Jun 10 14:30:18 2015 -0500 @@ -171,6 +171,13 @@ # constant string? return tmpl, None +def gettemplater(ui, topic, spec): + tmpl, mapfile = lookuptemplate(ui, topic, spec) + t = templater.templater(mapfile, {}) + if tmpl: + t.cache[topic] = tmpl + return t + def formatter(ui, topic, opts): template = opts.get("template", "") if template == "json":