##// END OF EJS Templates
hgweb: make sessionvars class less dense
Yuya Nishihara -
r37713:570a4426 default
parent child Browse files
Show More
@@ -655,12 +655,16 b' class sessionvars(object):'
655 def __init__(self, vars, start='?'):
655 def __init__(self, vars, start='?'):
656 self._start = start
656 self._start = start
657 self._vars = vars
657 self._vars = vars
658
658 def __getitem__(self, key):
659 def __getitem__(self, key):
659 return self._vars[key]
660 return self._vars[key]
661
660 def __setitem__(self, key, value):
662 def __setitem__(self, key, value):
661 self._vars[key] = value
663 self._vars[key] = value
664
662 def __copy__(self):
665 def __copy__(self):
663 return sessionvars(copy.copy(self._vars), self._start)
666 return sessionvars(copy.copy(self._vars), self._start)
667
664 def __iter__(self):
668 def __iter__(self):
665 separator = self._start
669 separator = self._start
666 for key, value in sorted(self._vars.iteritems()):
670 for key, value in sorted(self._vars.iteritems()):
General Comments 0
You need to be logged in to leave comments. Login now