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

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sat Apr 7 05:53:45 UTC 2018


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This command is only ever used for the handshake in the SSH protocol.
  We probably don't even need for it to be a proper command. Let's not
  carry it forward to version 2 because I don't see a use for it there.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS

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')
 
- at wireprotocommand('hello', permission='pull')
+ at wireprotocommand('hello', permission='pull', transportpolicy=POLICY_V1_ONLY)
 def hello(repo, proto):
     """Called as part of SSH handshake to obtain server info.
 



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


More information about the Mercurial-devel mailing list