Comments
Patch
@@ -137,12 +137,11 @@ def push(repo, remote, force=False, revs
pushop.outgoing)
if (pushop.repo.ui.configbool('experimental', 'bundle2-exp',
False)
and pushop.remote.capable('bundle2-exp')):
_pushbundle2(pushop)
- else:
- _pushchangeset(pushop)
+ _pushchangeset(pushop)
_pushcomputecommonheads(pushop)
_pushsyncphase(pushop)
_pushobsolete(pushop)
finally:
if lock is not None:
@@ -209,10 +208,13 @@ def _pushcheckoutgoing(pushop):
def _pushb2ctx(pushop, bundler):
"""handle changegroup push through bundle2
addchangegroup result is stored in the ``pushop.ret`` attribute.
"""
+ if 'changesets' in pushop.stepsdone:
+ return
+ pushop.stepsdone.add('changesets')
# Send known heads to the server for race detection.
if not pushop.force:
bundler.newpart('B2X:CHECK:HEADS', data=iter(pushop.remoteheads))
cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing)
cgpart = bundler.newpart('B2X:CHANGEGROUP', data=cg.getchunks())
@@ -261,10 +263,13 @@ def _pushbundle2extrareply(pushop, op, e
"""
pass
def _pushchangeset(pushop):
"""Make the actual push of changeset bundle to remote repo"""
+ if 'changesets' in pushop.stepsdone:
+ return
+ pushop.stepsdone.add('changesets')
outgoing = pushop.outgoing
unbundle = pushop.remote.capable('unbundle')
# TODO: get bundlecaps from remote
bundlecaps = None
# create a changegroup from local