Patchwork [1,of,3,fix-default] phase: also copy phase's sets when copying phase cache

login
register
mail settings
Submitter Pierre-Yves David
Date June 15, 2015, 11:23 p.m.
Message ID <8f43bb4a6054c68cd41e.1434410593@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9654/
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 1434408772 25200
#      Mon Jun 15 15:52:52 2015 -0700
# Node ID 8f43bb4a6054c68cd41e7b3e04c9f564ca1e5ac1
# Parent  2b2108c35bfca8d553602b8e3f765f36b2c97a41
phase: also copy phase's sets when copying phase cache

We forgot to add such copy when we added the attributes.

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -165,10 +165,11 @@  class phasecache(object):
         ph = self.__class__(None, None, _load=False)
         ph.phaseroots = self.phaseroots[:]
         ph.dirty = self.dirty
         ph.opener = self.opener
         ph._phaserevs = self._phaserevs
+        ph._phasesets = self._phasesets
         return ph
 
     def replace(self, phcache):
         for a in 'phaseroots dirty opener _phaserevs'.split():
             setattr(self, a, getattr(phcache, a))