##// END OF EJS Templates
phase: add a transaction argument to retractboundary...
Pierre-Yves David -
r22070:c1ca4720 default
parent child Browse files
Show More
@@ -2011,7 +2011,7 b' class queue(object):'
2011 2011 patchname = None
2012 2012 if rev and repo.ui.configbool('mq', 'secret', False):
2013 2013 # if we added anything with --rev, move the secret root
2014 phases.retractboundary(repo, phases.secret, [n])
2014 phases.retractboundary(repo, tr, phases.secret, [n])
2015 2015 self.parseseries()
2016 2016 self.applieddirty = True
2017 2017 self.seriesdirty = True
@@ -706,12 +706,12 b' def addchangegroup(repo, source, srctype'
706 706 # phases are going to be pushed alongside. Therefor
707 707 # `targetphase` is ignored.
708 708 phases.advanceboundary(repo, tr, phases.draft, srccontent)
709 phases.retractboundary(repo, phases.draft, added)
709 phases.retractboundary(repo, tr, phases.draft, added)
710 710 elif srctype != 'strip':
711 711 # publishing only alter behavior during push
712 712 #
713 713 # strip should not touch boundary at all
714 phases.retractboundary(repo, targetphase, added)
714 phases.retractboundary(repo, tr, targetphase, added)
715 715
716 716 # make changelog see real files again
717 717 cl.finalize(trp)
@@ -4585,7 +4585,7 b' def phase(ui, repo, *revs, **opts):'
4585 4585 olddata = repo._phasecache.getphaserevs(repo)[:]
4586 4586 phases.advanceboundary(repo, tr, targetphase, nodes)
4587 4587 if opts['force']:
4588 phases.retractboundary(repo, targetphase, nodes)
4588 phases.retractboundary(repo, tr, targetphase, nodes)
4589 4589 tr.close()
4590 4590 finally:
4591 4591 if tr is not None:
@@ -1442,7 +1442,7 b' class localrepository(object):'
1442 1442 # be compliant anyway
1443 1443 #
1444 1444 # if minimal phase was 0 we don't need to retract anything
1445 phases.retractboundary(self, targetphase, [n])
1445 phases.retractboundary(self, tr, targetphase, [n])
1446 1446 tr.close()
1447 1447 branchmap.updatecache(self.filtered('served'))
1448 1448 return n
@@ -229,10 +229,10 b' class phasecache(object):'
229 229 delroots.extend(olds - roots)
230 230 # declare deleted root in the target phase
231 231 if targetphase != 0:
232 self.retractboundary(repo, targetphase, delroots)
232 self.retractboundary(repo, tr, targetphase, delroots)
233 233 repo.invalidatevolatilesets()
234 234
235 def retractboundary(self, repo, targetphase, nodes):
235 def retractboundary(self, repo, tr, targetphase, nodes):
236 236 # Be careful to preserve shallow-copied values: do not update
237 237 # phaseroots values, replace them.
238 238
@@ -289,7 +289,7 b' def advanceboundary(repo, tr, targetphas'
289 289 phcache.advanceboundary(repo, tr, targetphase, nodes)
290 290 repo._phasecache.replace(phcache)
291 291
292 def retractboundary(repo, targetphase, nodes):
292 def retractboundary(repo, tr, targetphase, nodes):
293 293 """Set nodes back to a phase changing other nodes phases if
294 294 necessary.
295 295
@@ -298,7 +298,7 b' def retractboundary(repo, targetphase, n'
298 298
299 299 Simplify boundary to contains phase roots only."""
300 300 phcache = repo._phasecache.copy()
301 phcache.retractboundary(repo, targetphase, nodes)
301 phcache.retractboundary(repo, tr, targetphase, nodes)
302 302 repo._phasecache.replace(phcache)
303 303
304 304 def listphases(repo):
General Comments 0
You need to be logged in to leave comments. Login now