# HG changeset patch # User Pierre-Yves David # Date 2011-12-19 10:29:39 # Node ID 1b9dcf2eb011a5fe6279f469b56e992cef2d6d8b # Parent 1e4e49c58b94243a09c1facfe0e860dac5209ac4 phases: fix advanceboundary behavior when targetphase !=0 Changeset was properly removed from upper phase but was not explicitly added to target phase. If advanced changesets had not pwasnt in target phase they was considered public (0-phase). diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -153,6 +153,7 @@ def advanceboundary(repo, targetphase, n in the target phase or kept in a *lower* phase. Simplify boundary to contains phase roots only.""" + delroots = [] # set of root deleted by this path for phase in xrange(targetphase + 1, len(allphases)): # filter nodes that are not in a compatible phase already # XXX rev phase cache might have been invalidated by a previous loop @@ -170,6 +171,12 @@ def advanceboundary(repo, targetphase, n if '_phaserev' in vars(repo): del repo._phaserev repo._dirtyphases = True + # some roots may need to be declared for lower phases + delroots.extend(olds - roots) + # declare deleted root in the target phase + if targetphase != 0: + retractboundary(repo, targetphase, delroots) + def retractboundary(repo, targetphase, nodes): """Set nodes back to a phase changing other nodes phases if necessary.