comparison mercurial/cmdutil.py @ 32849:de7dc25ecf2e

graphlog: do not look up graphnodetemplate in template paths (BC) ui.graphnodetemplate config should be a literal template as ui.logtemplate is. The use of formatter.gettemplater() is valid only for a template string given by -T/--template option.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 22 Apr 2017 14:53:05 +0900
parents 041d976b662a
children 11e667a8fcba
comparison
equal deleted inserted replaced
32848:470820c2418d 32849:de7dc25ecf2e
2290 spec = ui.config('ui', 'graphnodetemplate') 2290 spec = ui.config('ui', 'graphnodetemplate')
2291 if not spec: 2291 if not spec:
2292 return templatekw.showgraphnode # fast path for "{graphnode}" 2292 return templatekw.showgraphnode # fast path for "{graphnode}"
2293 2293
2294 spec = templater.unquotestring(spec) 2294 spec = templater.unquotestring(spec)
2295 templ = formatter.gettemplater(ui, 'graphnode', spec) 2295 templ = formatter.maketemplater(ui, 'graphnode', spec)
2296 cache = {} 2296 cache = {}
2297 if isinstance(displayer, changeset_templater): 2297 if isinstance(displayer, changeset_templater):
2298 cache = displayer.cache # reuse cache of slow templates 2298 cache = displayer.cache # reuse cache of slow templates
2299 props = templatekw.keywords.copy() 2299 props = templatekw.keywords.copy()
2300 props['templ'] = templ 2300 props['templ'] = templ