--- a/mercurial/localrepo.py Sun Feb 25 16:14:15 2024 +0100
+++ b/mercurial/localrepo.py Mon Jan 08 15:11:34 2024 +0100
@@ -2927,8 +2927,6 @@
self.ui.debug(b'updating the branch cache\n')
self.filtered(b'served').branchmap()
self.filtered(b'served.hidden').branchmap()
- # flush all possibly delayed write.
- self._branchcaches.write_delayed(self)
if repository.CACHE_CHANGELOG_CACHE in caches:
self.changelog.update_caches(transaction=tr)
@@ -2975,6 +2973,9 @@
filtered = self.filtered(filt)
self._branchcaches.update_disk(filtered)
+ # flush all possibly delayed write.
+ self._branchcaches.write_delayed(self)
+
def invalidatecaches(self):
if '_tagscache' in vars(self):
# can't use delattr on proxy