diff -r 3f618484eeb6 -r 8e5effbf52d0 mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Jan 31 19:28:58 2022 +0100 +++ b/mercurial/localrepo.py Tue Feb 01 15:19:50 2022 +0100 @@ -2830,6 +2830,8 @@ 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)