diff 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
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Feb 15 20:02:35 2012 +0200
+++ b/mercurial/localrepo.py	Thu Feb 16 01:21:34 2012 +0200
@@ -1304,6 +1304,9 @@
         # tag cache retrieval" case to work.
         self.invalidatecaches()
 
+        # Discard all cache entries to force reloading everything.
+        self._filecache.clear()
+
     def walk(self, match, node=None):
         '''
         walk recursively through the directory tree or a given