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

login
register
mail settings
Submitter Pierre-Yves David
Date June 15, 2015, 11:23 p.m.
Message ID <a6acccd9220ffe302ff1.1434410595@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9656/
State Accepted
Headers show

Comments

Pierre-Yves David - June 15, 2015, 11:23 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.
Matt Mackall - June 16, 2015, 10:58 p.m.
On Mon, 2015-06-15 at 16:23 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@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

These are queued for default, thanks.

Patch

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 = []