[PATCH 3 of 3 fix-default] phase: also overwrite phase's sets when replacing a phasecache

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Jun 15 18:23:15 CDT 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1434409702 25200
#      Mon Jun 15 16:08:22 2015 -0700
# Node ID a6acccd9220ffe302ff15aefc32b60ad6c3baf1f
# Parent  1195b5176c10a267c3e27bca8afd0ac7067cb4e9
phase: also overwrite phase's sets when replacing a phasecache

We need to copy this new attributes around too. This fix an issue where phases
data used by 'not public()' were not invalidated properly.

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -169,11 +169,11 @@ class phasecache(object):
         ph._phaserevs = self._phaserevs
         ph._phasesets = self._phasesets
         return ph
 
     def replace(self, phcache):
-        for a in 'phaseroots dirty opener _phaserevs'.split():
+        for a in 'phaseroots dirty opener _phaserevs _phasesets'.split():
             setattr(self, a, getattr(phcache, a))
 
     def _getphaserevsnative(self, repo):
         repo = repo.unfiltered()
         nativeroots = []


More information about the Mercurial-devel mailing list