# HG changeset patch # User Pierre-Yves David # Date 2024-02-22 23:01:33 # Node ID c9c017b344643bc78d862939e94e029c3b85c564 # Parent e0d3294917091a196af5b6977c84378ea467f553 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. diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -471,7 +471,10 @@ class phasecache: 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):