branchcache: do not copy the `_dirty` flag
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 08 Mar 2024 16:49:06 +0100
changeset 51491 dd5b5f99940d
parent 51490 18c2753434f2
child 51492 2e8a88e5809f
branchcache: do not copy the `_dirty` flag If the inherited branch cache is dirty, it will be written on disk, and the super-set did not need to modify it, the on disk value for the subset will be re-useable as is. So the super set does not needs to write the very same content itself.
mercurial/branchmap.py
--- a/mercurial/branchmap.py	Fri Mar 08 16:52:08 2024 +0100
+++ b/mercurial/branchmap.py	Fri Mar 08 16:49:06 2024 +0100
@@ -569,9 +569,6 @@
             closednodes=set(self._closednodes),
             verify_node=self._verify_node,
         )
-        # we copy will likely schedule a write anyway, but that does not seems
-        # to hurt to overschedule
-        other._dirty = self._dirty
         # also copy information about the current verification state
         other._verifiedbranches = set(self._verifiedbranches)
         return other