##// END OF EJS Templates
bundle2: transmit capabilities to getbundle during pull...
Pierre-Yves David -
r21143:5bb5d4ba default
parent child Browse files
Show More
@@ -546,6 +546,8 b' def _pullbundle2(pullop):'
546 546
547 547 For now, the only supported data are changegroup."""
548 548 kwargs = {'bundlecaps': set(['HG20'])}
549 capsblob = bundle2.encodecaps(pullop.repo.bundle2caps)
550 kwargs['bundlecaps'].add('bundle2=' + urllib.quote(capsblob))
549 551 # pulling changegroup
550 552 pullop.todosteps.remove('changegroup')
551 553 if not pullop.fetch:
@@ -660,7 +662,12 b' def getbundle(repo, source, heads=None, '
660 662 return cg
661 663 # very crude first implementation,
662 664 # the bundle API will change and the generation will be done lazily.
663 bundler = bundle2.bundle20(repo.ui)
665 b2caps = {}
666 for bcaps in bundlecaps:
667 if bcaps.startswith('bundle2='):
668 blob = urllib.unquote(bcaps[len('bundle2='):])
669 b2caps.update(bundle2.decodecaps(blob))
670 bundler = bundle2.bundle20(repo.ui, b2caps)
664 671 part = bundle2.bundlepart('changegroup', data=cg.getchunks())
665 672 bundler.addpart(part)
666 673 return util.chunkbuffer(bundler.getchunks())
General Comments 0
You need to be logged in to leave comments. Login now