D2285: wireprotoserver: return to using iscmd() method
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Feb 15 18:24:29 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG72812ad205d1: wireprotoserver: return to using iscmd() method (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2285?vs=5772&id=5773
REVISION DETAIL
https://phab.mercurial-scm.org/D2285
AFFECTED FILES
mercurial/wireprotoserver.py
CHANGE DETAILS
diff --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py
+++ b/mercurial/wireprotoserver.py
@@ -170,6 +170,10 @@
urlreq.quote(self._req.env.get('REMOTE_HOST', '')),
urlreq.quote(self._req.env.get('REMOTE_USER', '')))
+# This method exists mostly so that extensions like remotefilelog can
+# disable a kludgey legacy method only over http. As of early 2018,
+# there are no other known users, so with any luck we can discard this
+# hook if remotefilelog becomes a first-party extension.
def iscmd(cmd):
return cmd in wireproto.commands
@@ -198,7 +202,7 @@
# wire protocol requests to hgweb because it prevents hgweb from using
# known wire protocol commands and it is less confusing for machine
# clients.
- if cmd not in wireproto.commands:
+ if not iscmd(cmd):
return None
proto = httpv1protocolhandler(req, repo.ui)
To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list