comparison mercurial/sshpeer.py @ 35977:625038cb4b1d

sshpeer: rename sshpeer class to sshv1peer (API) With the introduction of version 2 of the SSH wire protocol, we will need a new peer class to speak that protocol because it will be too difficult to shoehorn a single class to speak two protocols. We rename sshpeer.sshpeer to sshpeer.sshv1peer to reflect the fact that there will be multiple versions of the peer depending on the negotiated protocol. .. api:: sshpeer.sshpeer renamed to sshpeer.sshv1peer. Differential Revision: https://phab.mercurial-scm.org/D2062
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 06 Feb 2018 10:57:56 -0800
parents 48a3a9283f09
children 59e4a7781a36
comparison
equal deleted inserted replaced
35976:48a3a9283f09 35977:625038cb4b1d
326 if not caps: 326 if not caps:
327 badresponse() 327 badresponse()
328 328
329 return caps 329 return caps
330 330
331 class sshpeer(wireproto.wirepeer): 331 class sshv1peer(wireproto.wirepeer):
332 def __init__(self, ui, url, proc, stdin, stdout, stderr, caps): 332 def __init__(self, ui, url, proc, stdin, stdout, stderr, caps):
333 """Create a peer from an existing SSH connection. 333 """Create a peer from an existing SSH connection.
334 334
335 ``proc`` is a handle on the underlying SSH process. 335 ``proc`` is a handle on the underlying SSH process.
336 ``stdin``, ``stdout``, and ``stderr`` are handles on the stdio 336 ``stdin``, ``stdout``, and ``stderr`` are handles on the stdio
535 caps = _performhandshake(ui, stdin, stdout, stderr) 535 caps = _performhandshake(ui, stdin, stdout, stderr)
536 except Exception: 536 except Exception:
537 _cleanuppipes(ui, stdout, stdin, stderr) 537 _cleanuppipes(ui, stdout, stdin, stderr)
538 raise 538 raise
539 539
540 return sshpeer(ui, path, proc, stdin, stdout, stderr, caps) 540 return sshv1peer(ui, path, proc, stdin, stdout, stderr, caps)