Show More
@@ -932,7 +932,7 b' class queue(object):' | |||
|
932 | 932 | if oldqbase.phase() > tphase and oldqbase.p1().phase() <= tphase: |
|
933 | 933 | tr = repo.transaction('qfinish') |
|
934 | 934 | try: |
|
935 | phases.advanceboundary(repo, tphase, qfinished) | |
|
935 | phases.advanceboundary(repo, tr, tphase, qfinished) | |
|
936 | 936 | tr.close() |
|
937 | 937 | finally: |
|
938 | 938 | tr.release() |
@@ -700,12 +700,12 b' def addchangegroup(repo, source, srctype' | |||
|
700 | 700 | # We should not use added here but the list of all change in |
|
701 | 701 | # the bundle |
|
702 | 702 | if publishing: |
|
703 | phases.advanceboundary(repo, phases.public, srccontent) | |
|
703 | phases.advanceboundary(repo, tr, phases.public, srccontent) | |
|
704 | 704 | else: |
|
705 | 705 | # Those changesets have been pushed from the outside, their |
|
706 | 706 | # phases are going to be pushed alongside. Therefor |
|
707 | 707 | # `targetphase` is ignored. |
|
708 | phases.advanceboundary(repo, phases.draft, srccontent) | |
|
708 | phases.advanceboundary(repo, tr, phases.draft, srccontent) | |
|
709 | 709 | phases.retractboundary(repo, phases.draft, added) |
|
710 | 710 | elif srctype != 'strip': |
|
711 | 711 | # publishing only alter behavior during push |
@@ -4583,7 +4583,7 b' def phase(ui, repo, *revs, **opts):' | |||
|
4583 | 4583 | raise util.Abort(_('empty revision set')) |
|
4584 | 4584 | nodes = [repo[r].node() for r in revs] |
|
4585 | 4585 | olddata = repo._phasecache.getphaserevs(repo)[:] |
|
4586 | phases.advanceboundary(repo, targetphase, nodes) | |
|
4586 | phases.advanceboundary(repo, tr, targetphase, nodes) | |
|
4587 | 4587 | if opts['force']: |
|
4588 | 4588 | phases.retractboundary(repo, targetphase, nodes) |
|
4589 | 4589 | tr.close() |
@@ -577,7 +577,7 b' def _localphasemove(pushop, nodes, phase' | |||
|
577 | 577 | if pushop.locallocked: |
|
578 | 578 | tr = pushop.repo.transaction('push-phase-sync') |
|
579 | 579 | try: |
|
580 | phases.advanceboundary(pushop.repo, phase, nodes) | |
|
580 | phases.advanceboundary(pushop.repo, tr, phase, nodes) | |
|
581 | 581 | tr.close() |
|
582 | 582 | finally: |
|
583 | 583 | tr.release() |
@@ -840,12 +840,14 b' def _pullapplyphases(pullop, remotephase' | |||
|
840 | 840 | # exclude changesets already public locally and update the others |
|
841 | 841 | pheads = [pn for pn in pheads if phase(unfi, rev(pn)) > public] |
|
842 | 842 | if pheads: |
|
843 | phases.advanceboundary(pullop.repo, public, pheads) | |
|
843 | tr = pullop.gettransaction() | |
|
844 | phases.advanceboundary(pullop.repo, tr, public, pheads) | |
|
844 | 845 | |
|
845 | 846 | # exclude changesets already draft locally and update the others |
|
846 | 847 | dheads = [pn for pn in dheads if phase(unfi, rev(pn)) > draft] |
|
847 | 848 | if dheads: |
|
848 | phases.advanceboundary(pullop.repo, draft, dheads) | |
|
849 | tr = pullop.gettransaction() | |
|
850 | phases.advanceboundary(pullop.repo, tr, draft, dheads) | |
|
849 | 851 | |
|
850 | 852 | def _pullobsolete(pullop): |
|
851 | 853 | """utility function to pull obsolete markers from a remote |
@@ -208,7 +208,7 b' class phasecache(object):' | |||
|
208 | 208 | self._phaserevs = None |
|
209 | 209 | self.dirty = True |
|
210 | 210 | |
|
211 | def advanceboundary(self, repo, targetphase, nodes): | |
|
211 | def advanceboundary(self, repo, tr, targetphase, nodes): | |
|
212 | 212 | # Be careful to preserve shallow-copied values: do not update |
|
213 | 213 | # phaseroots values, replace them. |
|
214 | 214 | |
@@ -278,7 +278,7 b' class phasecache(object):' | |||
|
278 | 278 | # (see branchmap one) |
|
279 | 279 | self._phaserevs = None |
|
280 | 280 | |
|
281 | def advanceboundary(repo, targetphase, nodes): | |
|
281 | def advanceboundary(repo, tr, targetphase, nodes): | |
|
282 | 282 | """Add nodes to a phase changing other nodes phases if necessary. |
|
283 | 283 | |
|
284 | 284 | This function move boundary *forward* this means that all nodes |
@@ -286,7 +286,7 b' def advanceboundary(repo, targetphase, n' | |||
|
286 | 286 | |
|
287 | 287 | Simplify boundary to contains phase roots only.""" |
|
288 | 288 | phcache = repo._phasecache.copy() |
|
289 | phcache.advanceboundary(repo, targetphase, nodes) | |
|
289 | phcache.advanceboundary(repo, tr, targetphase, nodes) | |
|
290 | 290 | repo._phasecache.replace(phcache) |
|
291 | 291 | |
|
292 | 292 | def retractboundary(repo, targetphase, nodes): |
@@ -339,7 +339,7 b' def pushphase(repo, nhex, oldphasestr, n' | |||
|
339 | 339 | oldphase = abs(int(oldphasestr)) # let's avoid negative index surprise |
|
340 | 340 | if currentphase == oldphase and newphase < oldphase: |
|
341 | 341 | tr = repo.transaction('pushkey-phase') |
|
342 | advanceboundary(repo, newphase, [bin(nhex)]) | |
|
342 | advanceboundary(repo, tr, newphase, [bin(nhex)]) | |
|
343 | 343 | tr.close() |
|
344 | 344 | return 1 |
|
345 | 345 | elif currentphase == newphase: |
General Comments 0
You need to be logged in to leave comments.
Login now