@@ -2009,11 +2009,11 @@ class queue(object):
self.added.append(patchname)
imported.append(patchname)
patchname = None
if rev and repo.ui.configbool('mq', 'secret', False):
# if we added anything with --rev, move the secret root
- phases.retractboundary(repo, phases.secret, [n])
+ phases.retractboundary(repo, tr, phases.secret, [n])
self.parseseries()
self.applieddirty = True
self.seriesdirty = True
tr.close()
finally:
@@ -704,16 +704,16 @@ def addchangegroup(repo, source, srctype
else:
# Those changesets have been pushed from the outside, their
# phases are going to be pushed alongside. Therefor
# `targetphase` is ignored.
phases.advanceboundary(repo, tr, phases.draft, srccontent)
- phases.retractboundary(repo, phases.draft, added)
+ phases.retractboundary(repo, tr, phases.draft, added)
elif srctype != 'strip':
# publishing only alter behavior during push
#
# strip should not touch boundary at all
- phases.retractboundary(repo, targetphase, added)
+ phases.retractboundary(repo, tr, targetphase, added)
# make changelog see real files again
cl.finalize(trp)
tr.close()
@@ -4583,11 +4583,11 @@ def phase(ui, repo, *revs, **opts):
raise util.Abort(_('empty revision set'))
nodes = [repo[r].node() for r in revs]
olddata = repo._phasecache.getphaserevs(repo)[:]
phases.advanceboundary(repo, tr, targetphase, nodes)
if opts['force']:
- phases.retractboundary(repo, targetphase, nodes)
+ phases.retractboundary(repo, tr, targetphase, nodes)
tr.close()
finally:
if tr is not None:
tr.release()
lock.release()
@@ -1440,11 +1440,11 @@ class localrepository(object):
# retract boundary do not alter parent changeset.
# if a parent have higher the resulting phase will
# be compliant anyway
#
# if minimal phase was 0 we don't need to retract anything
- phases.retractboundary(self, targetphase, [n])
+ phases.retractboundary(self, tr, targetphase, [n])
tr.close()
branchmap.updatecache(self.filtered('served'))
return n
finally:
if tr:
@@ -227,14 +227,14 @@ class phasecache(object):
self._updateroots(phase, roots)
# some roots may need to be declared for lower phases
delroots.extend(olds - roots)
# declare deleted root in the target phase
if targetphase != 0:
- self.retractboundary(repo, targetphase, delroots)
+ self.retractboundary(repo, tr, targetphase, delroots)
repo.invalidatevolatilesets()
- def retractboundary(self, repo, targetphase, nodes):
+ def retractboundary(self, repo, tr, targetphase, nodes):
# Be careful to preserve shallow-copied values: do not update
# phaseroots values, replace them.
repo = repo.unfiltered()
currentroots = self.phaseroots[targetphase]
@@ -287,20 +287,20 @@ def advanceboundary(repo, tr, targetphas
Simplify boundary to contains phase roots only."""
phcache = repo._phasecache.copy()
phcache.advanceboundary(repo, tr, targetphase, nodes)
repo._phasecache.replace(phcache)
-def retractboundary(repo, targetphase, nodes):
+def retractboundary(repo, tr, targetphase, nodes):
"""Set nodes back to a phase changing other nodes phases if
necessary.
This function move boundary *backward* this means that all nodes
are set in the target phase or kept in a *higher* phase.
Simplify boundary to contains phase roots only."""
phcache = repo._phasecache.copy()
- phcache.retractboundary(repo, targetphase, nodes)
+ phcache.retractboundary(repo, tr, targetphase, nodes)
repo._phasecache.replace(phcache)
def listphases(repo):
"""List phases root for serialization over pushkey"""
keys = {}