Mercurial > hg
comparison tests/test-ssh-proto.t @ 37294:27527d8cff5c
wireproto: mark SSHv2 as a version 1 transport
The version component is used for filtering/routing wire protocol
commands to their proper handler. The actual version 2 of the wire
protocol commands will use a different encoding of responses. We
already have tests using the version 2 SSH transport and version 2
of the wire protocol commands won't be implemented atomically.
This commit marks the SSHv2 transport as version 1 so it will
still invoke the version 1 commands. Once the commands are all
implemented in version 2, we can restore its proper behavior.
Some tests had to be disabled as a result of this change.
Differential Revision: https://phab.mercurial-scm.org/D2981
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 28 Mar 2018 10:12:02 -0700 |
parents | cd0ca979a8b8 |
children | 2f859ad7ed8c |
comparison
equal
deleted
inserted
replaced
37293:d5d665f6615a | 37294:27527d8cff5c |
---|---|
1096 o> readline() -> 403: | 1096 o> readline() -> 403: |
1097 o> capabilities: lookup branchmap pushkey known getbundle unbundlehash changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch\n | 1097 o> capabilities: lookup branchmap pushkey known getbundle unbundlehash changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch\n |
1098 i> write(6) -> 6: | 1098 i> write(6) -> 6: |
1099 i> hello\n | 1099 i> hello\n |
1100 o> readline() -> 4: | 1100 o> readline() -> 4: |
1101 o> 385\n | 1101 o> 403\n |
1102 o> readline() -> 385: | 1102 o> readline() -> 403: |
1103 o> capabilities: lookup branchmap pushkey known getbundle unbundlehash streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch\n | 1103 o> capabilities: lookup branchmap pushkey known getbundle unbundlehash changegroupsubset streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN batch\n |
1104 | 1104 |
1105 Multiple upgrades is not allowed | 1105 Multiple upgrades is not allowed |
1106 | 1106 |
1107 $ hg debugwireproto --localssh --peer raw << EOF | 1107 $ hg debugwireproto --localssh --peer raw << EOF |
1108 > raw | 1108 > raw |
1277 e> malformed handshake protocol: missing pairs 81\n | 1277 e> malformed handshake protocol: missing pairs 81\n |
1278 e> -\n | 1278 e> -\n |
1279 | 1279 |
1280 Legacy commands are not exposed to version 2 of protocol | 1280 Legacy commands are not exposed to version 2 of protocol |
1281 | 1281 |
1282 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | 1282 TODO re-enable these once we're back to actually using v2 commands |
1283 > command branches | 1283 |
1284 > nodes 0000000000000000000000000000000000000000 | 1284 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
1285 > EOF | 1285 > command branches |
1286 creating ssh peer from handshake results | 1286 > nodes 0000000000000000000000000000000000000000 |
1287 sending branches command | 1287 > EOF |
1288 response: | 1288 creating ssh peer from handshake results |
1289 | 1289 sending branches command |
1290 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | 1290 response: |
1291 > command changegroup | 1291 |
1292 > roots 0000000000000000000000000000000000000000 | 1292 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
1293 > EOF | 1293 > command changegroup |
1294 creating ssh peer from handshake results | 1294 > roots 0000000000000000000000000000000000000000 |
1295 sending changegroup command | 1295 > EOF |
1296 response: | 1296 creating ssh peer from handshake results |
1297 | 1297 sending changegroup command |
1298 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | 1298 response: |
1299 > command changegroupsubset | 1299 |
1300 > bases 0000000000000000000000000000000000000000 | 1300 $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
1301 > heads 0000000000000000000000000000000000000000 | 1301 > command changegroupsubset |
1302 > EOF | 1302 > bases 0000000000000000000000000000000000000000 |
1303 creating ssh peer from handshake results | 1303 > heads 0000000000000000000000000000000000000000 |
1304 sending changegroupsubset command | 1304 > EOF |
1305 response: | 1305 creating ssh peer from handshake results |
1306 sending changegroupsubset command | |
1307 response: | |
1306 | 1308 |
1307 $ cd .. | 1309 $ cd .. |
1308 | 1310 |
1309 Test listkeys for listing namespaces | 1311 Test listkeys for listing namespaces |
1310 | 1312 |