diff -r 80f423a14c90 -r fb874fc1d9b4 mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py Wed Mar 21 12:06:18 2018 +0900 +++ b/mercurial/hgweb/webutil.py Mon Mar 19 00:23:20 2018 +0900 @@ -713,6 +713,10 @@ def __copy__(self): return sessionvars(copy.copy(self._vars), self._start) + def contains(self, context, mapping, item): + item = templateutil.unwrapvalue(context, mapping, item) + return item in self._vars + def getmember(self, context, mapping, key): key = templateutil.unwrapvalue(context, mapping, key) return self._vars.get(key)