indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Per review suggestion on https://phab.mercurial-scm.org/D3230 from Augie.

REPOSITORY
  rHG Mercurial

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

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'))



To: indygreg, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to