mercurial/exchange.py
changeset 22341 2d16b39601b5
parent 22269 03cc81a28228
child 22342 262c5cc126c1
equal deleted inserted replaced
22340:394a17de6a2d 22341:2d16b39601b5
   463 
   463 
   464     The only currently supported type of data is changegroup but this will
   464     The only currently supported type of data is changegroup but this will
   465     evolve in the future."""
   465     evolve in the future."""
   466     bundler = bundle2.bundle20(pushop.ui, bundle2.bundle2caps(pushop.remote))
   466     bundler = bundle2.bundle20(pushop.ui, bundle2.bundle2caps(pushop.remote))
   467     # create reply capability
   467     # create reply capability
   468     capsblob = bundle2.encodecaps(pushop.repo.bundle2caps)
   468     capsblob = bundle2.encodecaps(bundle2.capabilities)
   469     bundler.newpart('b2x:replycaps', data=capsblob)
   469     bundler.newpart('b2x:replycaps', data=capsblob)
   470     replyhandlers = []
   470     replyhandlers = []
   471     for partgenname in b2partsgenorder:
   471     for partgenname in b2partsgenorder:
   472         partgen = b2partsgenmapping[partgenname]
   472         partgen = b2partsgenmapping[partgenname]
   473         ret = partgen(pushop, bundler)
   473         ret = partgen(pushop, bundler)
   920     return tr
   920     return tr
   921 
   921 
   922 def caps20to10(repo):
   922 def caps20to10(repo):
   923     """return a set with appropriate options to use bundle20 during getbundle"""
   923     """return a set with appropriate options to use bundle20 during getbundle"""
   924     caps = set(['HG2X'])
   924     caps = set(['HG2X'])
   925     capsblob = bundle2.encodecaps(repo.bundle2caps)
   925     capsblob = bundle2.encodecaps(bundle2.capabilities)
   926     caps.add('bundle2=' + urllib.quote(capsblob))
   926     caps.add('bundle2=' + urllib.quote(capsblob))
   927     return caps
   927     return caps
   928 
   928 
   929 def getbundle(repo, source, heads=None, common=None, bundlecaps=None,
   929 def getbundle(repo, source, heads=None, common=None, bundlecaps=None,
   930               **kwargs):
   930               **kwargs):