# HG changeset patch # User Gregory Szorc # Date 1523495751 25200 # Node ID 77c9ee77687cafdaa829533bb62d0ed5d93dcb52 # Parent 1aa4d646d0de30a453b5e9fe2aabd5937d49c1ad wireproto: rename HTTPV2 so it less like HTTP/2 Per review suggestion on D3230 from Augie. Differential Revision: https://phab.mercurial-scm.org/D3295 diff -r 1aa4d646d0de -r 77c9ee77687c mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Apr 13 11:21:55 2018 -0700 +++ b/mercurial/debugcommands.py Wed Apr 11 18:15:51 2018 -0700 @@ -2912,7 +2912,7 @@ if opts['peer'] == 'http2': ui.write(_('creating http peer for wire protocol version 2\n')) peer = httppeer.httpv2peer( - ui, path, 'api/%s' % wireprototypes.HTTPV2, + ui, path, 'api/%s' % wireprototypes.HTTP_WIREPROTO_V2, opener, httppeer.urlreq.request, {}) elif opts['peer'] == 'raw': ui.write(_('using raw connection to peer\n')) diff -r 1aa4d646d0de -r 77c9ee77687c mercurial/httppeer.py --- a/mercurial/httppeer.py Fri Apr 13 11:21:55 2018 -0700 +++ b/mercurial/httppeer.py Wed Apr 11 18:15:51 2018 -0700 @@ -672,7 +672,7 @@ # Integer priority for the service. If we could choose from multiple # services, we choose the one with the highest priority. API_PEERS = { - wireprototypes.HTTPV2: { + wireprototypes.HTTP_WIREPROTO_V2: { 'init': httpv2peer, 'priority': 50, }, diff -r 1aa4d646d0de -r 77c9ee77687c mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py Fri Apr 13 11:21:55 2018 -0700 +++ b/mercurial/wireprotoserver.py Wed Apr 11 18:15:51 2018 -0700 @@ -307,7 +307,7 @@ # Callable receiving (req, repo) that is called to obtain an API # descriptor for this service. The response must be serializable to CBOR. API_HANDLERS = { - wireprotov2server.HTTPV2: { + wireprotov2server.HTTP_WIREPROTO_V2: { 'config': ('experimental', 'web.api.http-v2'), 'handler': wireprotov2server.handlehttpv2request, 'apidescriptor': wireprotov2server.httpv2apidescriptor, diff -r 1aa4d646d0de -r 77c9ee77687c mercurial/wireprototypes.py --- a/mercurial/wireprototypes.py Fri Apr 13 11:21:55 2018 -0700 +++ b/mercurial/wireprototypes.py Wed Apr 11 18:15:51 2018 -0700 @@ -18,7 +18,7 @@ # These are advertised over the wire. Increment the counters at the end # to reflect BC breakages. SSHV2 = 'exp-ssh-v2-0001' -HTTPV2 = 'exp-http-v2-0001' +HTTP_WIREPROTO_V2 = 'exp-http-v2-0001' # All available wire protocol transports. TRANSPORTS = { @@ -35,7 +35,7 @@ 'transport': 'http', 'version': 1, }, - HTTPV2: { + HTTP_WIREPROTO_V2: { 'transport': 'http', 'version': 2, } diff -r 1aa4d646d0de -r 77c9ee77687c mercurial/wireprotov2server.py --- a/mercurial/wireprotov2server.py Fri Apr 13 11:21:55 2018 -0700 +++ b/mercurial/wireprotov2server.py Wed Apr 11 18:15:51 2018 -0700 @@ -27,7 +27,7 @@ FRAMINGTYPE = b'application/mercurial-exp-framing-0003' -HTTPV2 = wireprototypes.HTTPV2 +HTTP_WIREPROTO_V2 = wireprototypes.HTTP_WIREPROTO_V2 def handlehttpv2request(rctx, req, res, checkperm, urlparts): from .hgweb import common as hgwebcommon @@ -332,7 +332,7 @@ @property def name(self): - return HTTPV2 + return HTTP_WIREPROTO_V2 def getargs(self, args): data = {}