comparison mercurial/sshpeer.py @ 35940:556218e08e25

sshpeer: remove support for connecting to <0.9.1 servers (BC) 197d10e157ce made this change for the HTTP peer. Let's do the same for the SSH peer. Test output changes as expected. A redundant test has been dropped. .. bc:: Support for connecting to Mercurial servers older than 0.9.1 has been removed. Differential Revision: https://phab.mercurial-scm.org/D2036
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 Feb 2018 14:58:32 -0800
parents a622a927fe03
children 48a3a9283f09
comparison
equal deleted inserted replaced
35939:a622a927fe03 35940:556218e08e25
239 # Look for response to ``hello`` command. Scan from the back so 239 # Look for response to ``hello`` command. Scan from the back so
240 # we don't misinterpret banner output as the command reply. 240 # we don't misinterpret banner output as the command reply.
241 if l.startswith('capabilities:'): 241 if l.startswith('capabilities:'):
242 caps.update(l[:-1].split(':')[1].split()) 242 caps.update(l[:-1].split(':')[1].split())
243 break 243 break
244
245 # Error if we couldn't find a response to ``hello``. This could
246 # mean:
247 #
248 # 1. Remote isn't a Mercurial server
249 # 2. Remote is a <0.9.1 Mercurial server
250 # 3. Remote is a future Mercurial server that dropped ``hello``
251 # support.
252 if not caps:
253 badresponse()
244 254
245 return caps 255 return caps
246 256
247 class sshpeer(wireproto.wirepeer): 257 class sshpeer(wireproto.wirepeer):
248 def __init__(self, ui, url, proc, stdin, stdout, stderr, caps): 258 def __init__(self, ui, url, proc, stdin, stdout, stderr, caps):