Show More
@@ -242,6 +242,16 b' def _performhandshake(ui, stdin, stdout,' | |||
|
242 | 242 | caps.update(l[:-1].split(':')[1].split()) |
|
243 | 243 | break |
|
244 | 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() | |
|
254 | ||
|
245 | 255 | return caps |
|
246 | 256 | |
|
247 | 257 | class sshpeer(wireproto.wirepeer): |
@@ -109,7 +109,9 b' And test the banner with the raw protoco' | |||
|
109 | 109 | 1 |
|
110 | 110 | |
|
111 | 111 | |
|
112 | Connecting to a <0.9.1 server that doesn't support the hello command | |
|
112 | Connecting to a <0.9.1 server that doesn't support the hello command. | |
|
113 | The client should refuse, as we dropped support for connecting to such | |
|
114 | servers. | |
|
113 | 115 | |
|
114 | 116 | $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server |
|
115 | 117 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) |
@@ -120,14 +122,8 b' Connecting to a <0.9.1 server that doesn' | |||
|
120 | 122 | sending between command |
|
121 | 123 | remote: 0 |
|
122 | 124 | remote: 1 |
|
123 | url: ssh://user@dummy/server | |
|
124 | local: no | |
|
125 | pushable: yes | |
|
126 | ||
|
127 | The client should interpret this as no capabilities | |
|
128 | ||
|
129 | $ SSHSERVERMODE=no-hello hg debugcapabilities ssh://user@dummy/server | |
|
130 | Main capabilities: | |
|
125 | abort: no suitable response from remote hg! | |
|
126 | [255] | |
|
131 | 127 | |
|
132 | 128 | Sending an unknown command to the server results in an empty response to that command |
|
133 | 129 |
General Comments 0
You need to be logged in to leave comments.
Login now