# HG changeset patch # User Matt Mackall # Date 2012-06-02 04:44:10 # Node ID 357e6bcfb61973478bfbe4cf5652026a6bda7ef7 # Parent 6403fdd716fe64939b6606ec25e636a517cc56fd 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. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -838,9 +838,6 @@ class localrepository(repo.repository): 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 @@ class localrepository(repo.repository): 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)