Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webutil.py @ 38277:41ae9b3cbfb9
templater: abstract min/max away
I'm not certain how many get*() functions I'll add to the wrapped types,
but getmin() and getmax() will allow us to optimize a revset wrapper.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 19 Mar 2018 00:16:12 +0900 |
parents | 688fbb758ba9 |
children | fb874fc1d9b4 |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Sun Jun 10 12:24:53 2018 +0900 +++ b/mercurial/hgweb/webutil.py Mon Mar 19 00:16:12 2018 +0900 @@ -717,6 +717,12 @@ key = templateutil.unwrapvalue(context, mapping, key) return self._vars.get(key) + def getmin(self, context, mapping): + raise error.ParseError(_('not comparable')) + + def getmax(self, context, mapping): + raise error.ParseError(_('not comparable')) + def itermaps(self, context): separator = self._start for key, value in sorted(self._vars.iteritems()):