Patchwork D3295: wireproto: rename HTTPV2 so it less like HTTP/2

login
register
mail settings
Submitter phabricator
Date April 13, 2018, 10:20 p.m.
Message ID <e5bea82f46a100d2e7ab833deee10844@localhost.localdomain>
Download mbox | patch
Permalink /patch/30927/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2018, 10:20 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG77c9ee77687c: wireproto: rename HTTPV2 so it less like HTTP/2 (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3295?vs=8088&id=8180

REVISION DETAIL
  https://phab.mercurial-scm.org/D3295

AFFECTED FILES
  mercurial/debugcommands.py
  mercurial/httppeer.py
  mercurial/wireprotoserver.py
  mercurial/wireprototypes.py
  mercurial/wireprotov2server.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireprotov2server.py b/mercurial/wireprotov2server.py
--- a/mercurial/wireprotov2server.py
+++ b/mercurial/wireprotov2server.py
@@ -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 = {}
diff --git a/mercurial/wireprototypes.py b/mercurial/wireprototypes.py
--- a/mercurial/wireprototypes.py
+++ b/mercurial/wireprototypes.py
@@ -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 --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py
+++ b/mercurial/wireprotoserver.py
@@ -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 --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -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 --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -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'))