changeset 51522:c0d51565b501

branchcache: unconditionally write delayed branchmap
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 08 Jan 2024 15:11:34 +0100
parents 19b2736c8e45
children ec8c1d0f6d48
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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