Mercurial > hg
changeset 37644:77c9ee77687c
wireproto: rename HTTPV2 so it less like HTTP/2
Per review suggestion on D3230 from Augie.
Differential Revision: https://phab.mercurial-scm.org/D3295
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 11 Apr 2018 18:15:51 -0700 |
parents | 1aa4d646d0de |
children | 72b0982cd509 |
files | mercurial/debugcommands.py mercurial/httppeer.py mercurial/wireprotoserver.py mercurial/wireprototypes.py mercurial/wireprotov2server.py |
diffstat | 5 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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'))
--- 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, },
--- 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,
--- 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, }
--- 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 = {}