Show More
@@ -416,13 +416,13 b' class changesettemplater(changesetprinte' | |||||
416 | def __init__(self, ui, repo, tmplspec, differ=None, diffopts=None, |
|
416 | def __init__(self, ui, repo, tmplspec, differ=None, diffopts=None, | |
417 | buffered=False): |
|
417 | buffered=False): | |
418 | changesetprinter.__init__(self, ui, repo, differ, diffopts, buffered) |
|
418 | changesetprinter.__init__(self, ui, repo, differ, diffopts, buffered) | |
419 | tres = formatter.templateresources(ui, repo) |
|
419 | # tres is shared with _graphnodeformatter() | |
|
420 | self._tresources = tres = formatter.templateresources(ui, repo) | |||
420 | self.t = formatter.loadtemplater(ui, tmplspec, |
|
421 | self.t = formatter.loadtemplater(ui, tmplspec, | |
421 | defaults=templatekw.keywords, |
|
422 | defaults=templatekw.keywords, | |
422 | resources=tres, |
|
423 | resources=tres, | |
423 | cache=templatekw.defaulttempl) |
|
424 | cache=templatekw.defaulttempl) | |
424 | self._counter = itertools.count() |
|
425 | self._counter = itertools.count() | |
425 | self._getcache = tres['cache'] # shared with _graphnodeformatter() |
|
|||
426 |
|
426 | |||
427 | self._tref = tmplspec.ref |
|
427 | self._tref = tmplspec.ref | |
428 | self._parts = {'header': '', 'footer': '', |
|
428 | self._parts = {'header': '', 'footer': '', | |
@@ -844,10 +844,11 b' def _graphnodeformatter(ui, displayer):' | |||||
844 | return templatekw.getgraphnode # fast path for "{graphnode}" |
|
844 | return templatekw.getgraphnode # fast path for "{graphnode}" | |
845 |
|
845 | |||
846 | spec = templater.unquotestring(spec) |
|
846 | spec = templater.unquotestring(spec) | |
847 | tres = formatter.templateresources(ui) |
|
|||
848 | if isinstance(displayer, changesettemplater): |
|
847 | if isinstance(displayer, changesettemplater): | |
849 | # reuse cache of slow templates |
|
848 | # reuse cache of slow templates | |
850 |
tres |
|
849 | tres = displayer._tresources | |
|
850 | else: | |||
|
851 | tres = formatter.templateresources(ui) | |||
851 | templ = formatter.maketemplater(ui, spec, defaults=templatekw.keywords, |
|
852 | templ = formatter.maketemplater(ui, spec, defaults=templatekw.keywords, | |
852 | resources=tres) |
|
853 | resources=tres) | |
853 | def formatnode(repo, ctx): |
|
854 | def formatnode(repo, ctx): |
General Comments 0
You need to be logged in to leave comments.
Login now