equal
deleted
inserted
replaced
387 assert not (tmpl and mapfile) |
387 assert not (tmpl and mapfile) |
388 if mapfile: |
388 if mapfile: |
389 return templater.templater.frommapfile(mapfile) |
389 return templater.templater.frommapfile(mapfile) |
390 return maketemplater(ui, topic, tmpl) |
390 return maketemplater(ui, topic, tmpl) |
391 |
391 |
392 def maketemplater(ui, topic, tmpl, filters=None, cache=None): |
392 def maketemplater(ui, topic, tmpl, cache=None): |
393 """Create a templater from a string template 'tmpl'""" |
393 """Create a templater from a string template 'tmpl'""" |
394 aliases = ui.configitems('templatealias') |
394 aliases = ui.configitems('templatealias') |
395 t = templater.templater(filters=filters, cache=cache, aliases=aliases) |
395 t = templater.templater(cache=cache, aliases=aliases) |
396 if tmpl: |
396 if tmpl: |
397 t.cache[topic] = tmpl |
397 t.cache[topic] = tmpl |
398 return t |
398 return t |
399 |
399 |
400 def formatter(ui, topic, opts): |
400 def formatter(ui, topic, opts): |