Show More
@@ -155,6 +155,17 b' class dirstatemap(object):' | |||
|
155 | 155 | if old_entry is None and "_alldirs" in self.__dict__: |
|
156 | 156 | self._alldirs.addpath(filename) |
|
157 | 157 | |
|
158 | def _dirs_decr(self, filename, old_entry=None): | |
|
159 | """decremente the dirstate counter if applicable""" | |
|
160 | if old_entry is not None: | |
|
161 | if "_dirs" in self.__dict__ and not old_entry.removed: | |
|
162 | self._dirs.delpath(filename) | |
|
163 | if "_alldirs" in self.__dict__: | |
|
164 | self._alldirs.delpath(filename) | |
|
165 | if "filefoldmap" in self.__dict__: | |
|
166 | normed = util.normcase(filename) | |
|
167 | self.filefoldmap.pop(normed, None) | |
|
168 | ||
|
158 | 169 | def addfile( |
|
159 | 170 | self, |
|
160 | 171 | f, |
@@ -247,21 +258,9 b' class dirstatemap(object):' | |||
|
247 | 258 | previously recorded. |
|
248 | 259 | """ |
|
249 | 260 | old_entry = self._map.pop(f, None) |
|
250 | exists = False | |
|
251 | oldstate = b'?' | |
|
252 | if old_entry is not None: | |
|
253 | exists = True | |
|
254 | oldstate = old_entry.state | |
|
255 | if exists: | |
|
256 | if oldstate != b"r" and "_dirs" in self.__dict__: | |
|
257 | self._dirs.delpath(f) | |
|
258 | if "_alldirs" in self.__dict__: | |
|
259 | self._alldirs.delpath(f) | |
|
260 | if "filefoldmap" in self.__dict__: | |
|
261 | normed = util.normcase(f) | |
|
262 | self.filefoldmap.pop(normed, None) | |
|
261 | self._dirs_decr(f, old_entry=old_entry) | |
|
263 | 262 | self.nonnormalset.discard(f) |
|
264 |
return |
|
|
263 | return old_entry is not None | |
|
265 | 264 | |
|
266 | 265 | def clearambiguoustimes(self, files, now): |
|
267 | 266 | for f in files: |
General Comments 0
You need to be logged in to leave comments.
Login now