mercurial/formatter.py
changeset 28955 78759f78a44e
parent 28954 f97a0bcfd7a1
child 28957 d813132ea361
--- 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