Patchwork D3183: wireproto: only expose "hello" command to version 1 transports

login
register
mail settings
Submitter phabricator
Date April 9, 2018, 3:14 p.m.
Message ID <d8cd3a1e50186db6b8f4a4cba833200d@localhost.localdomain>
Download mbox | patch
Permalink /patch/30598/
State Not Applicable
Headers show

Comments

phabricator - April 9, 2018, 3:14 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6e6d68c2d39c: wireproto: only expose &quot;hello&quot; command to version 1 transports (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3183?vs=7868&id=7900

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

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -1010,7 +1010,7 @@ 
     h = repo.heads()
     return wireprototypes.bytesresponse(encodelist(h) + '\n')
 
-@wireprotocommand('hello', permission='pull')
+@wireprotocommand('hello', permission='pull', transportpolicy=POLICY_V1_ONLY)
 def hello(repo, proto):
     """Called as part of SSH handshake to obtain server info.