mercurial/exchange.py
changeset 21617 0cfda08afd24
parent 21600 5e08f3b65510
child 21618 7568f5c1c801
equal deleted inserted replaced
21616:0a8e7f81e8ae 21617:0cfda08afd24
   222     cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing)
   222     cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing)
   223     cgpart = bundler.newpart('B2X:CHANGEGROUP', data=cg.getchunks())
   223     cgpart = bundler.newpart('B2X:CHANGEGROUP', data=cg.getchunks())
   224     stream = util.chunkbuffer(bundler.getchunks())
   224     stream = util.chunkbuffer(bundler.getchunks())
   225     try:
   225     try:
   226         reply = pushop.remote.unbundle(stream, ['force'], 'push')
   226         reply = pushop.remote.unbundle(stream, ['force'], 'push')
   227     except bundle2.UnknownPartError, exc:
   227     except bundle2.BundleValueError, exc:
   228         raise util.Abort('missing support for %s' % exc)
   228         raise util.Abort('missing support for %s' % exc)
   229     try:
   229     try:
   230         op = bundle2.processbundle(pushop.repo, reply)
   230         op = bundle2.processbundle(pushop.repo, reply)
   231     except bundle2.UnknownPartError, exc:
   231     except bundle2.BundleValueError, exc:
   232         raise util.Abort('missing support for %s' % exc)
   232         raise util.Abort('missing support for %s' % exc)
   233     cgreplies = op.records.getreplies(cgpart.id)
   233     cgreplies = op.records.getreplies(cgpart.id)
   234     assert len(cgreplies['changegroup']) == 1
   234     assert len(cgreplies['changegroup']) == 1
   235     pushop.ret = cgreplies['changegroup'][0]['return']
   235     pushop.ret = cgreplies['changegroup'][0]['return']
   236     _pushbundle2extrareply(pushop, op, extrainfo)
   236     _pushbundle2extrareply(pushop, op, extrainfo)
   552     if kwargs.keys() == ['format']:
   552     if kwargs.keys() == ['format']:
   553         return # nothing to pull
   553         return # nothing to pull
   554     bundle = pullop.remote.getbundle('pull', **kwargs)
   554     bundle = pullop.remote.getbundle('pull', **kwargs)
   555     try:
   555     try:
   556         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
   556         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
   557     except bundle2.UnknownPartError, exc:
   557     except bundle2.BundleValueError, exc:
   558         raise util.Abort('missing support for %s' % exc)
   558         raise util.Abort('missing support for %s' % exc)
   559 
   559 
   560     if pullop.fetch:
   560     if pullop.fetch:
   561         assert len(op.records['changegroup']) == 1
   561         assert len(op.records['changegroup']) == 1
   562         pullop.cgresult = op.records['changegroup'][0]['return']
   562         pullop.cgresult = op.records['changegroup'][0]['return']