mercurial/formatter.py
changeset 31170 e64b70c96338
parent 30560 783016005122
child 31172 16272d8c24f6
equal deleted inserted replaced
31169:48a8b2e5fe31 31170:e64b70c96338
   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):