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