Patchwork D2513: wireproto: only expose "between" to version 1 of wire protocols

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 4:34 p.m.
Message ID <differential-rev-PHID-DREV-ftaer2f3vmpgm63mqlbg-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28566/
State Superseded
Headers show

Comments

phabricator - March 1, 2018, 4:34 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

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

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
@@ -748,9 +748,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 = []