Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 16116:ce0ad184f489 stable
localrepo: clear _filecache on rollback (issue3261)
Files are being replaced by rollback but the corresponding data in localrepo
isn't actually updated for things like bookmarks, phases, etc. Then when
rollback is done, the cache is updated thinking it has the most up-to-date
data, where in fact it is still pre-rollback.
We clear _filecache to force everything to be recreated.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 16 Feb 2012 01:21:34 +0200 |
parents | 3f75fb837638 |
children | 004982e5d782 4546a8513dcd |
comparison
equal
deleted
inserted
replaced
16115:236bb604dc39 | 16116:ce0ad184f489 |
---|---|
1301 # XXX this is suboptimal when qrefresh'ing: we strip the current | 1301 # XXX this is suboptimal when qrefresh'ing: we strip the current |
1302 # head, refresh the tag cache, then immediately add a new head. | 1302 # head, refresh the tag cache, then immediately add a new head. |
1303 # But I think doing it this way is necessary for the "instant | 1303 # But I think doing it this way is necessary for the "instant |
1304 # tag cache retrieval" case to work. | 1304 # tag cache retrieval" case to work. |
1305 self.invalidatecaches() | 1305 self.invalidatecaches() |
1306 | |
1307 # Discard all cache entries to force reloading everything. | |
1308 self._filecache.clear() | |
1306 | 1309 |
1307 def walk(self, match, node=None): | 1310 def walk(self, match, node=None): |
1308 ''' | 1311 ''' |
1309 walk recursively through the directory tree or a given | 1312 walk recursively through the directory tree or a given |
1310 changeset, finding all files matched by the match | 1313 changeset, finding all files matched by the match |