Mercurial > hg
comparison mercurial/localrepo.py @ 18313:3e4a944c0d04
destroyed: keep the filecache in sync with __dict__ (issue3335) (issue3693) (issue3743)
We need to make sure that if X is in the filecache then it's also in the
filecache owner's __dict__, otherwise it will go out of sync:
repo.X # first access to X, records stat info in
# filecache and updates __dict__
repo._filecache.clear() # removes X from _filecache but it's still in __dict__
repo.invalidate() # iterates over _filecache and removes entries
# from __dict__, but X isn't in _filecache, so
# it's kept in __dict__
repo.X # X is fetched from __dict__, bypassing the filecache
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Wed, 09 Jan 2013 20:37:44 +0200 |
parents | 7331ee72f99c |
children | 3c3855470b19 |
comparison
equal
deleted
inserted
replaced
18312:7331ee72f99c | 18313:3e4a944c0d04 |
---|---|
1445 | 1445 |
1446 # XXX this is suboptimal when qrefresh'ing: we strip the current | 1446 # XXX this is suboptimal when qrefresh'ing: we strip the current |
1447 # head, refresh the tag cache, then immediately add a new head. | 1447 # head, refresh the tag cache, then immediately add a new head. |
1448 # But I think doing it this way is necessary for the "instant | 1448 # But I think doing it this way is necessary for the "instant |
1449 # tag cache retrieval" case to work. | 1449 # tag cache retrieval" case to work. |
1450 self.invalidatecaches() | 1450 self.invalidate() |
1451 | |
1452 # Discard all cache entries to force reloading everything. | |
1453 self._filecache.clear() | |
1454 | 1451 |
1455 def walk(self, match, node=None): | 1452 def walk(self, match, node=None): |
1456 ''' | 1453 ''' |
1457 walk recursively through the directory tree or a given | 1454 walk recursively through the directory tree or a given |
1458 changeset, finding all files matched by the match | 1455 changeset, finding all files matched by the match |