Patchwork D3184: wireproto: only expose "debugwireargs" to version 1 transports

login
register
mail settings
Submitter phabricator
Date April 7, 2018, 5:53 a.m.
Message ID <differential-rev-PHID-DREV-oybqf5yvmoxugyc7gocz-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30531/
State Superseded
Headers show

Comments

phabricator - April 7, 2018, 5:53 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm not even sure this command should be enabled for version 1
  transports. It is just a reflection endpoint for argument data.
  We definitely don't need to support it in version 2.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -931,7 +931,7 @@ 
     return wireprototypes.streamres(gen=gen)
 
 @wireprotocommand('debugwireargs', 'one two *',
-                  permission='pull')
+                  permission='pull', transportpolicy=POLICY_V1_ONLY)
 def debugwireargs(repo, proto, one, two, others):
     # only accept optional args from the known set
     opts = options('debugwireargs', ['three', 'four'], others)