localrepo: clear _filecache earlier to really force reloading (issue3462)
ce0ad184f489 attempted to force the filecaches in localrepo to reload
everything after a rollback. But simply clearing _filecache isn't enough,
invalidate() needs to be called before/after. localrepo._rollback calls
invalidate() already, so we clear the map right afterwards which ensures
everything will be reread.
--- a/mercurial/localrepo.py Wed May 30 14:31:29 2012 -0500
+++ b/mercurial/localrepo.py Tue May 29 18:27:12 2012 +0300
@@ -833,6 +833,9 @@
self.sjoin('phaseroots'))
self.invalidate()
+ # Discard all cache entries to force reloading everything.
+ self._filecache.clear()
+
parentgone = (parents[0] not in self.changelog.nodemap or
parents[1] not in self.changelog.nodemap)
if parentgone:
@@ -1316,9 +1319,6 @@
# 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