comparison mercurial/formatter.py @ 31170:e64b70c96338

formatter: drop filters argument from maketemplater() It's unused now. I want to keep the high-level API simple.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 25 Feb 2017 22:04:30 +0900
parents 783016005122
children 16272d8c24f6
comparison
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):