Show More
@@ -567,10 +567,9 b' class templateresources(templater.resour' | |||
|
567 | 567 | |
|
568 | 568 | def populatemap(self, context, origmapping, newmapping): |
|
569 | 569 | mapping = {} |
|
570 |
if self._hasc |
|
|
570 | if self._hasnodespec(newmapping): | |
|
571 | 571 | mapping['revcache'] = {} # per-ctx cache |
|
572 | if (('node' in origmapping or self._hasctx(origmapping)) | |
|
573 | and ('node' in newmapping or self._hasctx(newmapping))): | |
|
572 | if self._hasnodespec(origmapping) and self._hasnodespec(newmapping): | |
|
574 | 573 | orignode = templateutil.runsymbol(context, origmapping, 'node') |
|
575 | 574 | mapping['originalnode'] = orignode |
|
576 | 575 | return mapping |
@@ -581,8 +580,9 b' class templateresources(templater.resour' | |||
|
581 | 580 | return v |
|
582 | 581 | return self._resmap.get(key) |
|
583 | 582 | |
|
584 |
def _hasc |
|
|
585 | return 'ctx' in mapping | |
|
583 | def _hasnodespec(self, mapping): | |
|
584 | """Test if context revision is set or unset in the given mapping""" | |
|
585 | return 'node' in mapping or 'ctx' in mapping | |
|
586 | 586 | |
|
587 | 587 | def formatter(ui, out, topic, opts): |
|
588 | 588 | template = opts.get("template", "") |
General Comments 0
You need to be logged in to leave comments.
Login now