changeset 16830:357e6bcfb619

localrepo: move filecache clearing into invalidate Moving from self.destroy to _rollback fixed rollback fixed rollback but broke mq. Move it lower rather than sideways.
author Matt Mackall <mpm@selenic.com>
date Fri, 01 Jun 2012 23:44:10 -0500
parents 6403fdd716fe
children 7b460b49bf7b
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Jun 01 23:42:27 2012 -0500
+++ b/mercurial/localrepo.py	Fri Jun 01 23:44:10 2012 -0500
@@ -838,9 +838,6 @@
                         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:
@@ -905,6 +902,9 @@
                 pass
         self.invalidatecaches()
 
+        # Discard all cache entries to force reloading everything.
+        self._filecache.clear()
+
     def _lock(self, lockname, wait, releasefn, acquirefn, desc):
         try:
             l = lock.lock(lockname, 0, releasefn, desc=desc)