##// END OF EJS Templates
formatter: add a method to build a full templater from a -T option
Matt Mackall -
r25512:8463433c default
parent child Browse files
Show More
@@ -171,6 +171,13 b' def lookuptemplate(ui, topic, tmpl):'
171 # constant string?
171 # constant string?
172 return tmpl, None
172 return tmpl, None
173
173
174 def gettemplater(ui, topic, spec):
175 tmpl, mapfile = lookuptemplate(ui, topic, spec)
176 t = templater.templater(mapfile, {})
177 if tmpl:
178 t.cache[topic] = tmpl
179 return t
180
174 def formatter(ui, topic, opts):
181 def formatter(ui, topic, opts):
175 template = opts.get("template", "")
182 template = opts.get("template", "")
176 if template == "json":
183 if template == "json":
General Comments 0
You need to be logged in to leave comments. Login now