comparison mercurial/templateutil.py @ 44590:e3e44e6e7245

templater: fix cbor() filter to accept smartset So the wrapper type can return a bare smartset.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 15 Mar 2020 22:01:38 +0900
parents fc1fa3a07af6
children 1f81f680912f
comparison
equal deleted inserted replaced
44589:fc1fa3a07af6 44590:e3e44e6e7245
472 472
473 def tobool(self, context, mapping): 473 def tobool(self, context, mapping):
474 return bool(self._revs) 474 return bool(self._revs)
475 475
476 def tovalue(self, context, mapping): 476 def tovalue(self, context, mapping):
477 return list(self._revs) 477 return self._revs
478 478
479 479
480 class _mappingsequence(wrapped): 480 class _mappingsequence(wrapped):
481 """Wrapper for sequence of template mappings 481 """Wrapper for sequence of template mappings
482 482