Mercurial > hg-stable
changeset 10868:1b82ab3c7194
merge with stable
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 06 Apr 2010 15:40:46 +0200 |
parents | aeae527c6ac7 (current diff) 532138ba8a06 (diff) |
children | 2d57be56c500 |
files | |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue Apr 06 15:40:00 2010 +0200 +++ b/mercurial/dirstate.py Tue Apr 06 15:40:46 2010 +0200 @@ -391,8 +391,13 @@ # use the modification time of the newly created temporary file as the # filesystem's notion of 'now' now = int(util.fstat(st).st_mtime) - for f in self._map.keys(): - e = self._map[f] + + cs = cStringIO.StringIO() + copymap = self._copymap + pack = struct.pack + write = cs.write + write("".join(self._pl)) + for f, e in self._map.iteritems(): if e[0] == 'n' and e[3] == now: # The file was last modified "simultaneously" with the current # write to dirstate (i.e. within the same second for file- @@ -403,14 +408,9 @@ # dirstate, forcing future 'status' calls to compare the # contents of the file. This prevents mistakenly treating such # files as clean. - self._map[f] = (e[0], 0, -1, -1) # mark entry as 'unset' + e = (e[0], 0, -1, -1) # mark entry as 'unset' + self._map[f] = e - cs = cStringIO.StringIO() - copymap = self._copymap - pack = struct.pack - write = cs.write - write("".join(self._pl)) - for f, e in self._map.iteritems(): if f in copymap: f = "%s\0%s" % (f, copymap[f]) e = pack(_format, e[0], e[1], e[2], e[3], len(f))