equal
deleted
inserted
replaced
998 if os.path.exists(self.sjoin('undo.phaseroots')): |
998 if os.path.exists(self.sjoin('undo.phaseroots')): |
999 util.rename(self.sjoin('undo.phaseroots'), |
999 util.rename(self.sjoin('undo.phaseroots'), |
1000 self.sjoin('phaseroots')) |
1000 self.sjoin('phaseroots')) |
1001 self.invalidate() |
1001 self.invalidate() |
1002 |
1002 |
|
1003 # Discard all cache entries to force reloading everything. |
|
1004 self._filecache.clear() |
|
1005 |
1003 parentgone = (parents[0] not in self.changelog.nodemap or |
1006 parentgone = (parents[0] not in self.changelog.nodemap or |
1004 parents[1] not in self.changelog.nodemap) |
1007 parents[1] not in self.changelog.nodemap) |
1005 if parentgone: |
1008 if parentgone: |
1006 util.rename(self.join('undo.dirstate'), self.join('dirstate')) |
1009 util.rename(self.join('undo.dirstate'), self.join('dirstate')) |
1007 try: |
1010 try: |
1064 try: |
1067 try: |
1065 delattr(self, k) |
1068 delattr(self, k) |
1066 except AttributeError: |
1069 except AttributeError: |
1067 pass |
1070 pass |
1068 self.invalidatecaches() |
1071 self.invalidatecaches() |
1069 |
|
1070 # Discard all cache entries to force reloading everything. |
|
1071 self._filecache.clear() |
|
1072 |
1072 |
1073 def _lock(self, lockname, wait, releasefn, acquirefn, desc): |
1073 def _lock(self, lockname, wait, releasefn, acquirefn, desc): |
1074 try: |
1074 try: |
1075 l = lock.lock(lockname, 0, releasefn, desc=desc) |
1075 l = lock.lock(lockname, 0, releasefn, desc=desc) |
1076 except error.LockHeld, inst: |
1076 except error.LockHeld, inst: |
1500 # XXX this is suboptimal when qrefresh'ing: we strip the current |
1500 # XXX this is suboptimal when qrefresh'ing: we strip the current |
1501 # head, refresh the tag cache, then immediately add a new head. |
1501 # head, refresh the tag cache, then immediately add a new head. |
1502 # But I think doing it this way is necessary for the "instant |
1502 # But I think doing it this way is necessary for the "instant |
1503 # tag cache retrieval" case to work. |
1503 # tag cache retrieval" case to work. |
1504 self.invalidatecaches() |
1504 self.invalidatecaches() |
|
1505 |
|
1506 # Discard all cache entries to force reloading everything. |
|
1507 self._filecache.clear() |
1505 |
1508 |
1506 def walk(self, match, node=None): |
1509 def walk(self, match, node=None): |
1507 ''' |
1510 ''' |
1508 walk recursively through the directory tree or a given |
1511 walk recursively through the directory tree or a given |
1509 changeset, finding all files matched by the match |
1512 changeset, finding all files matched by the match |