changeset 17997:6089956e9880

clfilter: ensure cache invalidation is done on the main unfiltered repo The proxy version will not hold any cache for now. But we have to ensure all cache operations are done on the unfiltered version.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Mon, 26 Nov 2012 19:22:12 +0100
parents b3af182a1944
children ec4c855d2033
files mercurial/localrepo.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Nov 26 19:26:24 2012 +0100
+++ b/mercurial/localrepo.py	Mon Nov 26 19:22:12 2012 +0100
@@ -1075,16 +1075,17 @@
                     delattr(self.dirstate, k)
                 except AttributeError:
                     pass
-            delattr(self, 'dirstate')
+            delattr(self.unfiltered(), 'dirstate')
 
     def invalidate(self):
+        unfiltered = self.unfiltered() # all filecaches are stored on unfiltered
         for k in self._filecache:
             # dirstate is invalidated separately in invalidatedirstate()
             if k == 'dirstate':
                 continue
 
             try:
-                delattr(self, k)
+                delattr(unfiltered, k)
             except AttributeError:
                 pass
         self.invalidatecaches()
@@ -1489,6 +1490,7 @@
                 tr.release()
             lock.release()
 
+    @unfilteredmeth
     def destroyed(self, newheadnodes=None):
         '''Inform the repository that nodes have been destroyed.
         Intended for use by strip and rollback, so there's a common