Show More
@@ -781,6 +781,14 b" capabilities = {'HG2X': ()," | |||
|
781 | 781 | 'b2x:changegroup': (), |
|
782 | 782 | } |
|
783 | 783 | |
|
784 | def getrepocaps(repo): | |
|
785 | """return the bundle2 capabilities for a given repo | |
|
786 | ||
|
787 | Exists to allow extensions (like evolution) to mutate the | |
|
788 | capabilities. | |
|
789 | """ | |
|
790 | return capabilities | |
|
791 | ||
|
784 | 792 | def bundle2caps(remote): |
|
785 | 793 | """return the bundlecapabilities of a peer as dict""" |
|
786 | 794 | raw = remote.capable('bundle2-exp') |
@@ -465,7 +465,7 b' def _pushbundle2(pushop):' | |||
|
465 | 465 | evolve in the future.""" |
|
466 | 466 | bundler = bundle2.bundle20(pushop.ui, bundle2.bundle2caps(pushop.remote)) |
|
467 | 467 | # create reply capability |
|
468 |
capsblob = bundle2.encodecaps(bundle2. |
|
|
468 | capsblob = bundle2.encodecaps(bundle2.getrepocaps(pushop.repo)) | |
|
469 | 469 | bundler.newpart('b2x:replycaps', data=capsblob) |
|
470 | 470 | replyhandlers = [] |
|
471 | 471 | for partgenname in b2partsgenorder: |
@@ -588,7 +588,7 b' def _pushsyncphase(pushop):' | |||
|
588 | 588 | # |
|
589 | 589 | # This will eventually be unified with the changesets bundle2 push |
|
590 | 590 | bundler = bundle2.bundle20(pushop.ui, b2caps) |
|
591 |
capsblob = bundle2.encodecaps(pushop.repo |
|
|
591 | capsblob = bundle2.encodecaps(bundle2.getrepocaps(pushop.repo)) | |
|
592 | 592 | bundler.newpart('b2x:replycaps', data=capsblob) |
|
593 | 593 | part2node = [] |
|
594 | 594 | enc = pushkey.encode |
@@ -922,7 +922,7 b' def _pullobsolete(pullop):' | |||
|
922 | 922 | def caps20to10(repo): |
|
923 | 923 | """return a set with appropriate options to use bundle20 during getbundle""" |
|
924 | 924 | caps = set(['HG2X']) |
|
925 |
capsblob = bundle2.encodecaps(bundle2. |
|
|
925 | capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo)) | |
|
926 | 926 | caps.add('bundle2=' + urllib.quote(capsblob)) |
|
927 | 927 | return caps |
|
928 | 928 |
@@ -305,7 +305,7 b' class localrepository(object):' | |||
|
305 | 305 | # required by the tests (or some brave tester) |
|
306 | 306 | if self.ui.configbool('experimental', 'bundle2-exp', False): |
|
307 | 307 | caps = set(caps) |
|
308 |
capsblob = bundle2.encodecaps(bundle2. |
|
|
308 | capsblob = bundle2.encodecaps(bundle2.getrepocaps(self)) | |
|
309 | 309 | caps.add('bundle2-exp=' + urllib.quote(capsblob)) |
|
310 | 310 | return caps |
|
311 | 311 |
@@ -609,7 +609,7 b' def _capabilities(repo, proto):' | |||
|
609 | 609 | else: |
|
610 | 610 | caps.append('streamreqs=%s' % ','.join(requiredformats)) |
|
611 | 611 | if repo.ui.configbool('experimental', 'bundle2-exp', False): |
|
612 |
capsblob = bundle2.encodecaps(bundle2. |
|
|
612 | capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo)) | |
|
613 | 613 | caps.append('bundle2-exp=' + urllib.quote(capsblob)) |
|
614 | 614 | caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) |
|
615 | 615 | caps.append('httpheader=1024') |
General Comments 0
You need to be logged in to leave comments.
Login now