# HG changeset patch # User Yuya Nishihara <y...@tcha.org> # Date 1522591438 -32400 # Sun Apr 01 23:03:58 2018 +0900 # Node ID 8bee5eca0b75333eee2c555663ae535005505991 # Parent 7b406ab5b3e9c3da9527a3001ba62e29506bd73a hgweb: make sessionvars class less dense
diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -655,12 +655,16 @@ class sessionvars(object): def __init__(self, vars, start='?'): self._start = start self._vars = vars + def __getitem__(self, key): return self._vars[key] + def __setitem__(self, key, value): self._vars[key] = value + def __copy__(self): return sessionvars(copy.copy(self._vars), self._start) + def __iter__(self): separator = self._start for key, value in sorted(self._vars.iteritems()): _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel