diff -r f97a0bcfd7a1 -r 78759f78a44e mercurial/formatter.py --- a/mercurial/formatter.py Sun Apr 03 23:26:48 2016 +0900 +++ b/mercurial/formatter.py Sun Apr 10 17:23:09 2016 +0900 @@ -193,7 +193,11 @@ assert not (tmpl and mapfile) if mapfile: return templater.templater.frommapfile(mapfile) - t = templater.templater() + return maketemplater(ui, topic, tmpl) + +def maketemplater(ui, topic, tmpl, filters=None, cache=None): + """Create a templater from a string template 'tmpl'""" + t = templater.templater(filters=filters, cache=cache) if tmpl: t.cache[topic] = tmpl return t