comparison mercurial/manifest.py @ 9416:eecbaac5ca88

manifestdict: remove unnecessary dictionary copy No need to copy the dict, dict.__init__() will do that for us. It was responsible for a non-negligeable waste of time during a qpush of an -mm queue on the kernel repo.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 03 Sep 2009 02:42:56 +0200
parents e0cc9fa2a576
children d0db168136dc
comparison
equal deleted inserted replaced
9415:e0cc9fa2a576 9416:eecbaac5ca88
18 def flags(self, f): 18 def flags(self, f):
19 return self._flags.get(f, "") 19 return self._flags.get(f, "")
20 def set(self, f, flags): 20 def set(self, f, flags):
21 self._flags[f] = flags 21 self._flags[f] = flags
22 def copy(self): 22 def copy(self):
23 return manifestdict(dict.copy(self), dict.copy(self._flags)) 23 return manifestdict(self, dict.copy(self._flags))
24 24
25 class manifest(revlog.revlog): 25 class manifest(revlog.revlog):
26 def __init__(self, opener): 26 def __init__(self, opener):
27 self._mancache = None 27 self._mancache = None
28 revlog.revlog.__init__(self, opener, "00manifest.i") 28 revlog.revlog.__init__(self, opener, "00manifest.i")