changeset 51418:c9c017b34464

phasees: properly shallow caopy the phase sets dictionary We are about to increments the set more incrementally in some case, so we need to make a proper shallow copy of it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 23 Feb 2024 00:01:33 +0100
parents e0d329491709
children e57d4b868a3e
files mercurial/phases.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/phases.py	Wed Feb 21 14:42:13 2024 +0100
+++ b/mercurial/phases.py	Fri Feb 23 00:01:33 2024 +0100
@@ -471,7 +471,10 @@
         ph._phaseroots = self._phaseroots.copy()
         ph.dirty = self.dirty
         ph._loadedrevslen = self._loadedrevslen
-        ph._phasesets = self._phasesets
+        if self._phasesets is None:
+            ph._phasesets = None
+        else:
+            ph._phasesets = self._phasesets.copy()
         return ph
 
     def replace(self, phcache):