changeset 36615:ed7705017749

wireproto: only expose "between" to version 1 of wire protocols We recently marked other legacy commands as only available to version 1 of the wire protocols. We held off marking "between" because it is used as part of the SSH handshake. Since SSH servers assume they are version 1 by default and the "between" request that is issued as part of the version 2 handshake is swallowed and not operated on, everything should "just work" if "between" is not available to version 2. Differential Revision: https://phab.mercurial-scm.org/D2513
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 27 Feb 2018 16:31:44 -0800
parents 1fa02265fae2
children a007db19dc4d
files mercurial/wireproto.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Fri Mar 02 18:55:18 2018 -0500
+++ b/mercurial/wireproto.py	Tue Feb 27 16:31:44 2018 -0800
@@ -740,9 +740,7 @@
 
     return bytesresponse(';'.join(res))
 
-# TODO mark as version 1 transport only once interaction with
-# SSH handshake mechanism is figured out.
-@wireprotocommand('between', 'pairs')
+@wireprotocommand('between', 'pairs', transportpolicy=POLICY_V1_ONLY)
 def between(repo, proto, pairs):
     pairs = [decodelist(p, '-') for p in pairs.split(" ")]
     r = []