Show More
@@ -433,19 +433,16 b' def loadtemplater(ui, spec, cache=None):' | |||
|
433 | 433 | assert not (spec.tmpl and spec.mapfile) |
|
434 | 434 | if spec.mapfile: |
|
435 | 435 | return templater.templater.frommapfile(spec.mapfile, cache=cache) |
|
436 |
return |
|
|
436 | return maketemplater(ui, spec.tmpl, cache=cache) | |
|
437 | 437 | |
|
438 | 438 | def maketemplater(ui, tmpl, cache=None): |
|
439 | 439 | """Create a templater from a string template 'tmpl'""" |
|
440 | return _maketemplater(ui, '', tmpl, cache=cache) | |
|
441 | ||
|
442 | def _maketemplater(ui, topic, tmpl, cache=None): | |
|
443 | 440 | aliases = ui.configitems('templatealias') |
|
444 | 441 | t = templater.templater(cache=cache, aliases=aliases) |
|
445 | 442 | t.cache.update((k, templater.unquotestring(v)) |
|
446 | 443 | for k, v in ui.configitems('templates')) |
|
447 | 444 | if tmpl: |
|
448 |
t.cache[ |
|
|
445 | t.cache[''] = tmpl | |
|
449 | 446 | return t |
|
450 | 447 | |
|
451 | 448 | def formatter(ui, out, topic, opts): |
General Comments 0
You need to be logged in to leave comments.
Login now