mercurial/sshpeer.py
changeset 35940 556218e08e25
parent 35939 a622a927fe03
child 35976 48a3a9283f09
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):