diff mercurial/wireprotoserver.py @ 36883:02bea04b4c54

hgweb: transition permissions hooks to modern request type (API) We're trying to remove ``wsgirequest``. The permissions hooks don't do anything they can't do with our new request type. So let's pass that in. This was the last use of ``wsgirequest`` in the wire protocol code! .. api:: hgweb.hgweb_mod.permhooks no longer take a ``wsgirequest`` instance as an argument. Differential Revision: https://phab.mercurial-scm.org/D2793
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 10 Mar 2018 18:19:27 -0800
parents a755fd3b7146
children 1cfef5693203
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py	Sat Mar 10 20:16:20 2018 -0800
+++ b/mercurial/wireprotoserver.py	Sat Mar 10 18:19:27 2018 -0800
@@ -148,13 +148,12 @@
 def iscmd(cmd):
     return cmd in wireproto.commands
 
-def handlewsgirequest(rctx, wsgireq, req, res, checkperm):
+def handlewsgirequest(rctx, req, res, checkperm):
     """Possibly process a wire protocol request.
 
     If the current request is a wire protocol request, the request is
     processed by this function.
 
-    ``wsgireq`` is a ``wsgirequest`` instance.
     ``req`` is a ``parsedrequest`` instance.
     ``res`` is a ``wsgiresponse`` instance.
 
@@ -197,7 +196,7 @@
         return True
 
     proto = httpv1protocolhandler(req, repo.ui,
-                                  lambda perm: checkperm(rctx, wsgireq, perm))
+                                  lambda perm: checkperm(rctx, req, perm))
 
     # The permissions checker should be the only thing that can raise an
     # ErrorResponse. It is kind of a layer violation to catch an hgweb