Patchwork [2,of,3,fix-default] phase: invalidate the phase's set cache alongside the revs

login
register
mail settings
Submitter Pierre-Yves David
Date June 15, 2015, 11:23 p.m.
Message ID <1195b5176c10a267c3e2.1434410594@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9655/
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 1434409067 25200
#      Mon Jun 15 15:57:47 2015 -0700
# Node ID 1195b5176c10a267c3e27bca8afd0ac7067cb4e9
# Parent  8f43bb4a6054c68cd41e7b3e04c9f564ca1e5ac1
phase: invalidate the phase's set cache alongside the revs

Invalidate was leaving set data around leading to possible bugs in revset.

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -207,10 +207,11 @@  class phasecache(object):
                 self._computephaserevspure(repo)
         return self._phaserevs
 
     def invalidate(self):
         self._phaserevs = None
+        self._phasesets = None
 
     def _populatephaseroots(self, repo):
         """Fills the _phaserevs cache with phases for the roots.
         """
         cl = repo.changelog