Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webutil.py @ 38453:dae829b4de78
templater: introduce filter() function to remove empty items from list
The primary use case is to filter out "tip" from a list of tags.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 14 Jun 2018 22:33:26 +0900 |
parents | f9c426385853 |
children | 67dc32d4e790 |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Sun Jun 17 16:10:38 2018 +0900 +++ b/mercurial/hgweb/webutil.py Thu Jun 14 22:33:26 2018 +0900 @@ -727,6 +727,10 @@ def getmax(self, context, mapping): raise error.ParseError(_('not comparable')) + def filter(self, context, mapping, select): + # implement if necessary + raise error.ParseError(_('not filterable')) + def itermaps(self, context): separator = self._start for key, value in sorted(self._vars.iteritems()):