Show More
@@ -2912,7 +2912,7 b' def debugwireproto(ui, repo, path=None, ' | |||||
2912 | if opts['peer'] == 'http2': |
|
2912 | if opts['peer'] == 'http2': | |
2913 | ui.write(_('creating http peer for wire protocol version 2\n')) |
|
2913 | ui.write(_('creating http peer for wire protocol version 2\n')) | |
2914 | peer = httppeer.httpv2peer( |
|
2914 | peer = httppeer.httpv2peer( | |
2915 | ui, path, 'api/%s' % wireprototypes.HTTPV2, |
|
2915 | ui, path, 'api/%s' % wireprototypes.HTTP_WIREPROTO_V2, | |
2916 | opener, httppeer.urlreq.request, {}) |
|
2916 | opener, httppeer.urlreq.request, {}) | |
2917 | elif opts['peer'] == 'raw': |
|
2917 | elif opts['peer'] == 'raw': | |
2918 | ui.write(_('using raw connection to peer\n')) |
|
2918 | ui.write(_('using raw connection to peer\n')) |
@@ -672,7 +672,7 b' class httpv2peer(object):' | |||||
672 | # Integer priority for the service. If we could choose from multiple |
|
672 | # Integer priority for the service. If we could choose from multiple | |
673 | # services, we choose the one with the highest priority. |
|
673 | # services, we choose the one with the highest priority. | |
674 | API_PEERS = { |
|
674 | API_PEERS = { | |
675 | wireprototypes.HTTPV2: { |
|
675 | wireprototypes.HTTP_WIREPROTO_V2: { | |
676 | 'init': httpv2peer, |
|
676 | 'init': httpv2peer, | |
677 | 'priority': 50, |
|
677 | 'priority': 50, | |
678 | }, |
|
678 | }, |
@@ -307,7 +307,7 b' def handlewsgiapirequest(rctx, req, res,' | |||||
307 | # Callable receiving (req, repo) that is called to obtain an API |
|
307 | # Callable receiving (req, repo) that is called to obtain an API | |
308 | # descriptor for this service. The response must be serializable to CBOR. |
|
308 | # descriptor for this service. The response must be serializable to CBOR. | |
309 | API_HANDLERS = { |
|
309 | API_HANDLERS = { | |
310 | wireprotov2server.HTTPV2: { |
|
310 | wireprotov2server.HTTP_WIREPROTO_V2: { | |
311 | 'config': ('experimental', 'web.api.http-v2'), |
|
311 | 'config': ('experimental', 'web.api.http-v2'), | |
312 | 'handler': wireprotov2server.handlehttpv2request, |
|
312 | 'handler': wireprotov2server.handlehttpv2request, | |
313 | 'apidescriptor': wireprotov2server.httpv2apidescriptor, |
|
313 | 'apidescriptor': wireprotov2server.httpv2apidescriptor, |
@@ -18,7 +18,7 b" SSHV1 = 'ssh-v1'" | |||||
18 | # These are advertised over the wire. Increment the counters at the end |
|
18 | # These are advertised over the wire. Increment the counters at the end | |
19 | # to reflect BC breakages. |
|
19 | # to reflect BC breakages. | |
20 | SSHV2 = 'exp-ssh-v2-0001' |
|
20 | SSHV2 = 'exp-ssh-v2-0001' | |
21 | HTTPV2 = 'exp-http-v2-0001' |
|
21 | HTTP_WIREPROTO_V2 = 'exp-http-v2-0001' | |
22 |
|
22 | |||
23 | # All available wire protocol transports. |
|
23 | # All available wire protocol transports. | |
24 | TRANSPORTS = { |
|
24 | TRANSPORTS = { | |
@@ -35,7 +35,7 b' TRANSPORTS = {' | |||||
35 | 'transport': 'http', |
|
35 | 'transport': 'http', | |
36 | 'version': 1, |
|
36 | 'version': 1, | |
37 | }, |
|
37 | }, | |
38 | HTTPV2: { |
|
38 | HTTP_WIREPROTO_V2: { | |
39 | 'transport': 'http', |
|
39 | 'transport': 'http', | |
40 | 'version': 2, |
|
40 | 'version': 2, | |
41 | } |
|
41 | } |
@@ -27,7 +27,7 b' from . import (' | |||||
27 |
|
27 | |||
28 | FRAMINGTYPE = b'application/mercurial-exp-framing-0003' |
|
28 | FRAMINGTYPE = b'application/mercurial-exp-framing-0003' | |
29 |
|
29 | |||
30 | HTTPV2 = wireprototypes.HTTPV2 |
|
30 | HTTP_WIREPROTO_V2 = wireprototypes.HTTP_WIREPROTO_V2 | |
31 |
|
31 | |||
32 | def handlehttpv2request(rctx, req, res, checkperm, urlparts): |
|
32 | def handlehttpv2request(rctx, req, res, checkperm, urlparts): | |
33 | from .hgweb import common as hgwebcommon |
|
33 | from .hgweb import common as hgwebcommon | |
@@ -332,7 +332,7 b' class httpv2protocolhandler(object):' | |||||
332 |
|
332 | |||
333 | @property |
|
333 | @property | |
334 | def name(self): |
|
334 | def name(self): | |
335 | return HTTPV2 |
|
335 | return HTTP_WIREPROTO_V2 | |
336 |
|
336 | |||
337 | def getargs(self, args): |
|
337 | def getargs(self, args): | |
338 | data = {} |
|
338 | data = {} |
General Comments 0
You need to be logged in to leave comments.
Login now