Patchwork D1982: wireprotoserver: rename p to proto

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 11:32 p.m.
Message ID <3847f203dab1892533cbeec96f5ce331@localhost.localdomain>
Download mbox | patch
Permalink /patch/27188/
State Not Applicable
Headers show

Comments

phabricator - Feb. 1, 2018, 11:32 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9d9d1c248ba3: wireprotoserver: rename p to proto (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1982?vs=5105&id=5120

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

AFFECTED FILES
  mercurial/wireprotoserver.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py
+++ b/mercurial/wireprotoserver.py
@@ -194,7 +194,7 @@ 
     return cmd in wireproto.commands
 
 def callhttp(repo, req, cmd):
-    p = webproto(req, repo.ui)
+    proto = webproto(req, repo.ui)
 
     def genversion2(gen, engine, engineopts):
         # application/mercurial-0.2 always sends a payload header
@@ -207,7 +207,7 @@ 
         for chunk in gen:
             yield chunk
 
-    rsp = wireproto.dispatch(repo, p, cmd)
+    rsp = wireproto.dispatch(repo, proto, cmd)
     if isinstance(rsp, bytes):
         req.respond(HTTP_OK, HGTYPE, body=rsp)
         return []
@@ -220,23 +220,24 @@ 
 
         # This code for compression should not be streamres specific. It
         # is here because we only compress streamres at the moment.
-        mediatype, engine, engineopts = p.responsetype(rsp.prefer_uncompressed)
+        mediatype, engine, engineopts = proto.responsetype(
+            rsp.prefer_uncompressed)
         gen = engine.compressstream(gen, engineopts)
 
         if mediatype == HGTYPE2:
             gen = genversion2(gen, engine, engineopts)
 
         req.respond(HTTP_OK, mediatype)
         return gen
     elif isinstance(rsp, wireproto.pushres):
-        val = p.restore()
+        val = proto.restore()
         rsp = '%d\n%s' % (rsp.res, val)
         req.respond(HTTP_OK, HGTYPE, body=rsp)
         return []
     elif isinstance(rsp, wireproto.pusherr):
         # drain the incoming bundle
         req.drain()
-        p.restore()
+        proto.restore()
         rsp = '0\n%s\n' % rsp.res
         req.respond(HTTP_OK, HGTYPE, body=rsp)
         return []