Mercurial > public > mercurial-scm > hg
comparison mercurial/logcmdutil.py @ 36513:6ad140dc4269
templatekw: extract non-templatekw function as getgraphnode()
Prepares for switching to the (context, mapping) API. We still need (repo, ctx)
function for the fast path.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 25 Feb 2018 14:28:32 +0900 |
parents | 27cd83152d31 |
children | 69477bac8926 |
comparison
equal
deleted
inserted
replaced
36512:d697e39f61a6 | 36513:6ad140dc4269 |
---|---|
835 return revs, differ | 835 return revs, differ |
836 | 836 |
837 def _graphnodeformatter(ui, displayer): | 837 def _graphnodeformatter(ui, displayer): |
838 spec = ui.config('ui', 'graphnodetemplate') | 838 spec = ui.config('ui', 'graphnodetemplate') |
839 if not spec: | 839 if not spec: |
840 return templatekw.showgraphnode # fast path for "{graphnode}" | 840 return templatekw.getgraphnode # fast path for "{graphnode}" |
841 | 841 |
842 spec = templater.unquotestring(spec) | 842 spec = templater.unquotestring(spec) |
843 tres = formatter.templateresources(ui) | 843 tres = formatter.templateresources(ui) |
844 if isinstance(displayer, changesettemplater): | 844 if isinstance(displayer, changesettemplater): |
845 tres['cache'] = displayer.cache # reuse cache of slow templates | 845 tres['cache'] = displayer.cache # reuse cache of slow templates |