Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 48363:8e5effbf52d0 stable
branchmap: stop writing cache for uncommitted data
If we are about to write the branch while a transaction is active. we delay
that write. After the transaction is closed, we flush all the write we delayed
(unless they have been written in between).
Differential Revision: https://phab.mercurial-scm.org/D12128
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 01 Feb 2022 15:19:50 +0100 |
parents | f7086f6173f8 |
children | e845537f6adb |
line wrap: on
line diff
--- 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)