diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py index d5d580cd93..2dd333efcd 100644 --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -1815,6 +1815,7 @@ def handlephases(op, inpart): """apply phases from bundle part to repo""" headsbyphase = _readphaseheads(inpart) phases.updatephases(op.repo.unfiltered(), op.gettransaction(), headsbyphase) + op.records.add('phase-heads', {}) @parthandler('reply:pushkey', ('return', 'in-reply-to')) def handlepushkeyreply(op, inpart): diff --git a/mercurial/exchange.py b/mercurial/exchange.py index 847d91ed1b..60dc917076 100644 --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -1401,6 +1401,10 @@ def _pullbundle2(pullop): if pullop.fetch: pullop.cgresult = bundle2.combinechangegroupresults(op) + # If the bundle had a phase-heads part, then phase exchange is already done + if op.records['phase-heads']: + pullop.stepsdone.add('phases') + # processing phases change for namespace, value in op.records['listkeys']: if namespace == 'phases':