Mercurial > hg
comparison mercurial/formatter.py @ 38446:5b04a0c30f3f
formatter: look for template symbols from the associated name
Otherwise symbolsused() would fail if a named template is specified with -T.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 18 Jun 2018 21:58:04 +0900 |
parents | 8399438bc7ef |
children | 28f974d83c0a |
comparison
equal
deleted
inserted
replaced
38445:afa96dd5a483 | 38446:5b04a0c30f3f |
---|---|
418 ref = self._parts[part] | 418 ref = self._parts[part] |
419 self._out.write(self._t.render(ref, item)) | 419 self._out.write(self._t.render(ref, item)) |
420 | 420 |
421 @util.propertycache | 421 @util.propertycache |
422 def _symbolsused(self): | 422 def _symbolsused(self): |
423 return self._t.symbolsuseddefault() | 423 return self._t.symbolsused(self._tref) |
424 | 424 |
425 def contexthint(self, datafields): | 425 def contexthint(self, datafields): |
426 '''set of context object keys to be required by the template, given | 426 '''set of context object keys to be required by the template, given |
427 datafields overridden by immediate values''' | 427 datafields overridden by immediate values''' |
428 requires = set() | 428 requires = set() |