##// END OF EJS Templates
formatter: inline gettemplater()...
Yuya Nishihara -
r32832:99df3549 default
parent child Browse files
Show More
@@ -347,8 +347,8 b' class templateformatter(baseformatter):'
347 347 baseformatter.__init__(self, ui, topic, opts, _templateconverter)
348 348 self._out = out
349 349 self._topic = topic
350 self._t = gettemplater(ui, topic, opts.get('template', ''),
351 cache=templatekw.defaulttempl)
350 spec = lookuptemplate(ui, topic, opts.get('template', ''))
351 self._t = loadtemplater(ui, topic, spec, cache=templatekw.defaulttempl)
352 352 self._counter = itertools.count()
353 353 self._cache = {} # for templatekw/funcs to store reusable data
354 354 def context(self, **ctxs):
@@ -406,10 +406,6 b' def lookuptemplate(ui, topic, tmpl):'
406 406 # constant string?
407 407 return tmpl, None
408 408
409 def gettemplater(ui, topic, spec, cache=None):
410 tmpl, mapfile = lookuptemplate(ui, topic, spec)
411 return loadtemplater(ui, topic, (tmpl, mapfile), cache=cache)
412
413 409 def loadtemplater(ui, topic, spec, cache=None):
414 410 """Create a templater from either a literal template or loading from
415 411 a map file"""
General Comments 0
You need to be logged in to leave comments. Login now