changeset 36071:038bcb759b75

wireproto: remove unused proto argument from supportedcompengines (API) In theory, the protocol should be passed to this function. But the argument isn't being used and it is getting in the way of refactoring. So let's remove it. We can always add it back later if we need it again. Differential Revision: https://phab.mercurial-scm.org/D2086
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 07 Feb 2018 20:22:44 -0800
parents 90ca4986616c
children 341c886e411e
files mercurial/wireproto.py mercurial/wireprotoserver.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Thu Feb 01 17:12:07 2018 -0800
+++ b/mercurial/wireproto.py	Wed Feb 07 20:22:44 2018 -0800
@@ -587,7 +587,7 @@
 
     return ui.configbool('server', 'bundle1')
 
-def supportedcompengines(ui, proto, role):
+def supportedcompengines(ui, role):
     """Obtain the list of supported compression engines for a request."""
     assert role in (util.CLIENTROLE, util.SERVERROLE)
 
@@ -824,7 +824,7 @@
         # FUTURE advertise minrx and mintx after consulting config option
         caps.append('httpmediatype=0.1rx,0.1tx,0.2tx')
 
-        compengines = supportedcompengines(repo.ui, proto, util.SERVERROLE)
+        compengines = supportedcompengines(repo.ui, util.SERVERROLE)
         if compengines:
             comptypes = ','.join(urlreq.quote(e.wireprotosupport().name)
                                  for e in compengines)
--- a/mercurial/wireprotoserver.py	Thu Feb 01 17:12:07 2018 -0800
+++ b/mercurial/wireprotoserver.py	Wed Feb 07 20:22:44 2018 -0800
@@ -192,7 +192,7 @@
                     break
 
             # Now find an agreed upon compression format.
-            for engine in wireproto.supportedcompengines(self._ui, self,
+            for engine in wireproto.supportedcompengines(self._ui,
                                                          util.SERVERROLE):
                 if engine.wireprotosupport().name in compformats:
                     opts = {}