# HG changeset patch # User Pierre-Yves David # Date 2024-01-08 14:11:34 # Node ID c0d51565b501c216b431302c035588b9f34b7952 # Parent 19b2736c8e45290aab1271b87c0bce9b5ac45ccb branchcache: unconditionally write delayed branchmap diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2927,8 +2927,6 @@ class localrepository: 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 @@ class localrepository: 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