Show More
@@ -775,6 +775,12 b' class unbundlepart(unpackermixin):' | |||||
775 | self.consumed = True |
|
775 | self.consumed = True | |
776 | return data |
|
776 | return data | |
777 |
|
777 | |||
|
778 | capabilities = {'HG2X': (), | |||
|
779 | 'b2x:listkeys': (), | |||
|
780 | 'b2x:pushkey': (), | |||
|
781 | 'b2x:changegroup': (), | |||
|
782 | } | |||
|
783 | ||||
778 | def bundle2caps(remote): |
|
784 | def bundle2caps(remote): | |
779 | """return the bundlecapabilities of a peer as dict""" |
|
785 | """return the bundlecapabilities of a peer as dict""" | |
780 | raw = remote.capable('bundle2-exp') |
|
786 | raw = remote.capable('bundle2-exp') |
@@ -465,7 +465,7 b' def _pushbundle2(pushop):' | |||||
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( |
|
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: | |
@@ -922,7 +922,7 b' def _pullobsolete(pullop):' | |||||
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( |
|
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 |
@@ -180,12 +180,6 b' class localrepository(object):' | |||||
180 | requirements = ['revlogv1'] |
|
180 | requirements = ['revlogv1'] | |
181 | filtername = None |
|
181 | filtername = None | |
182 |
|
182 | |||
183 | bundle2caps = {'HG2X': (), |
|
|||
184 | 'b2x:listkeys': (), |
|
|||
185 | 'b2x:pushkey': (), |
|
|||
186 | 'b2x:changegroup': (), |
|
|||
187 | } |
|
|||
188 |
|
||||
189 | # a list of (ui, featureset) functions. |
|
183 | # a list of (ui, featureset) functions. | |
190 | # only functions defined in module of enabled extensions are invoked |
|
184 | # only functions defined in module of enabled extensions are invoked | |
191 | featuresetupfuncs = set() |
|
185 | featuresetupfuncs = set() | |
@@ -311,7 +305,7 b' class localrepository(object):' | |||||
311 | # required by the tests (or some brave tester) |
|
305 | # required by the tests (or some brave tester) | |
312 | if self.ui.configbool('experimental', 'bundle2-exp', False): |
|
306 | if self.ui.configbool('experimental', 'bundle2-exp', False): | |
313 | caps = set(caps) |
|
307 | caps = set(caps) | |
314 |
capsblob = bundle2.encodecaps( |
|
308 | capsblob = bundle2.encodecaps(bundle2.capabilities) | |
315 | caps.add('bundle2-exp=' + urllib.quote(capsblob)) |
|
309 | caps.add('bundle2-exp=' + urllib.quote(capsblob)) | |
316 | return caps |
|
310 | return caps | |
317 |
|
311 |
@@ -609,7 +609,7 b' def _capabilities(repo, proto):' | |||||
609 | else: |
|
609 | else: | |
610 | caps.append('streamreqs=%s' % ','.join(requiredformats)) |
|
610 | caps.append('streamreqs=%s' % ','.join(requiredformats)) | |
611 | if repo.ui.configbool('experimental', 'bundle2-exp', False): |
|
611 | if repo.ui.configbool('experimental', 'bundle2-exp', False): | |
612 |
capsblob = bundle2.encodecaps( |
|
612 | capsblob = bundle2.encodecaps(bundle2.capabilities) | |
613 | caps.append('bundle2-exp=' + urllib.quote(capsblob)) |
|
613 | caps.append('bundle2-exp=' + urllib.quote(capsblob)) | |
614 | caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) |
|
614 | caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) | |
615 | caps.append('httpheader=1024') |
|
615 | caps.append('httpheader=1024') |
General Comments 0
You need to be logged in to leave comments.
Login now