Show More
@@ -219,13 +219,13 b' class dirstatemap(object):' | |||||
219 | # backup the previous state |
|
219 | # backup the previous state | |
220 | if entry.merged: # merge |
|
220 | if entry.merged: # merge | |
221 | size = NONNORMAL |
|
221 | size = NONNORMAL | |
222 |
elif |
|
222 | elif entry.from_p2: | |
223 | size = FROM_P2 |
|
223 | size = FROM_P2 | |
224 | self.otherparentset.add(f) |
|
224 | self.otherparentset.add(f) | |
225 | if size == 0: |
|
225 | if size == 0: | |
226 | self.copymap.pop(f, None) |
|
226 | self.copymap.pop(f, None) | |
227 |
|
227 | |||
228 |
if entry is not None and entry |
|
228 | if entry is not None and not entry.removed and "_dirs" in self.__dict__: | |
229 | self._dirs.delpath(f) |
|
229 | self._dirs.delpath(f) | |
230 | if entry is None and "_alldirs" in self.__dict__: |
|
230 | if entry is None and "_alldirs" in self.__dict__: | |
231 | self._alldirs.addpath(f) |
|
231 | self._alldirs.addpath(f) | |
@@ -260,8 +260,10 b' class dirstatemap(object):' | |||||
260 | def clearambiguoustimes(self, files, now): |
|
260 | def clearambiguoustimes(self, files, now): | |
261 | for f in files: |
|
261 | for f in files: | |
262 | e = self.get(f) |
|
262 | e = self.get(f) | |
263 |
if e is not None and e |
|
263 | if e is not None and e.need_delay(now): | |
264 |
self._map[f] = DirstateItem( |
|
264 | self._map[f] = DirstateItem( | |
|
265 | e.state, e.mode, e.size, AMBIGUOUS_TIME | |||
|
266 | ) | |||
265 | self.nonnormalset.add(f) |
|
267 | self.nonnormalset.add(f) | |
266 |
|
268 | |||
267 | def nonnormalentries(self): |
|
269 | def nonnormalentries(self): | |
@@ -272,9 +274,9 b' class dirstatemap(object):' | |||||
272 | nonnorm = set() |
|
274 | nonnorm = set() | |
273 | otherparent = set() |
|
275 | otherparent = set() | |
274 | for fname, e in pycompat.iteritems(self._map): |
|
276 | for fname, e in pycompat.iteritems(self._map): | |
275 |
if e |
|
277 | if e.state != b'n' or e.mtime == AMBIGUOUS_TIME: | |
276 | nonnorm.add(fname) |
|
278 | nonnorm.add(fname) | |
277 | if e[0] == b'n' and e[2] == FROM_P2: |
|
279 | if e.from_p2: | |
278 | otherparent.add(fname) |
|
280 | otherparent.add(fname) | |
279 | return nonnorm, otherparent |
|
281 | return nonnorm, otherparent | |
280 |
|
282 | |||
@@ -295,7 +297,7 b' class dirstatemap(object):' | |||||
295 | f = {} |
|
297 | f = {} | |
296 | normcase = util.normcase |
|
298 | normcase = util.normcase | |
297 | for name, s in pycompat.iteritems(self._map): |
|
299 | for name, s in pycompat.iteritems(self._map): | |
298 |
if s |
|
300 | if not s.removed: | |
299 | f[normcase(name)] = name |
|
301 | f[normcase(name)] = name | |
300 | f[b'.'] = b'.' # prevents useless util.fspath() invocation |
|
302 | f[b'.'] = b'.' # prevents useless util.fspath() invocation | |
301 | return f |
|
303 | return f |
General Comments 0
You need to be logged in to leave comments.
Login now