branchcache: unconditionally write delayed branchmap
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 08 Jan 2024 15:11:34 +0100
changeset 51457 c0d51565b501
parent 51456 19b2736c8e45
child 51458 ec8c1d0f6d48
branchcache: unconditionally write delayed branchmap
mercurial/localrepo.py
--- 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