comparison mercurial/localrepo.py @ 50670:5d84b1385f7f

treemanifest: make `updatecaches` update the nodemaps for all directories Without this, if the cache for a nested directory is in a bad state, it's very hard to repair it.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 18 May 2023 19:23:59 +0100
parents 60f9602b413e
children 2aaabd8f4471
comparison
equal deleted inserted replaced
50669:3b56395404a1 50670:5d84b1385f7f
2934 if repository.CACHE_CHANGELOG_CACHE in caches: 2934 if repository.CACHE_CHANGELOG_CACHE in caches:
2935 self.changelog.update_caches(transaction=tr) 2935 self.changelog.update_caches(transaction=tr)
2936 2936
2937 if repository.CACHE_MANIFESTLOG_CACHE in caches: 2937 if repository.CACHE_MANIFESTLOG_CACHE in caches:
2938 self.manifestlog.update_caches(transaction=tr) 2938 self.manifestlog.update_caches(transaction=tr)
2939 for entry in self.store.walk():
2940 if not entry.is_revlog:
2941 continue
2942 if not entry.is_manifestlog:
2943 continue
2944 manifestrevlog = entry.get_revlog_instance(self).get_revlog()
2945 if manifestrevlog is not None:
2946 manifestrevlog.update_caches(transaction=tr)
2939 2947
2940 if repository.CACHE_REV_BRANCH in caches: 2948 if repository.CACHE_REV_BRANCH in caches:
2941 rbc = unfi.revbranchcache() 2949 rbc = unfi.revbranchcache()
2942 for r in unfi.changelog: 2950 for r in unfi.changelog:
2943 rbc.branchinfo(r) 2951 rbc.branchinfo(r)