Show More
@@ -89,6 +89,7 b' class dirstate(object):' | |||
|
89 | 89 | self._pendingfilename = '%s.pending' % self._filename |
|
90 | 90 | self._plchangecallbacks = {} |
|
91 | 91 | self._origpl = None |
|
92 | self._updatedfiles = set() | |
|
92 | 93 | |
|
93 | 94 | # for consistent view between _pl() and _read() invocations |
|
94 | 95 | self._pendingmode = None |
@@ -431,6 +432,7 b' class dirstate(object):' | |||
|
431 | 432 | delattr(self, a) |
|
432 | 433 | self._lastnormaltime = 0 |
|
433 | 434 | self._dirty = False |
|
435 | self._updatedfiles.clear() | |
|
434 | 436 | self._parentwriters = 0 |
|
435 | 437 | self._origpl = None |
|
436 | 438 | |
@@ -441,8 +443,11 b' class dirstate(object):' | |||
|
441 | 443 | self._dirty = True |
|
442 | 444 | if source is not None: |
|
443 | 445 | self._copymap[dest] = source |
|
446 | self._updatedfiles.add(source) | |
|
447 | self._updatedfiles.add(dest) | |
|
444 | 448 | elif dest in self._copymap: |
|
445 | 449 | del self._copymap[dest] |
|
450 | self._updatedfiles.add(dest) | |
|
446 | 451 | |
|
447 | 452 | def copied(self, file): |
|
448 | 453 | return self._copymap.get(file, None) |
@@ -459,6 +464,8 b' class dirstate(object):' | |||
|
459 | 464 | if normed in self._filefoldmap: |
|
460 | 465 | del self._filefoldmap[normed] |
|
461 | 466 | |
|
467 | self._updatedfiles.add(f) | |
|
468 | ||
|
462 | 469 | def _addpath(self, f, state, mode, size, mtime): |
|
463 | 470 | oldstate = self[f] |
|
464 | 471 | if state == 'a' or oldstate == 'r': |
@@ -475,6 +482,7 b' class dirstate(object):' | |||
|
475 | 482 | if oldstate in "?r" and "_dirs" in self.__dict__: |
|
476 | 483 | self._dirs.addpath(f) |
|
477 | 484 | self._dirty = True |
|
485 | self._updatedfiles.add(f) | |
|
478 | 486 | self._map[f] = dirstatetuple(state, mode, size, mtime) |
|
479 | 487 | if state != 'n' or mtime == -1: |
|
480 | 488 | self._nonnormalset.add(f) |
@@ -656,6 +664,7 b' class dirstate(object):' | |||
|
656 | 664 | self._copymap = {} |
|
657 | 665 | self._pl = [nullid, nullid] |
|
658 | 666 | self._lastnormaltime = 0 |
|
667 | self._updatedfiles.clear() | |
|
659 | 668 | self._dirty = True |
|
660 | 669 | |
|
661 | 670 | def rebuild(self, parent, allfiles, changedfiles=None): |
@@ -692,13 +701,15 b' class dirstate(object):' | |||
|
692 | 701 | # emulate dropping timestamp in 'parsers.pack_dirstate' |
|
693 | 702 | now = _getfsnow(self._opener) |
|
694 | 703 | dmap = self._map |
|
695 |
for f |
|
|
696 | if e[0] == 'n' and e[3] == now: | |
|
704 | for f in self._updatedfiles: | |
|
705 | e = dmap.get(f) | |
|
706 | if e is not None and e[0] == 'n' and e[3] == now: | |
|
697 | 707 | dmap[f] = dirstatetuple(e[0], e[1], e[2], -1) |
|
698 | 708 | self._nonnormalset.add(f) |
|
699 | 709 | |
|
700 | 710 | # emulate that all 'dirstate.normal' results are written out |
|
701 | 711 | self._lastnormaltime = 0 |
|
712 | self._updatedfiles.clear() | |
|
702 | 713 | |
|
703 | 714 | # delay writing in-memory changes out |
|
704 | 715 | tr.addfilegenerator('dirstate', (self._filename,), |
General Comments 0
You need to be logged in to leave comments.
Login now