Mercurial > hg-stable
changeset 15695:1b9dcf2eb011
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).
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 19 Dec 2011 11:29:39 +0100 |
parents | 1e4e49c58b94 |
children | 0cb45fef99ba |
files | mercurial/phases.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/phases.py Sun Dec 18 23:15:12 2011 +0100 +++ b/mercurial/phases.py Mon Dec 19 11:29:39 2011 +0100 @@ -153,6 +153,7 @@ 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 @@ 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.