Mercurial > hg
comparison mercurial/formatter.py @ 37102:638a241202a3
templater: add hook point to populate additional mapping items
The 'revcache' dict will be inserted by this hook.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 15 Mar 2018 21:49:33 +0900 |
parents | 46859b437697 |
children | be3f33f5e232 |
comparison
equal
deleted
inserted
replaced
37101:656ac240f392 | 37102:638a241202a3 |
---|---|
515 get = self._gettermap.get(key) | 515 get = self._gettermap.get(key) |
516 if not get: | 516 if not get: |
517 return None | 517 return None |
518 return get(self, context, mapping, key) | 518 return get(self, context, mapping, key) |
519 | 519 |
520 def populatemap(self, context, origmapping, newmapping): | |
521 return {} | |
522 | |
520 def _getsome(self, context, mapping, key): | 523 def _getsome(self, context, mapping, key): |
521 v = mapping.get(key) | 524 v = mapping.get(key) |
522 if v is not None: | 525 if v is not None: |
523 return v | 526 return v |
524 return self._resmap.get(key) | 527 return self._resmap.get(key) |