Show More
@@ -347,8 +347,8 b' class templateformatter(baseformatter):' | |||||
347 | baseformatter.__init__(self, ui, topic, opts, _templateconverter) |
|
347 | baseformatter.__init__(self, ui, topic, opts, _templateconverter) | |
348 | self._out = out |
|
348 | self._out = out | |
349 | self._topic = topic |
|
349 | self._topic = topic | |
350 |
s |
|
350 | spec = lookuptemplate(ui, topic, opts.get('template', '')) | |
351 |
|
|
351 | self._t = loadtemplater(ui, topic, spec, cache=templatekw.defaulttempl) | |
352 | self._counter = itertools.count() |
|
352 | self._counter = itertools.count() | |
353 | self._cache = {} # for templatekw/funcs to store reusable data |
|
353 | self._cache = {} # for templatekw/funcs to store reusable data | |
354 | def context(self, **ctxs): |
|
354 | def context(self, **ctxs): | |
@@ -406,10 +406,6 b' def lookuptemplate(ui, topic, tmpl):' | |||||
406 | # constant string? |
|
406 | # constant string? | |
407 | return tmpl, None |
|
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 | def loadtemplater(ui, topic, spec, cache=None): |
|
409 | def loadtemplater(ui, topic, spec, cache=None): | |
414 | """Create a templater from either a literal template or loading from |
|
410 | """Create a templater from either a literal template or loading from | |
415 | a map file""" |
|
411 | a map file""" |
General Comments 0
You need to be logged in to leave comments.
Login now