mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
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.
This commit is contained in:
parent
e12b53d0bd
commit
e0ecf6ce0b
@ -1075,16 +1075,17 @@ class localrepository(object):
|
||||
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 @@ class localrepository(object):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user