Show More
@@ -1840,7 +1840,7 b' def handlepushkey(op, inpart):' | |||
|
1840 | 1840 | def handlephases(op, inpart): |
|
1841 | 1841 | """apply phases from bundle part to repo""" |
|
1842 | 1842 | headsbyphase = phases.binarydecode(inpart) |
|
1843 |
phases.updatephases(op.repo.unfiltered(), op.gettransaction |
|
|
1843 | phases.updatephases(op.repo.unfiltered(), op.gettransaction, headsbyphase) | |
|
1844 | 1844 | op.records.add('phase-heads', {}) |
|
1845 | 1845 | |
|
1846 | 1846 | @parthandler('reply:pushkey', ('return', 'in-reply-to')) |
@@ -558,11 +558,18 b' def subsetphaseheads(repo, subset):' | |||
|
558 | 558 | headsbyphase[phase] = [cl.node(r) for r in repo.revs(revset, subset)] |
|
559 | 559 | return headsbyphase |
|
560 | 560 | |
|
561 | def updatephases(repo, tr, headsbyphase): | |
|
561 | def updatephases(repo, trgetter, headsbyphase): | |
|
562 | 562 | """Updates the repo with the given phase heads""" |
|
563 | 563 | # Now advance phase boundaries of all but secret phase |
|
564 | # | |
|
565 | # run the update (and fetch transaction) only if there are actually things | |
|
566 | # to update. This avoid creating empty transaction during no-op operation. | |
|
567 | ||
|
564 | 568 | for phase in allphases[:-1]: |
|
565 | advanceboundary(repo, tr, phase, headsbyphase[phase]) | |
|
569 | revset = '%%ln - %s()' % phasenames[phase] | |
|
570 | heads = [c.node() for c in repo.set(revset, headsbyphase[phase])] | |
|
571 | if heads: | |
|
572 | advanceboundary(repo, trgetter(), phase, heads) | |
|
566 | 573 | |
|
567 | 574 | def analyzeremotephases(repo, subset, roots): |
|
568 | 575 | """Compute phases heads and root in a subset of node from root dict |
General Comments 0
You need to be logged in to leave comments.
Login now