Mercurial > hg-stable
annotate tests/test-ssh-proto.t @ 36556:44dc34b8d17b
debugcommands: add debugserve command
`hg serve --stdio` requires the exact command argument form
`hg -R <path> serve --stdio` for security reasons. An upcoming
commit will need to start an SSH protocol server process with
custom settings.
This commit creates a `hg debugserve` command for starting servers
with custom options. There are no security restrictions and we can
add options here that aren't appropriate for built-in commands.
We currently only support starting an SSH protocol server using
the process's stdio file descriptors. The server supports logging
its I/O activity to a file descriptor number passed as a command
argument.
Differential Revision: https://phab.mercurial-scm.org/D2464
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 27 Feb 2018 15:47:44 -0800 |
parents | 02782e6e2c38 |
children | 72e487851a53 |
rev | line source |
---|---|
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 $ cat >> $HGRCPATH << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 > [ui] |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 > ssh = $PYTHON "$TESTDIR/dummyssh" |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 > [devel] |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 > debug.peer-request = true |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 > [extensions] |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 > sshprotoext = $TESTDIR/sshprotoext.py |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 $ hg init server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 $ cd server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 $ echo 0 > foo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 $ hg -q add foo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 $ hg commit -m initial |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 $ cd .. |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 Test a normal behaving server, for sanity |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 $ hg --debug debugpeer ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
20 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
21 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 devel-peer-request: hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 devel-peer-request: between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 devel-peer-request: pairs: 81 bytes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 remote: 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 remote: 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 Server should answer the "hello" command in isolation |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 |
36556
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
42 `hg debugserve --sshstdio` works |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
43 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
44 $ cd server |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
45 $ hg debugserve --sshstdio << EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
46 > hello |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
47 > EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
48 384 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
49 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
50 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
51 I/O logging works |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
52 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
53 $ hg debugserve --sshstdio --logiofd 1 << EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
54 > hello |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
55 > EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
56 o> write(4) -> None: |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
57 o> 384\n |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
58 o> write(384) -> None: |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
59 o> capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
60 384 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
61 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
62 o> flush() -> None |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
63 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
64 $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
65 > hello |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
66 > EOF |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
67 384 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
68 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
69 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
70 $ cat $TESTTMP/io |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
71 o> write(4) -> None: |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
72 o> 384\n |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
73 o> write(384) -> None: |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
74 o> capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN\n |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
75 o> flush() -> None |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
76 |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
77 $ cd .. |
44dc34b8d17b
debugcommands: add debugserve command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36399
diff
changeset
|
78 |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
79 >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake. |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
80 Server should reply with capabilities and should send "1\n\n" as a successful |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 reply with empty response to the "between". |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
82 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
83 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
85 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
86 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
87 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
88 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
89 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
90 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
91 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
92 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
93 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
94 SSH banner is not printed by default, ignored by clients |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
95 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
96 $ SSHSERVERMODE=banner hg debugpeer ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
97 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
98 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
99 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
100 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
101 --debug will print the banner |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
102 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
103 $ SSHSERVERMODE=banner hg --debug debugpeer ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
104 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
105 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
106 devel-peer-request: hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
107 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
108 devel-peer-request: between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
109 devel-peer-request: pairs: 81 bytes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
110 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
111 remote: banner: line 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
112 remote: banner: line 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
113 remote: banner: line 2 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
114 remote: banner: line 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
115 remote: banner: line 4 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
116 remote: banner: line 5 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
117 remote: banner: line 6 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
118 remote: banner: line 7 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
119 remote: banner: line 8 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
120 remote: banner: line 9 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
121 remote: 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
122 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
123 remote: 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
124 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
125 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
126 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
127 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
128 And test the banner with the raw protocol |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
129 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
130 $ SSHSERVERMODE=banner hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
131 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
132 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
133 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
134 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
135 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
136 banner: line 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
137 banner: line 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
138 banner: line 2 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
139 banner: line 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
140 banner: line 4 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
141 banner: line 5 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
142 banner: line 6 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
143 banner: line 7 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
144 banner: line 8 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
145 banner: line 9 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
146 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
147 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
148 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
149 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
150 |
35980
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35978
diff
changeset
|
151 Connecting to a <0.9.1 server that doesn't support the hello command. |
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35978
diff
changeset
|
152 The client should refuse, as we dropped support for connecting to such |
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35978
diff
changeset
|
153 servers. |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
154 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
155 $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
156 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
157 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
158 devel-peer-request: hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
159 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
160 devel-peer-request: between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
161 devel-peer-request: pairs: 81 bytes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
162 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
163 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
164 remote: 1 |
35980
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35978
diff
changeset
|
165 abort: no suitable response from remote hg! |
556218e08e25
sshpeer: remove support for connecting to <0.9.1 servers (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35978
diff
changeset
|
166 [255] |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
167 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
168 Sending an unknown command to the server results in an empty response to that command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
169 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
170 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
171 > pre-hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
172 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
173 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
174 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
175 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
176 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
177 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
178 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
179 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
180 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
181 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
182 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
183 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
184 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
185 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
186 sending no-args command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
187 devel-peer-request: hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
188 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
189 devel-peer-request: between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
190 devel-peer-request: pairs: 81 bytes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
191 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
192 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
193 remote: 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
194 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
195 remote: 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
196 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
197 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
198 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
199 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
200 Send multiple unknown commands before hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
201 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
202 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
203 > unknown1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
204 > unknown2 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
205 > unknown3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
206 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
207 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
208 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
209 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
210 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
211 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
212 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
213 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
214 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
215 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
216 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
217 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
218 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
219 $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
220 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
221 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
35970
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
222 sending unknown1 command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
223 sending unknown2 command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
224 sending unknown3 command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
225 devel-peer-request: hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
226 sending hello command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
227 devel-peer-request: between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
228 devel-peer-request: pairs: 81 bytes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
229 sending between command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
230 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
231 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
232 remote: 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
233 remote: 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
234 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
235 remote: 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
236 url: ssh://user@dummy/server |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
237 local: no |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
238 pushable: yes |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
239 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
240 Send an unknown command before hello that has arguments |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
241 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
242 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
243 > with-args |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
244 > foo 13 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
245 > value for foo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
246 > bar 13 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
247 > value for bar |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
248 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
249 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
250 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
251 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
252 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
253 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
254 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
255 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
256 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
257 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
258 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
259 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
260 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
261 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
262 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
263 Send an unknown command having an argument that looks numeric |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
264 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
265 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
266 > unknown |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
267 > foo 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
268 > 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
269 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
270 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
271 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
272 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
273 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
274 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
275 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
276 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
277 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
278 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
279 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
280 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
281 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
282 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
283 > unknown |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
284 > foo 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
285 > 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
286 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
287 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
288 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
289 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
290 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
291 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
292 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
293 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
294 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
295 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
296 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
297 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
298 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
299 When sending a dict argument value, it is serialized to |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
300 "<arg> <item count>" followed by "<key> <len>\n<value>" for each item |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
301 in the dict. |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
302 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
303 Dictionary value for unknown command |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
304 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
305 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
306 > unknown |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
307 > dict 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
308 > key1 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
309 > foo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
310 > key2 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
311 > bar |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
312 > key3 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
313 > baz |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
314 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
315 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
316 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
317 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
318 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
319 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
320 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
321 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
322 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
323 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
324 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
325 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
326 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
327 Incomplete dictionary send |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
328 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
329 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
330 > unknown |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
331 > dict 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
332 > key1 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
333 > foo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
334 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
335 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
336 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
337 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
338 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
339 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
340 Incomplete value send |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
341 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
342 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
343 > unknown |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
344 > dict 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
345 > key1 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
346 > fo |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
347 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
348 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
349 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
350 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
351 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
352 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
353 Send a command line with spaces |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
354 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
355 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
356 > unknown withspace |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
357 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
358 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
359 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
360 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
361 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
362 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
363 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
364 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
365 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
366 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
367 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
368 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
369 > unknown with multiple spaces |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
370 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
371 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
372 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
373 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
374 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
375 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
376 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
377 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
378 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
379 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
380 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
381 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
382 > unknown with spaces |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
383 > key 10 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
384 > some value |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
385 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
386 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
387 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
388 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
389 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
390 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
391 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
392 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
393 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
394 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
395 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
396 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
397 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
398 Send an unknown command after the "between" |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
399 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
400 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
401 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
402 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
403 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
404 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
405 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
406 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
407 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
408 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
409 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
410 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
411 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
412 And one with arguments |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
413 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
414 $ hg -R server serve --stdio << EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
415 > hello |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
416 > between |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
417 > pairs 81 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
418 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
419 > foo 5 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
420 > value |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
421 > bar 3 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
422 > baz |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
423 > EOF |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
424 384 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
425 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
426 1 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
427 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
428 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
429 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
430 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
431 0 |
83d67257ba90
tests: add low-level SSH protocol tests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
432 0 |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
433 |
36114
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
434 Send a valid command before the handshake |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
435 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
436 $ hg -R server serve --stdio << EOF |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
437 > heads |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
438 > hello |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
439 > between |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
440 > pairs 81 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
441 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
442 > EOF |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
443 41 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
444 68986213bd4485ea51533535e3fc9e78007a711f |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
445 384 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
446 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
447 1 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
448 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
449 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
450 And a variation that doesn't send the between command |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
451 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
452 $ hg -R server serve --stdio << EOF |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
453 > heads |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
454 > hello |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
455 > EOF |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
456 41 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
457 68986213bd4485ea51533535e3fc9e78007a711f |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
458 384 |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
459 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
465858451347
tests: add tests for sending recognized command before handshake
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36028
diff
changeset
|
460 |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
461 Send an upgrade request to a server that doesn't support that command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
462 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
463 $ hg -R server serve --stdio << EOF |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
464 > upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
465 > hello |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
466 > between |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
467 > pairs 81 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
468 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
469 > EOF |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
470 0 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
471 384 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
472 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
473 1 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
474 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
475 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
476 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
477 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
478 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
479 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
480 devel-peer-request: hello |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
481 sending hello command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
482 devel-peer-request: between |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
483 devel-peer-request: pairs: 81 bytes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
484 sending between command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
485 remote: 0 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
486 remote: 384 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
487 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
488 remote: 1 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
489 url: ssh://user@dummy/server |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
490 local: no |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
491 pushable: yes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
492 |
36253
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
493 Enable version 2 support on server. We need to do this in hgrc because we can't |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
494 use --config with `hg serve --stdio`. |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
495 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
496 $ cat >> server/.hg/hgrc << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
497 > [experimental] |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
498 > sshserver.support-v2 = true |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
499 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
500 |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
501 Send an upgrade request to a server that supports upgrade |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
502 |
36399
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
503 >>> with open('payload', 'wb') as fh: |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
504 ... fh.write(b'upgrade this-is-some-token proto=exp-ssh-v2-0001\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
505 ... fh.write(b'hello\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
506 ... fh.write(b'between\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
507 ... fh.write(b'pairs 81\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
508 ... fh.write(b'0000000000000000000000000000000000000000-0000000000000000000000000000000000000000') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
509 |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
510 $ hg -R server serve --stdio < payload |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
511 upgraded this-is-some-token exp-ssh-v2-0001 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
512 383 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
513 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
514 |
36253
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
515 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
516 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
517 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
518 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
519 devel-peer-request: hello |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
520 sending hello command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
521 devel-peer-request: between |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
522 devel-peer-request: pairs: 81 bytes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
523 sending between command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
524 protocol upgraded to exp-ssh-v2-0001 |
36254
7218e93ade47
sshpeer: log remote capabilities after protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36253
diff
changeset
|
525 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
526 url: ssh://user@dummy/server |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
527 local: no |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
528 pushable: yes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
529 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
530 Verify the peer has capabilities |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
531 |
36253
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
532 $ hg --config experimental.sshpeer.advertise-v2=true --debug debugcapabilities ssh://user@dummy/server |
36028
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
533 running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
c64b9adfb371
tests: stabilize ssh tests on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
36015
diff
changeset
|
534 running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
535 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
536 devel-peer-request: hello |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
537 sending hello command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
538 devel-peer-request: between |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
539 devel-peer-request: pairs: 81 bytes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
540 sending between command |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
541 protocol upgraded to exp-ssh-v2-0001 |
36254
7218e93ade47
sshpeer: log remote capabilities after protocol upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36253
diff
changeset
|
542 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
36015
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
543 Main capabilities: |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
544 batch |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
545 branchmap |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
546 $USUAL_BUNDLE2_CAPS_SERVER$ |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
547 changegroupsubset |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
548 getbundle |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
549 known |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
550 lookup |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
551 pushkey |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
552 streamreqs=generaldelta,revlogv1 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
553 unbundle=HG10GZ,HG10BZ,HG10UN |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
554 unbundlehash |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
555 Bundle2 capabilities: |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
556 HG20 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
557 bookmarks |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
558 changegroup |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
559 01 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
560 02 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
561 digests |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
562 md5 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
563 sha1 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
564 sha512 |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
565 error |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
566 abort |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
567 unsupportedcontent |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
568 pushraced |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
569 pushkey |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
570 hgtagsfnodes |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
571 listkeys |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
572 phases |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
573 heads |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
574 pushkey |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
575 remote-changegroup |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
576 http |
48a3a9283f09
sshpeer: initial definition and implementation of new SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35980
diff
changeset
|
577 https |
36253
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
578 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
579 Command after upgrade to version 2 is processed |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
580 |
36399
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
581 >>> with open('payload', 'wb') as fh: |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
582 ... fh.write(b'upgrade this-is-some-token proto=exp-ssh-v2-0001\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
583 ... fh.write(b'hello\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
584 ... fh.write(b'between\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
585 ... fh.write(b'pairs 81\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
586 ... fh.write(b'0000000000000000000000000000000000000000-0000000000000000000000000000000000000000') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
587 ... fh.write(b'hello\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
588 $ hg -R server serve --stdio < payload |
36253
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
589 upgraded this-is-some-token exp-ssh-v2-0001 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
590 383 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
591 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
592 384 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
593 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
594 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
595 Multiple upgrades is not allowed |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
596 |
36399
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
597 >>> with open('payload', 'wb') as fh: |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
598 ... fh.write(b'upgrade this-is-some-token proto=exp-ssh-v2-0001\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
599 ... fh.write(b'hello\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
600 ... fh.write(b'between\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
601 ... fh.write(b'pairs 81\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
602 ... fh.write(b'0000000000000000000000000000000000000000-0000000000000000000000000000000000000000') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
603 ... fh.write(b'upgrade another-token proto=irrelevant\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
604 ... fh.write(b'hello\n') |
02782e6e2c38
tests: store protocol payload in files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36254
diff
changeset
|
605 $ hg -R server serve --stdio < payload |
36253
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
606 upgraded this-is-some-token exp-ssh-v2-0001 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
607 383 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
608 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
609 cannot upgrade protocols multiple times |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
610 - |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
611 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
612 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
613 Malformed upgrade request line (not exactly 3 space delimited tokens) |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
614 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
615 $ hg -R server serve --stdio << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
616 > upgrade |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
617 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
618 0 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
619 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
620 $ hg -R server serve --stdio << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
621 > upgrade token |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
622 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
623 0 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
624 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
625 $ hg -R server serve --stdio << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
626 > upgrade token foo=bar extra-token |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
627 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
628 0 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
629 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
630 Upgrade request to unsupported protocol is ignored |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
631 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
632 $ hg -R server serve --stdio << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
633 > upgrade this-is-some-token proto=unknown1,unknown2 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
634 > hello |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
635 > between |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
636 > pairs 81 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
637 > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
638 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
639 0 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
640 384 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
641 capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
642 1 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
643 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
644 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
645 Upgrade request must be followed by hello + between |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
646 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
647 $ hg -R server serve --stdio << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
648 > upgrade token proto=exp-ssh-v2-0001 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
649 > invalid |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
650 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
651 malformed handshake protocol: missing hello |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
652 - |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
653 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
654 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
655 $ hg -R server serve --stdio << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
656 > upgrade token proto=exp-ssh-v2-0001 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
657 > hello |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
658 > invalid |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
659 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
660 malformed handshake protocol: missing between |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
661 - |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
662 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
663 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
664 $ hg -R server serve --stdio << EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
665 > upgrade token proto=exp-ssh-v2-0001 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
666 > hello |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
667 > between |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
668 > invalid |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
669 > EOF |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
670 malformed handshake protocol: missing pairs 81 |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
671 - |
464bedc0fdb4
wireprotoserver: handle SSH protocol version 2 upgrade requests
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36114
diff
changeset
|
672 |