Show More
@@ -1,2199 +1,2205 b'' | |||||
|
1 | TRANSITIONAL CONFIG | |||
|
2 | $ cat << EOF >> $HGRCPATH | |||
|
3 | > [format] | |||
|
4 | > sparse-revlog = yes | |||
|
5 | > EOF | |||
|
6 | ||||
1 | #require no-chg |
|
7 | #require no-chg | |
2 |
|
8 | |||
3 |
$ |
|
9 | $ cat > hgrc-sshv2 << EOF | |
4 | > %include $HGRCPATH |
|
10 | > %include $HGRCPATH | |
5 | > [experimental] |
|
11 | > [experimental] | |
6 | > sshpeer.advertise-v2 = true |
|
12 | > sshpeer.advertise-v2 = true | |
7 | > sshserver.support-v2 = true |
|
13 | > sshserver.support-v2 = true | |
8 | > EOF |
|
14 | > EOF | |
9 |
|
15 | |||
10 | Helper function to run protocol tests against multiple protocol versions. |
|
16 | Helper function to run protocol tests against multiple protocol versions. | |
11 | This is easier than using #testcases because managing differences between |
|
17 | This is easier than using #testcases because managing differences between | |
12 | protocols with inline conditional output is hard to read. |
|
18 | protocols with inline conditional output is hard to read. | |
13 |
|
19 | |||
14 | $ debugwireproto() { |
|
20 | $ debugwireproto() { | |
15 | > commands=`cat -` |
|
21 | > commands=`cat -` | |
16 | > echo 'testing ssh1' |
|
22 | > echo 'testing ssh1' | |
17 | > echo "${commands}" | hg --verbose debugwireproto --localssh |
|
23 | > echo "${commands}" | hg --verbose debugwireproto --localssh | |
18 | > echo "" |
|
24 | > echo "" | |
19 | > echo 'testing ssh2' |
|
25 | > echo 'testing ssh2' | |
20 | > echo "${commands}" | HGRCPATH=$TESTTMP/hgrc-sshv2 hg --verbose debugwireproto --localssh |
|
26 | > echo "${commands}" | HGRCPATH=$TESTTMP/hgrc-sshv2 hg --verbose debugwireproto --localssh | |
21 | > } |
|
27 | > } | |
22 |
|
28 | |||
23 | $ cat >> $HGRCPATH << EOF |
|
29 | $ cat >> $HGRCPATH << EOF | |
24 | > [ui] |
|
30 | > [ui] | |
25 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" |
|
31 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" | |
26 | > [devel] |
|
32 | > [devel] | |
27 | > debug.peer-request = true |
|
33 | > debug.peer-request = true | |
28 | > [extensions] |
|
34 | > [extensions] | |
29 | > sshprotoext = $TESTDIR/sshprotoext.py |
|
35 | > sshprotoext = $TESTDIR/sshprotoext.py | |
30 | > EOF |
|
36 | > EOF | |
31 |
|
37 | |||
32 | $ hg init server |
|
38 | $ hg init server | |
33 | $ cd server |
|
39 | $ cd server | |
34 | $ echo 0 > foo |
|
40 | $ echo 0 > foo | |
35 | $ hg -q add foo |
|
41 | $ hg -q add foo | |
36 | $ hg commit -m initial |
|
42 | $ hg commit -m initial | |
37 |
|
43 | |||
38 | A no-op connection performs a handshake |
|
44 | A no-op connection performs a handshake | |
39 |
|
45 | |||
40 | $ hg debugwireproto --localssh << EOF |
|
46 | $ hg debugwireproto --localssh << EOF | |
41 | > EOF |
|
47 | > EOF | |
42 | creating ssh peer from handshake results |
|
48 | creating ssh peer from handshake results | |
43 |
|
49 | |||
44 | Raw peers don't perform any activity |
|
50 | Raw peers don't perform any activity | |
45 |
|
51 | |||
46 | $ hg debugwireproto --localssh --peer raw << EOF |
|
52 | $ hg debugwireproto --localssh --peer raw << EOF | |
47 | > EOF |
|
53 | > EOF | |
48 | using raw connection to peer |
|
54 | using raw connection to peer | |
49 | $ hg debugwireproto --localssh --peer ssh1 << EOF |
|
55 | $ hg debugwireproto --localssh --peer ssh1 << EOF | |
50 | > EOF |
|
56 | > EOF | |
51 | creating ssh peer for wire protocol version 1 |
|
57 | creating ssh peer for wire protocol version 1 | |
52 | $ hg debugwireproto --localssh --peer ssh2 << EOF |
|
58 | $ hg debugwireproto --localssh --peer ssh2 << EOF | |
53 | > EOF |
|
59 | > EOF | |
54 | creating ssh peer for wire protocol version 2 |
|
60 | creating ssh peer for wire protocol version 2 | |
55 |
|
61 | |||
56 | Test a normal behaving server, for sanity |
|
62 | Test a normal behaving server, for sanity | |
57 |
|
63 | |||
58 | $ cd .. |
|
64 | $ cd .. | |
59 |
|
65 | |||
60 | $ hg --debug debugpeer ssh://user@dummy/server |
|
66 | $ hg --debug debugpeer ssh://user@dummy/server | |
61 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
67 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
62 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
68 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
63 | devel-peer-request: hello+between |
|
69 | devel-peer-request: hello+between | |
64 | devel-peer-request: pairs: 81 bytes |
|
70 | devel-peer-request: pairs: 81 bytes | |
65 | sending hello command |
|
71 | sending hello command | |
66 | sending between command |
|
72 | sending between command | |
67 |
remote: 4 |
|
73 | remote: 440 | |
68 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
74 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
69 | remote: 1 |
|
75 | remote: 1 | |
70 | devel-peer-request: protocaps |
|
76 | devel-peer-request: protocaps | |
71 | devel-peer-request: caps: * bytes (glob) |
|
77 | devel-peer-request: caps: * bytes (glob) | |
72 | sending protocaps command |
|
78 | sending protocaps command | |
73 | url: ssh://user@dummy/server |
|
79 | url: ssh://user@dummy/server | |
74 | local: no |
|
80 | local: no | |
75 | pushable: yes |
|
81 | pushable: yes | |
76 |
|
82 | |||
77 | Server should answer the "hello" command in isolation |
|
83 | Server should answer the "hello" command in isolation | |
78 |
|
84 | |||
79 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
85 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
80 | > raw |
|
86 | > raw | |
81 | > hello\n |
|
87 | > hello\n | |
82 | > readline |
|
88 | > readline | |
83 | > readline |
|
89 | > readline | |
84 | > EOF |
|
90 | > EOF | |
85 | using raw connection to peer |
|
91 | using raw connection to peer | |
86 | i> write(6) -> 6: |
|
92 | i> write(6) -> 6: | |
87 | i> hello\n |
|
93 | i> hello\n | |
88 | o> readline() -> 4: |
|
94 | o> readline() -> 4: | |
89 |
o> 4 |
|
95 | o> 440\n | |
90 |
o> readline() -> 4 |
|
96 | o> readline() -> 440: | |
91 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
97 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
92 |
|
98 | |||
93 | `hg debugserve --sshstdio` works |
|
99 | `hg debugserve --sshstdio` works | |
94 |
|
100 | |||
95 | $ cd server |
|
101 | $ cd server | |
96 | $ hg debugserve --sshstdio << EOF |
|
102 | $ hg debugserve --sshstdio << EOF | |
97 | > hello |
|
103 | > hello | |
98 | > EOF |
|
104 | > EOF | |
99 |
4 |
|
105 | 440 | |
100 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
106 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
101 |
|
107 | |||
102 | I/O logging works |
|
108 | I/O logging works | |
103 |
|
109 | |||
104 | $ hg debugserve --sshstdio --logiofd 1 << EOF |
|
110 | $ hg debugserve --sshstdio --logiofd 1 << EOF | |
105 | > hello |
|
111 | > hello | |
106 | > EOF |
|
112 | > EOF | |
107 | o> write(4) -> 4: |
|
113 | o> write(4) -> 4: | |
108 |
o> 4 |
|
114 | o> 440\n | |
109 |
o> write(4 |
|
115 | o> write(440) -> 440: | |
110 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
116 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
111 |
4 |
|
117 | 440 | |
112 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
118 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
113 | o> flush() -> None |
|
119 | o> flush() -> None | |
114 |
|
120 | |||
115 | $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF |
|
121 | $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF | |
116 | > hello |
|
122 | > hello | |
117 | > EOF |
|
123 | > EOF | |
118 |
4 |
|
124 | 440 | |
119 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
125 | capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
120 |
|
126 | |||
121 | $ cat $TESTTMP/io |
|
127 | $ cat $TESTTMP/io | |
122 | o> write(4) -> 4: |
|
128 | o> write(4) -> 4: | |
123 |
o> 4 |
|
129 | o> 440\n | |
124 |
o> write(4 |
|
130 | o> write(440) -> 440: | |
125 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
131 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
126 | o> flush() -> None |
|
132 | o> flush() -> None | |
127 |
|
133 | |||
128 | $ cd .. |
|
134 | $ cd .. | |
129 |
|
135 | |||
130 | >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake. |
|
136 | >=0.9.1 clients send a "hello" + "between" for the null range as part of handshake. | |
131 | Server should reply with capabilities and should send "1\n\n" as a successful |
|
137 | Server should reply with capabilities and should send "1\n\n" as a successful | |
132 | reply with empty response to the "between". |
|
138 | reply with empty response to the "between". | |
133 |
|
139 | |||
134 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
140 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
135 | > raw |
|
141 | > raw | |
136 | > hello\n |
|
142 | > hello\n | |
137 | > readline |
|
143 | > readline | |
138 | > readline |
|
144 | > readline | |
139 | > raw |
|
145 | > raw | |
140 | > between\n |
|
146 | > between\n | |
141 | > pairs 81\n |
|
147 | > pairs 81\n | |
142 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
148 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
143 | > readline |
|
149 | > readline | |
144 | > readline |
|
150 | > readline | |
145 | > EOF |
|
151 | > EOF | |
146 | using raw connection to peer |
|
152 | using raw connection to peer | |
147 | i> write(6) -> 6: |
|
153 | i> write(6) -> 6: | |
148 | i> hello\n |
|
154 | i> hello\n | |
149 | o> readline() -> 4: |
|
155 | o> readline() -> 4: | |
150 |
o> 4 |
|
156 | o> 440\n | |
151 |
o> readline() -> 4 |
|
157 | o> readline() -> 440: | |
152 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
158 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
153 | i> write(98) -> 98: |
|
159 | i> write(98) -> 98: | |
154 | i> between\n |
|
160 | i> between\n | |
155 | i> pairs 81\n |
|
161 | i> pairs 81\n | |
156 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
162 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
157 | o> readline() -> 2: |
|
163 | o> readline() -> 2: | |
158 | o> 1\n |
|
164 | o> 1\n | |
159 | o> readline() -> 1: |
|
165 | o> readline() -> 1: | |
160 | o> \n |
|
166 | o> \n | |
161 |
|
167 | |||
162 | SSH banner is not printed by default, ignored by clients |
|
168 | SSH banner is not printed by default, ignored by clients | |
163 |
|
169 | |||
164 | $ SSHSERVERMODE=banner hg debugpeer ssh://user@dummy/server |
|
170 | $ SSHSERVERMODE=banner hg debugpeer ssh://user@dummy/server | |
165 | url: ssh://user@dummy/server |
|
171 | url: ssh://user@dummy/server | |
166 | local: no |
|
172 | local: no | |
167 | pushable: yes |
|
173 | pushable: yes | |
168 |
|
174 | |||
169 | --debug will print the banner |
|
175 | --debug will print the banner | |
170 |
|
176 | |||
171 | $ SSHSERVERMODE=banner hg --debug debugpeer ssh://user@dummy/server |
|
177 | $ SSHSERVERMODE=banner hg --debug debugpeer ssh://user@dummy/server | |
172 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
178 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
173 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
179 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
174 | devel-peer-request: hello+between |
|
180 | devel-peer-request: hello+between | |
175 | devel-peer-request: pairs: 81 bytes |
|
181 | devel-peer-request: pairs: 81 bytes | |
176 | sending hello command |
|
182 | sending hello command | |
177 | sending between command |
|
183 | sending between command | |
178 | remote: banner: line 0 |
|
184 | remote: banner: line 0 | |
179 | remote: banner: line 1 |
|
185 | remote: banner: line 1 | |
180 | remote: banner: line 2 |
|
186 | remote: banner: line 2 | |
181 | remote: banner: line 3 |
|
187 | remote: banner: line 3 | |
182 | remote: banner: line 4 |
|
188 | remote: banner: line 4 | |
183 | remote: banner: line 5 |
|
189 | remote: banner: line 5 | |
184 | remote: banner: line 6 |
|
190 | remote: banner: line 6 | |
185 | remote: banner: line 7 |
|
191 | remote: banner: line 7 | |
186 | remote: banner: line 8 |
|
192 | remote: banner: line 8 | |
187 | remote: banner: line 9 |
|
193 | remote: banner: line 9 | |
188 |
remote: 4 |
|
194 | remote: 440 | |
189 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
195 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
190 | remote: 1 |
|
196 | remote: 1 | |
191 | devel-peer-request: protocaps |
|
197 | devel-peer-request: protocaps | |
192 | devel-peer-request: caps: * bytes (glob) |
|
198 | devel-peer-request: caps: * bytes (glob) | |
193 | sending protocaps command |
|
199 | sending protocaps command | |
194 | url: ssh://user@dummy/server |
|
200 | url: ssh://user@dummy/server | |
195 | local: no |
|
201 | local: no | |
196 | pushable: yes |
|
202 | pushable: yes | |
197 |
|
203 | |||
198 | And test the banner with the raw protocol |
|
204 | And test the banner with the raw protocol | |
199 |
|
205 | |||
200 | $ SSHSERVERMODE=banner hg -R server debugwireproto --localssh --peer raw << EOF |
|
206 | $ SSHSERVERMODE=banner hg -R server debugwireproto --localssh --peer raw << EOF | |
201 | > raw |
|
207 | > raw | |
202 | > hello\n |
|
208 | > hello\n | |
203 | > readline |
|
209 | > readline | |
204 | > readline |
|
210 | > readline | |
205 | > readline |
|
211 | > readline | |
206 | > readline |
|
212 | > readline | |
207 | > readline |
|
213 | > readline | |
208 | > readline |
|
214 | > readline | |
209 | > readline |
|
215 | > readline | |
210 | > readline |
|
216 | > readline | |
211 | > readline |
|
217 | > readline | |
212 | > readline |
|
218 | > readline | |
213 | > readline |
|
219 | > readline | |
214 | > readline |
|
220 | > readline | |
215 | > raw |
|
221 | > raw | |
216 | > between\n |
|
222 | > between\n | |
217 | > pairs 81\n |
|
223 | > pairs 81\n | |
218 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
224 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
219 | > readline |
|
225 | > readline | |
220 | > readline |
|
226 | > readline | |
221 | > EOF |
|
227 | > EOF | |
222 | using raw connection to peer |
|
228 | using raw connection to peer | |
223 | i> write(6) -> 6: |
|
229 | i> write(6) -> 6: | |
224 | i> hello\n |
|
230 | i> hello\n | |
225 | o> readline() -> 15: |
|
231 | o> readline() -> 15: | |
226 | o> banner: line 0\n |
|
232 | o> banner: line 0\n | |
227 | o> readline() -> 15: |
|
233 | o> readline() -> 15: | |
228 | o> banner: line 1\n |
|
234 | o> banner: line 1\n | |
229 | o> readline() -> 15: |
|
235 | o> readline() -> 15: | |
230 | o> banner: line 2\n |
|
236 | o> banner: line 2\n | |
231 | o> readline() -> 15: |
|
237 | o> readline() -> 15: | |
232 | o> banner: line 3\n |
|
238 | o> banner: line 3\n | |
233 | o> readline() -> 15: |
|
239 | o> readline() -> 15: | |
234 | o> banner: line 4\n |
|
240 | o> banner: line 4\n | |
235 | o> readline() -> 15: |
|
241 | o> readline() -> 15: | |
236 | o> banner: line 5\n |
|
242 | o> banner: line 5\n | |
237 | o> readline() -> 15: |
|
243 | o> readline() -> 15: | |
238 | o> banner: line 6\n |
|
244 | o> banner: line 6\n | |
239 | o> readline() -> 15: |
|
245 | o> readline() -> 15: | |
240 | o> banner: line 7\n |
|
246 | o> banner: line 7\n | |
241 | o> readline() -> 15: |
|
247 | o> readline() -> 15: | |
242 | o> banner: line 8\n |
|
248 | o> banner: line 8\n | |
243 | o> readline() -> 15: |
|
249 | o> readline() -> 15: | |
244 | o> banner: line 9\n |
|
250 | o> banner: line 9\n | |
245 | o> readline() -> 4: |
|
251 | o> readline() -> 4: | |
246 |
o> 4 |
|
252 | o> 440\n | |
247 |
o> readline() -> 4 |
|
253 | o> readline() -> 440: | |
248 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
254 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
249 | i> write(98) -> 98: |
|
255 | i> write(98) -> 98: | |
250 | i> between\n |
|
256 | i> between\n | |
251 | i> pairs 81\n |
|
257 | i> pairs 81\n | |
252 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
258 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
253 | o> readline() -> 2: |
|
259 | o> readline() -> 2: | |
254 | o> 1\n |
|
260 | o> 1\n | |
255 | o> readline() -> 1: |
|
261 | o> readline() -> 1: | |
256 | o> \n |
|
262 | o> \n | |
257 |
|
263 | |||
258 | Connecting to a <0.9.1 server that doesn't support the hello command. |
|
264 | Connecting to a <0.9.1 server that doesn't support the hello command. | |
259 | The client should refuse, as we dropped support for connecting to such |
|
265 | The client should refuse, as we dropped support for connecting to such | |
260 | servers. |
|
266 | servers. | |
261 |
|
267 | |||
262 | $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server |
|
268 | $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server | |
263 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
269 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
264 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
270 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
265 | devel-peer-request: hello+between |
|
271 | devel-peer-request: hello+between | |
266 | devel-peer-request: pairs: 81 bytes |
|
272 | devel-peer-request: pairs: 81 bytes | |
267 | sending hello command |
|
273 | sending hello command | |
268 | sending between command |
|
274 | sending between command | |
269 | remote: 0 |
|
275 | remote: 0 | |
270 | remote: 1 |
|
276 | remote: 1 | |
271 | abort: no suitable response from remote hg! |
|
277 | abort: no suitable response from remote hg! | |
272 | [255] |
|
278 | [255] | |
273 |
|
279 | |||
274 | Sending an unknown command to the server results in an empty response to that command |
|
280 | Sending an unknown command to the server results in an empty response to that command | |
275 |
|
281 | |||
276 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
282 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
277 | > raw |
|
283 | > raw | |
278 | > pre-hello\n |
|
284 | > pre-hello\n | |
279 | > readline |
|
285 | > readline | |
280 | > raw |
|
286 | > raw | |
281 | > hello\n |
|
287 | > hello\n | |
282 | > readline |
|
288 | > readline | |
283 | > raw |
|
289 | > raw | |
284 | > between\n |
|
290 | > between\n | |
285 | > pairs 81\n |
|
291 | > pairs 81\n | |
286 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
292 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
287 | > readline |
|
293 | > readline | |
288 | > readline |
|
294 | > readline | |
289 | > EOF |
|
295 | > EOF | |
290 | using raw connection to peer |
|
296 | using raw connection to peer | |
291 | i> write(10) -> 10: |
|
297 | i> write(10) -> 10: | |
292 | i> pre-hello\n |
|
298 | i> pre-hello\n | |
293 | o> readline() -> 2: |
|
299 | o> readline() -> 2: | |
294 | o> 0\n |
|
300 | o> 0\n | |
295 | i> write(6) -> 6: |
|
301 | i> write(6) -> 6: | |
296 | i> hello\n |
|
302 | i> hello\n | |
297 | o> readline() -> 4: |
|
303 | o> readline() -> 4: | |
298 |
o> 4 |
|
304 | o> 440\n | |
299 | i> write(98) -> 98: |
|
305 | i> write(98) -> 98: | |
300 | i> between\n |
|
306 | i> between\n | |
301 | i> pairs 81\n |
|
307 | i> pairs 81\n | |
302 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
308 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
303 |
o> readline() -> 4 |
|
309 | o> readline() -> 440: | |
304 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
310 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
305 | o> readline() -> 2: |
|
311 | o> readline() -> 2: | |
306 | o> 1\n |
|
312 | o> 1\n | |
307 |
|
313 | |||
308 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server |
|
314 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server | |
309 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
315 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
310 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
316 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
311 | sending no-args command |
|
317 | sending no-args command | |
312 | devel-peer-request: hello+between |
|
318 | devel-peer-request: hello+between | |
313 | devel-peer-request: pairs: 81 bytes |
|
319 | devel-peer-request: pairs: 81 bytes | |
314 | sending hello command |
|
320 | sending hello command | |
315 | sending between command |
|
321 | sending between command | |
316 | remote: 0 |
|
322 | remote: 0 | |
317 |
remote: 4 |
|
323 | remote: 440 | |
318 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
324 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
319 | remote: 1 |
|
325 | remote: 1 | |
320 | devel-peer-request: protocaps |
|
326 | devel-peer-request: protocaps | |
321 | devel-peer-request: caps: * bytes (glob) |
|
327 | devel-peer-request: caps: * bytes (glob) | |
322 | sending protocaps command |
|
328 | sending protocaps command | |
323 | url: ssh://user@dummy/server |
|
329 | url: ssh://user@dummy/server | |
324 | local: no |
|
330 | local: no | |
325 | pushable: yes |
|
331 | pushable: yes | |
326 |
|
332 | |||
327 | Send multiple unknown commands before hello |
|
333 | Send multiple unknown commands before hello | |
328 |
|
334 | |||
329 | $ hg -R server debugwireproto --localssh --peer raw << EOF |
|
335 | $ hg -R server debugwireproto --localssh --peer raw << EOF | |
330 | > raw |
|
336 | > raw | |
331 | > unknown1\n |
|
337 | > unknown1\n | |
332 | > readline |
|
338 | > readline | |
333 | > raw |
|
339 | > raw | |
334 | > unknown2\n |
|
340 | > unknown2\n | |
335 | > readline |
|
341 | > readline | |
336 | > raw |
|
342 | > raw | |
337 | > unknown3\n |
|
343 | > unknown3\n | |
338 | > readline |
|
344 | > readline | |
339 | > raw |
|
345 | > raw | |
340 | > hello\n |
|
346 | > hello\n | |
341 | > readline |
|
347 | > readline | |
342 | > readline |
|
348 | > readline | |
343 | > raw |
|
349 | > raw | |
344 | > between\n |
|
350 | > between\n | |
345 | > pairs 81\n |
|
351 | > pairs 81\n | |
346 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
352 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
347 | > readline |
|
353 | > readline | |
348 | > readline |
|
354 | > readline | |
349 | > EOF |
|
355 | > EOF | |
350 | using raw connection to peer |
|
356 | using raw connection to peer | |
351 | i> write(9) -> 9: |
|
357 | i> write(9) -> 9: | |
352 | i> unknown1\n |
|
358 | i> unknown1\n | |
353 | o> readline() -> 2: |
|
359 | o> readline() -> 2: | |
354 | o> 0\n |
|
360 | o> 0\n | |
355 | i> write(9) -> 9: |
|
361 | i> write(9) -> 9: | |
356 | i> unknown2\n |
|
362 | i> unknown2\n | |
357 | o> readline() -> 2: |
|
363 | o> readline() -> 2: | |
358 | o> 0\n |
|
364 | o> 0\n | |
359 | i> write(9) -> 9: |
|
365 | i> write(9) -> 9: | |
360 | i> unknown3\n |
|
366 | i> unknown3\n | |
361 | o> readline() -> 2: |
|
367 | o> readline() -> 2: | |
362 | o> 0\n |
|
368 | o> 0\n | |
363 | i> write(6) -> 6: |
|
369 | i> write(6) -> 6: | |
364 | i> hello\n |
|
370 | i> hello\n | |
365 | o> readline() -> 4: |
|
371 | o> readline() -> 4: | |
366 |
o> 4 |
|
372 | o> 440\n | |
367 |
o> readline() -> 4 |
|
373 | o> readline() -> 440: | |
368 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
374 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
369 | i> write(98) -> 98: |
|
375 | i> write(98) -> 98: | |
370 | i> between\n |
|
376 | i> between\n | |
371 | i> pairs 81\n |
|
377 | i> pairs 81\n | |
372 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
378 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
373 | o> readline() -> 2: |
|
379 | o> readline() -> 2: | |
374 | o> 1\n |
|
380 | o> 1\n | |
375 | o> readline() -> 1: |
|
381 | o> readline() -> 1: | |
376 | o> \n |
|
382 | o> \n | |
377 |
|
383 | |||
378 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server |
|
384 | $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server | |
379 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
385 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
380 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
386 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
381 | sending unknown1 command |
|
387 | sending unknown1 command | |
382 | sending unknown2 command |
|
388 | sending unknown2 command | |
383 | sending unknown3 command |
|
389 | sending unknown3 command | |
384 | devel-peer-request: hello+between |
|
390 | devel-peer-request: hello+between | |
385 | devel-peer-request: pairs: 81 bytes |
|
391 | devel-peer-request: pairs: 81 bytes | |
386 | sending hello command |
|
392 | sending hello command | |
387 | sending between command |
|
393 | sending between command | |
388 | remote: 0 |
|
394 | remote: 0 | |
389 | remote: 0 |
|
395 | remote: 0 | |
390 | remote: 0 |
|
396 | remote: 0 | |
391 |
remote: 4 |
|
397 | remote: 440 | |
392 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
398 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
393 | remote: 1 |
|
399 | remote: 1 | |
394 | devel-peer-request: protocaps |
|
400 | devel-peer-request: protocaps | |
395 | devel-peer-request: caps: * bytes (glob) |
|
401 | devel-peer-request: caps: * bytes (glob) | |
396 | sending protocaps command |
|
402 | sending protocaps command | |
397 | url: ssh://user@dummy/server |
|
403 | url: ssh://user@dummy/server | |
398 | local: no |
|
404 | local: no | |
399 | pushable: yes |
|
405 | pushable: yes | |
400 |
|
406 | |||
401 | Send an unknown command before hello that has arguments |
|
407 | Send an unknown command before hello that has arguments | |
402 |
|
408 | |||
403 | $ cd server |
|
409 | $ cd server | |
404 |
|
410 | |||
405 | $ hg debugwireproto --localssh --peer raw << EOF |
|
411 | $ hg debugwireproto --localssh --peer raw << EOF | |
406 | > raw |
|
412 | > raw | |
407 | > with-args\n |
|
413 | > with-args\n | |
408 | > foo 13\n |
|
414 | > foo 13\n | |
409 | > value for foo\n |
|
415 | > value for foo\n | |
410 | > bar 13\n |
|
416 | > bar 13\n | |
411 | > value for bar\n |
|
417 | > value for bar\n | |
412 | > readline |
|
418 | > readline | |
413 | > readline |
|
419 | > readline | |
414 | > readline |
|
420 | > readline | |
415 | > readline |
|
421 | > readline | |
416 | > readline |
|
422 | > readline | |
417 | > raw |
|
423 | > raw | |
418 | > hello\n |
|
424 | > hello\n | |
419 | > readline |
|
425 | > readline | |
420 | > readline |
|
426 | > readline | |
421 | > raw |
|
427 | > raw | |
422 | > between\n |
|
428 | > between\n | |
423 | > pairs 81\n |
|
429 | > pairs 81\n | |
424 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
430 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
425 | > readline |
|
431 | > readline | |
426 | > readline |
|
432 | > readline | |
427 | > EOF |
|
433 | > EOF | |
428 | using raw connection to peer |
|
434 | using raw connection to peer | |
429 | i> write(52) -> 52: |
|
435 | i> write(52) -> 52: | |
430 | i> with-args\n |
|
436 | i> with-args\n | |
431 | i> foo 13\n |
|
437 | i> foo 13\n | |
432 | i> value for foo\n |
|
438 | i> value for foo\n | |
433 | i> bar 13\n |
|
439 | i> bar 13\n | |
434 | i> value for bar\n |
|
440 | i> value for bar\n | |
435 | o> readline() -> 2: |
|
441 | o> readline() -> 2: | |
436 | o> 0\n |
|
442 | o> 0\n | |
437 | o> readline() -> 2: |
|
443 | o> readline() -> 2: | |
438 | o> 0\n |
|
444 | o> 0\n | |
439 | o> readline() -> 2: |
|
445 | o> readline() -> 2: | |
440 | o> 0\n |
|
446 | o> 0\n | |
441 | o> readline() -> 2: |
|
447 | o> readline() -> 2: | |
442 | o> 0\n |
|
448 | o> 0\n | |
443 | o> readline() -> 2: |
|
449 | o> readline() -> 2: | |
444 | o> 0\n |
|
450 | o> 0\n | |
445 | i> write(6) -> 6: |
|
451 | i> write(6) -> 6: | |
446 | i> hello\n |
|
452 | i> hello\n | |
447 | o> readline() -> 4: |
|
453 | o> readline() -> 4: | |
448 |
o> 4 |
|
454 | o> 440\n | |
449 |
o> readline() -> 4 |
|
455 | o> readline() -> 440: | |
450 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
456 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
451 | i> write(98) -> 98: |
|
457 | i> write(98) -> 98: | |
452 | i> between\n |
|
458 | i> between\n | |
453 | i> pairs 81\n |
|
459 | i> pairs 81\n | |
454 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
460 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
455 | o> readline() -> 2: |
|
461 | o> readline() -> 2: | |
456 | o> 1\n |
|
462 | o> 1\n | |
457 | o> readline() -> 1: |
|
463 | o> readline() -> 1: | |
458 | o> \n |
|
464 | o> \n | |
459 |
|
465 | |||
460 | Send an unknown command having an argument that looks numeric |
|
466 | Send an unknown command having an argument that looks numeric | |
461 |
|
467 | |||
462 | $ hg debugwireproto --localssh --peer raw << EOF |
|
468 | $ hg debugwireproto --localssh --peer raw << EOF | |
463 | > raw |
|
469 | > raw | |
464 | > unknown\n |
|
470 | > unknown\n | |
465 | > foo 1\n |
|
471 | > foo 1\n | |
466 | > 0\n |
|
472 | > 0\n | |
467 | > readline |
|
473 | > readline | |
468 | > readline |
|
474 | > readline | |
469 | > readline |
|
475 | > readline | |
470 | > raw |
|
476 | > raw | |
471 | > hello\n |
|
477 | > hello\n | |
472 | > readline |
|
478 | > readline | |
473 | > readline |
|
479 | > readline | |
474 | > raw |
|
480 | > raw | |
475 | > between\n |
|
481 | > between\n | |
476 | > pairs 81\n |
|
482 | > pairs 81\n | |
477 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
483 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
478 | > readline |
|
484 | > readline | |
479 | > readline |
|
485 | > readline | |
480 | > EOF |
|
486 | > EOF | |
481 | using raw connection to peer |
|
487 | using raw connection to peer | |
482 | i> write(16) -> 16: |
|
488 | i> write(16) -> 16: | |
483 | i> unknown\n |
|
489 | i> unknown\n | |
484 | i> foo 1\n |
|
490 | i> foo 1\n | |
485 | i> 0\n |
|
491 | i> 0\n | |
486 | o> readline() -> 2: |
|
492 | o> readline() -> 2: | |
487 | o> 0\n |
|
493 | o> 0\n | |
488 | o> readline() -> 2: |
|
494 | o> readline() -> 2: | |
489 | o> 0\n |
|
495 | o> 0\n | |
490 | o> readline() -> 2: |
|
496 | o> readline() -> 2: | |
491 | o> 0\n |
|
497 | o> 0\n | |
492 | i> write(6) -> 6: |
|
498 | i> write(6) -> 6: | |
493 | i> hello\n |
|
499 | i> hello\n | |
494 | o> readline() -> 4: |
|
500 | o> readline() -> 4: | |
495 |
o> 4 |
|
501 | o> 440\n | |
496 |
o> readline() -> 4 |
|
502 | o> readline() -> 440: | |
497 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
503 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
498 | i> write(98) -> 98: |
|
504 | i> write(98) -> 98: | |
499 | i> between\n |
|
505 | i> between\n | |
500 | i> pairs 81\n |
|
506 | i> pairs 81\n | |
501 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
507 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
502 | o> readline() -> 2: |
|
508 | o> readline() -> 2: | |
503 | o> 1\n |
|
509 | o> 1\n | |
504 | o> readline() -> 1: |
|
510 | o> readline() -> 1: | |
505 | o> \n |
|
511 | o> \n | |
506 |
|
512 | |||
507 | $ hg debugwireproto --localssh --peer raw << EOF |
|
513 | $ hg debugwireproto --localssh --peer raw << EOF | |
508 | > raw |
|
514 | > raw | |
509 | > unknown\n |
|
515 | > unknown\n | |
510 | > foo 1\n |
|
516 | > foo 1\n | |
511 | > 1\n |
|
517 | > 1\n | |
512 | > readline |
|
518 | > readline | |
513 | > readline |
|
519 | > readline | |
514 | > readline |
|
520 | > readline | |
515 | > raw |
|
521 | > raw | |
516 | > hello\n |
|
522 | > hello\n | |
517 | > readline |
|
523 | > readline | |
518 | > readline |
|
524 | > readline | |
519 | > raw |
|
525 | > raw | |
520 | > between\n |
|
526 | > between\n | |
521 | > pairs 81\n |
|
527 | > pairs 81\n | |
522 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
528 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
523 | > readline |
|
529 | > readline | |
524 | > readline |
|
530 | > readline | |
525 | > EOF |
|
531 | > EOF | |
526 | using raw connection to peer |
|
532 | using raw connection to peer | |
527 | i> write(16) -> 16: |
|
533 | i> write(16) -> 16: | |
528 | i> unknown\n |
|
534 | i> unknown\n | |
529 | i> foo 1\n |
|
535 | i> foo 1\n | |
530 | i> 1\n |
|
536 | i> 1\n | |
531 | o> readline() -> 2: |
|
537 | o> readline() -> 2: | |
532 | o> 0\n |
|
538 | o> 0\n | |
533 | o> readline() -> 2: |
|
539 | o> readline() -> 2: | |
534 | o> 0\n |
|
540 | o> 0\n | |
535 | o> readline() -> 2: |
|
541 | o> readline() -> 2: | |
536 | o> 0\n |
|
542 | o> 0\n | |
537 | i> write(6) -> 6: |
|
543 | i> write(6) -> 6: | |
538 | i> hello\n |
|
544 | i> hello\n | |
539 | o> readline() -> 4: |
|
545 | o> readline() -> 4: | |
540 |
o> 4 |
|
546 | o> 440\n | |
541 |
o> readline() -> 4 |
|
547 | o> readline() -> 440: | |
542 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
548 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
543 | i> write(98) -> 98: |
|
549 | i> write(98) -> 98: | |
544 | i> between\n |
|
550 | i> between\n | |
545 | i> pairs 81\n |
|
551 | i> pairs 81\n | |
546 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
552 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
547 | o> readline() -> 2: |
|
553 | o> readline() -> 2: | |
548 | o> 1\n |
|
554 | o> 1\n | |
549 | o> readline() -> 1: |
|
555 | o> readline() -> 1: | |
550 | o> \n |
|
556 | o> \n | |
551 |
|
557 | |||
552 | When sending a dict argument value, it is serialized to |
|
558 | When sending a dict argument value, it is serialized to | |
553 | "<arg> <item count>" followed by "<key> <len>\n<value>" for each item |
|
559 | "<arg> <item count>" followed by "<key> <len>\n<value>" for each item | |
554 | in the dict. |
|
560 | in the dict. | |
555 |
|
561 | |||
556 | Dictionary value for unknown command |
|
562 | Dictionary value for unknown command | |
557 |
|
563 | |||
558 | $ hg debugwireproto --localssh --peer raw << EOF |
|
564 | $ hg debugwireproto --localssh --peer raw << EOF | |
559 | > raw |
|
565 | > raw | |
560 | > unknown\n |
|
566 | > unknown\n | |
561 | > dict 3\n |
|
567 | > dict 3\n | |
562 | > key1 3\n |
|
568 | > key1 3\n | |
563 | > foo\n |
|
569 | > foo\n | |
564 | > key2 3\n |
|
570 | > key2 3\n | |
565 | > bar\n |
|
571 | > bar\n | |
566 | > key3 3\n |
|
572 | > key3 3\n | |
567 | > baz\n |
|
573 | > baz\n | |
568 | > readline |
|
574 | > readline | |
569 | > readline |
|
575 | > readline | |
570 | > readline |
|
576 | > readline | |
571 | > readline |
|
577 | > readline | |
572 | > readline |
|
578 | > readline | |
573 | > readline |
|
579 | > readline | |
574 | > readline |
|
580 | > readline | |
575 | > readline |
|
581 | > readline | |
576 | > raw |
|
582 | > raw | |
577 | > hello\n |
|
583 | > hello\n | |
578 | > readline |
|
584 | > readline | |
579 | > readline |
|
585 | > readline | |
580 | > EOF |
|
586 | > EOF | |
581 | using raw connection to peer |
|
587 | using raw connection to peer | |
582 | i> write(48) -> 48: |
|
588 | i> write(48) -> 48: | |
583 | i> unknown\n |
|
589 | i> unknown\n | |
584 | i> dict 3\n |
|
590 | i> dict 3\n | |
585 | i> key1 3\n |
|
591 | i> key1 3\n | |
586 | i> foo\n |
|
592 | i> foo\n | |
587 | i> key2 3\n |
|
593 | i> key2 3\n | |
588 | i> bar\n |
|
594 | i> bar\n | |
589 | i> key3 3\n |
|
595 | i> key3 3\n | |
590 | i> baz\n |
|
596 | i> baz\n | |
591 | o> readline() -> 2: |
|
597 | o> readline() -> 2: | |
592 | o> 0\n |
|
598 | o> 0\n | |
593 | o> readline() -> 2: |
|
599 | o> readline() -> 2: | |
594 | o> 0\n |
|
600 | o> 0\n | |
595 | o> readline() -> 2: |
|
601 | o> readline() -> 2: | |
596 | o> 0\n |
|
602 | o> 0\n | |
597 | o> readline() -> 2: |
|
603 | o> readline() -> 2: | |
598 | o> 0\n |
|
604 | o> 0\n | |
599 | o> readline() -> 2: |
|
605 | o> readline() -> 2: | |
600 | o> 0\n |
|
606 | o> 0\n | |
601 | o> readline() -> 2: |
|
607 | o> readline() -> 2: | |
602 | o> 0\n |
|
608 | o> 0\n | |
603 | o> readline() -> 2: |
|
609 | o> readline() -> 2: | |
604 | o> 0\n |
|
610 | o> 0\n | |
605 | o> readline() -> 2: |
|
611 | o> readline() -> 2: | |
606 | o> 0\n |
|
612 | o> 0\n | |
607 | i> write(6) -> 6: |
|
613 | i> write(6) -> 6: | |
608 | i> hello\n |
|
614 | i> hello\n | |
609 | o> readline() -> 4: |
|
615 | o> readline() -> 4: | |
610 |
o> 4 |
|
616 | o> 440\n | |
611 |
o> readline() -> 4 |
|
617 | o> readline() -> 440: | |
612 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
618 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
613 |
|
619 | |||
614 | Incomplete dictionary send |
|
620 | Incomplete dictionary send | |
615 |
|
621 | |||
616 | $ hg debugwireproto --localssh --peer raw << EOF |
|
622 | $ hg debugwireproto --localssh --peer raw << EOF | |
617 | > raw |
|
623 | > raw | |
618 | > unknown\n |
|
624 | > unknown\n | |
619 | > dict 3\n |
|
625 | > dict 3\n | |
620 | > key1 3\n |
|
626 | > key1 3\n | |
621 | > foo\n |
|
627 | > foo\n | |
622 | > readline |
|
628 | > readline | |
623 | > readline |
|
629 | > readline | |
624 | > readline |
|
630 | > readline | |
625 | > readline |
|
631 | > readline | |
626 | > EOF |
|
632 | > EOF | |
627 | using raw connection to peer |
|
633 | using raw connection to peer | |
628 | i> write(26) -> 26: |
|
634 | i> write(26) -> 26: | |
629 | i> unknown\n |
|
635 | i> unknown\n | |
630 | i> dict 3\n |
|
636 | i> dict 3\n | |
631 | i> key1 3\n |
|
637 | i> key1 3\n | |
632 | i> foo\n |
|
638 | i> foo\n | |
633 | o> readline() -> 2: |
|
639 | o> readline() -> 2: | |
634 | o> 0\n |
|
640 | o> 0\n | |
635 | o> readline() -> 2: |
|
641 | o> readline() -> 2: | |
636 | o> 0\n |
|
642 | o> 0\n | |
637 | o> readline() -> 2: |
|
643 | o> readline() -> 2: | |
638 | o> 0\n |
|
644 | o> 0\n | |
639 | o> readline() -> 2: |
|
645 | o> readline() -> 2: | |
640 | o> 0\n |
|
646 | o> 0\n | |
641 |
|
647 | |||
642 | Incomplete value send |
|
648 | Incomplete value send | |
643 |
|
649 | |||
644 | $ hg debugwireproto --localssh --peer raw << EOF |
|
650 | $ hg debugwireproto --localssh --peer raw << EOF | |
645 | > raw |
|
651 | > raw | |
646 | > unknown\n |
|
652 | > unknown\n | |
647 | > dict 3\n |
|
653 | > dict 3\n | |
648 | > key1 3\n |
|
654 | > key1 3\n | |
649 | > fo |
|
655 | > fo | |
650 | > readline |
|
656 | > readline | |
651 | > readline |
|
657 | > readline | |
652 | > readline |
|
658 | > readline | |
653 | > EOF |
|
659 | > EOF | |
654 | using raw connection to peer |
|
660 | using raw connection to peer | |
655 | i> write(24) -> 24: |
|
661 | i> write(24) -> 24: | |
656 | i> unknown\n |
|
662 | i> unknown\n | |
657 | i> dict 3\n |
|
663 | i> dict 3\n | |
658 | i> key1 3\n |
|
664 | i> key1 3\n | |
659 | i> fo |
|
665 | i> fo | |
660 | o> readline() -> 2: |
|
666 | o> readline() -> 2: | |
661 | o> 0\n |
|
667 | o> 0\n | |
662 | o> readline() -> 2: |
|
668 | o> readline() -> 2: | |
663 | o> 0\n |
|
669 | o> 0\n | |
664 | o> readline() -> 2: |
|
670 | o> readline() -> 2: | |
665 | o> 0\n |
|
671 | o> 0\n | |
666 |
|
672 | |||
667 | Send a command line with spaces |
|
673 | Send a command line with spaces | |
668 |
|
674 | |||
669 | $ hg debugwireproto --localssh --peer raw << EOF |
|
675 | $ hg debugwireproto --localssh --peer raw << EOF | |
670 | > raw |
|
676 | > raw | |
671 | > unknown withspace\n |
|
677 | > unknown withspace\n | |
672 | > readline |
|
678 | > readline | |
673 | > raw |
|
679 | > raw | |
674 | > hello\n |
|
680 | > hello\n | |
675 | > readline |
|
681 | > readline | |
676 | > readline |
|
682 | > readline | |
677 | > raw |
|
683 | > raw | |
678 | > between\n |
|
684 | > between\n | |
679 | > pairs 81\n |
|
685 | > pairs 81\n | |
680 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
686 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
681 | > readline |
|
687 | > readline | |
682 | > readline |
|
688 | > readline | |
683 | > EOF |
|
689 | > EOF | |
684 | using raw connection to peer |
|
690 | using raw connection to peer | |
685 | i> write(18) -> 18: |
|
691 | i> write(18) -> 18: | |
686 | i> unknown withspace\n |
|
692 | i> unknown withspace\n | |
687 | o> readline() -> 2: |
|
693 | o> readline() -> 2: | |
688 | o> 0\n |
|
694 | o> 0\n | |
689 | i> write(6) -> 6: |
|
695 | i> write(6) -> 6: | |
690 | i> hello\n |
|
696 | i> hello\n | |
691 | o> readline() -> 4: |
|
697 | o> readline() -> 4: | |
692 |
o> 4 |
|
698 | o> 440\n | |
693 |
o> readline() -> 4 |
|
699 | o> readline() -> 440: | |
694 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
700 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
695 | i> write(98) -> 98: |
|
701 | i> write(98) -> 98: | |
696 | i> between\n |
|
702 | i> between\n | |
697 | i> pairs 81\n |
|
703 | i> pairs 81\n | |
698 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
704 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
699 | o> readline() -> 2: |
|
705 | o> readline() -> 2: | |
700 | o> 1\n |
|
706 | o> 1\n | |
701 | o> readline() -> 1: |
|
707 | o> readline() -> 1: | |
702 | o> \n |
|
708 | o> \n | |
703 |
|
709 | |||
704 | $ hg debugwireproto --localssh --peer raw << EOF |
|
710 | $ hg debugwireproto --localssh --peer raw << EOF | |
705 | > raw |
|
711 | > raw | |
706 | > unknown with multiple spaces\n |
|
712 | > unknown with multiple spaces\n | |
707 | > readline |
|
713 | > readline | |
708 | > raw |
|
714 | > raw | |
709 | > hello\n |
|
715 | > hello\n | |
710 | > readline |
|
716 | > readline | |
711 | > readline |
|
717 | > readline | |
712 | > raw |
|
718 | > raw | |
713 | > between\n |
|
719 | > between\n | |
714 | > pairs 81\n |
|
720 | > pairs 81\n | |
715 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
721 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
716 | > readline |
|
722 | > readline | |
717 | > EOF |
|
723 | > EOF | |
718 | using raw connection to peer |
|
724 | using raw connection to peer | |
719 | i> write(29) -> 29: |
|
725 | i> write(29) -> 29: | |
720 | i> unknown with multiple spaces\n |
|
726 | i> unknown with multiple spaces\n | |
721 | o> readline() -> 2: |
|
727 | o> readline() -> 2: | |
722 | o> 0\n |
|
728 | o> 0\n | |
723 | i> write(6) -> 6: |
|
729 | i> write(6) -> 6: | |
724 | i> hello\n |
|
730 | i> hello\n | |
725 | o> readline() -> 4: |
|
731 | o> readline() -> 4: | |
726 |
o> 4 |
|
732 | o> 440\n | |
727 |
o> readline() -> 4 |
|
733 | o> readline() -> 440: | |
728 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
734 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
729 | i> write(98) -> 98: |
|
735 | i> write(98) -> 98: | |
730 | i> between\n |
|
736 | i> between\n | |
731 | i> pairs 81\n |
|
737 | i> pairs 81\n | |
732 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
738 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
733 | o> readline() -> 2: |
|
739 | o> readline() -> 2: | |
734 | o> 1\n |
|
740 | o> 1\n | |
735 |
|
741 | |||
736 | $ hg debugwireproto --localssh --peer raw << EOF |
|
742 | $ hg debugwireproto --localssh --peer raw << EOF | |
737 | > raw |
|
743 | > raw | |
738 | > unknown with spaces\n |
|
744 | > unknown with spaces\n | |
739 | > key 10\n |
|
745 | > key 10\n | |
740 | > some value\n |
|
746 | > some value\n | |
741 | > readline |
|
747 | > readline | |
742 | > readline |
|
748 | > readline | |
743 | > readline |
|
749 | > readline | |
744 | > raw |
|
750 | > raw | |
745 | > hello\n |
|
751 | > hello\n | |
746 | > readline |
|
752 | > readline | |
747 | > readline |
|
753 | > readline | |
748 | > raw |
|
754 | > raw | |
749 | > between\n |
|
755 | > between\n | |
750 | > pairs 81\n |
|
756 | > pairs 81\n | |
751 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
757 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
752 | > readline |
|
758 | > readline | |
753 | > readline |
|
759 | > readline | |
754 | > EOF |
|
760 | > EOF | |
755 | using raw connection to peer |
|
761 | using raw connection to peer | |
756 | i> write(38) -> 38: |
|
762 | i> write(38) -> 38: | |
757 | i> unknown with spaces\n |
|
763 | i> unknown with spaces\n | |
758 | i> key 10\n |
|
764 | i> key 10\n | |
759 | i> some value\n |
|
765 | i> some value\n | |
760 | o> readline() -> 2: |
|
766 | o> readline() -> 2: | |
761 | o> 0\n |
|
767 | o> 0\n | |
762 | o> readline() -> 2: |
|
768 | o> readline() -> 2: | |
763 | o> 0\n |
|
769 | o> 0\n | |
764 | o> readline() -> 2: |
|
770 | o> readline() -> 2: | |
765 | o> 0\n |
|
771 | o> 0\n | |
766 | i> write(6) -> 6: |
|
772 | i> write(6) -> 6: | |
767 | i> hello\n |
|
773 | i> hello\n | |
768 | o> readline() -> 4: |
|
774 | o> readline() -> 4: | |
769 |
o> 4 |
|
775 | o> 440\n | |
770 |
o> readline() -> 4 |
|
776 | o> readline() -> 440: | |
771 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
777 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
772 | i> write(98) -> 98: |
|
778 | i> write(98) -> 98: | |
773 | i> between\n |
|
779 | i> between\n | |
774 | i> pairs 81\n |
|
780 | i> pairs 81\n | |
775 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
781 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
776 | o> readline() -> 2: |
|
782 | o> readline() -> 2: | |
777 | o> 1\n |
|
783 | o> 1\n | |
778 | o> readline() -> 1: |
|
784 | o> readline() -> 1: | |
779 | o> \n |
|
785 | o> \n | |
780 | Send an unknown command after the "between" |
|
786 | Send an unknown command after the "between" | |
781 |
|
787 | |||
782 | $ hg debugwireproto --localssh --peer raw << EOF |
|
788 | $ hg debugwireproto --localssh --peer raw << EOF | |
783 | > raw |
|
789 | > raw | |
784 | > hello\n |
|
790 | > hello\n | |
785 | > readline |
|
791 | > readline | |
786 | > readline |
|
792 | > readline | |
787 | > raw |
|
793 | > raw | |
788 | > between\n |
|
794 | > between\n | |
789 | > pairs 81\n |
|
795 | > pairs 81\n | |
790 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
|
796 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown | |
791 | > readline |
|
797 | > readline | |
792 | > readline |
|
798 | > readline | |
793 | > EOF |
|
799 | > EOF | |
794 | using raw connection to peer |
|
800 | using raw connection to peer | |
795 | i> write(6) -> 6: |
|
801 | i> write(6) -> 6: | |
796 | i> hello\n |
|
802 | i> hello\n | |
797 | o> readline() -> 4: |
|
803 | o> readline() -> 4: | |
798 |
o> 4 |
|
804 | o> 440\n | |
799 |
o> readline() -> 4 |
|
805 | o> readline() -> 440: | |
800 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
806 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
801 | i> write(105) -> 105: |
|
807 | i> write(105) -> 105: | |
802 | i> between\n |
|
808 | i> between\n | |
803 | i> pairs 81\n |
|
809 | i> pairs 81\n | |
804 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown |
|
810 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000unknown | |
805 | o> readline() -> 2: |
|
811 | o> readline() -> 2: | |
806 | o> 1\n |
|
812 | o> 1\n | |
807 | o> readline() -> 1: |
|
813 | o> readline() -> 1: | |
808 | o> \n |
|
814 | o> \n | |
809 |
|
815 | |||
810 | And one with arguments |
|
816 | And one with arguments | |
811 |
|
817 | |||
812 | $ hg debugwireproto --localssh --peer raw << EOF |
|
818 | $ hg debugwireproto --localssh --peer raw << EOF | |
813 | > raw |
|
819 | > raw | |
814 | > hello\n |
|
820 | > hello\n | |
815 | > between\n |
|
821 | > between\n | |
816 | > pairs 81\n |
|
822 | > pairs 81\n | |
817 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
823 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
818 | > readline |
|
824 | > readline | |
819 | > readline |
|
825 | > readline | |
820 | > readline |
|
826 | > readline | |
821 | > readline |
|
827 | > readline | |
822 | > raw |
|
828 | > raw | |
823 | > unknown\n |
|
829 | > unknown\n | |
824 | > foo 5\n |
|
830 | > foo 5\n | |
825 | > \nvalue\n |
|
831 | > \nvalue\n | |
826 | > bar 3\n |
|
832 | > bar 3\n | |
827 | > baz\n |
|
833 | > baz\n | |
828 | > readline |
|
834 | > readline | |
829 | > readline |
|
835 | > readline | |
830 | > readline |
|
836 | > readline | |
831 | > EOF |
|
837 | > EOF | |
832 | using raw connection to peer |
|
838 | using raw connection to peer | |
833 | i> write(104) -> 104: |
|
839 | i> write(104) -> 104: | |
834 | i> hello\n |
|
840 | i> hello\n | |
835 | i> between\n |
|
841 | i> between\n | |
836 | i> pairs 81\n |
|
842 | i> pairs 81\n | |
837 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
843 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
838 | o> readline() -> 4: |
|
844 | o> readline() -> 4: | |
839 |
o> 4 |
|
845 | o> 440\n | |
840 |
o> readline() -> 4 |
|
846 | o> readline() -> 440: | |
841 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
847 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
842 | o> readline() -> 2: |
|
848 | o> readline() -> 2: | |
843 | o> 1\n |
|
849 | o> 1\n | |
844 | o> readline() -> 1: |
|
850 | o> readline() -> 1: | |
845 | o> \n |
|
851 | o> \n | |
846 | i> write(31) -> 31: |
|
852 | i> write(31) -> 31: | |
847 | i> unknown\n |
|
853 | i> unknown\n | |
848 | i> foo 5\n |
|
854 | i> foo 5\n | |
849 | i> \n |
|
855 | i> \n | |
850 | i> value\n |
|
856 | i> value\n | |
851 | i> bar 3\n |
|
857 | i> bar 3\n | |
852 | i> baz\n |
|
858 | i> baz\n | |
853 | o> readline() -> 2: |
|
859 | o> readline() -> 2: | |
854 | o> 0\n |
|
860 | o> 0\n | |
855 | o> readline() -> 2: |
|
861 | o> readline() -> 2: | |
856 | o> 0\n |
|
862 | o> 0\n | |
857 | o> readline() -> 0: |
|
863 | o> readline() -> 0: | |
858 |
|
864 | |||
859 | Send a valid command before the handshake |
|
865 | Send a valid command before the handshake | |
860 |
|
866 | |||
861 | $ hg debugwireproto --localssh --peer raw << EOF |
|
867 | $ hg debugwireproto --localssh --peer raw << EOF | |
862 | > raw |
|
868 | > raw | |
863 | > heads\n |
|
869 | > heads\n | |
864 | > readline |
|
870 | > readline | |
865 | > raw |
|
871 | > raw | |
866 | > hello\n |
|
872 | > hello\n | |
867 | > between\n |
|
873 | > between\n | |
868 | > pairs 81\n |
|
874 | > pairs 81\n | |
869 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
875 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
870 | > readline |
|
876 | > readline | |
871 | > readline |
|
877 | > readline | |
872 | > readline |
|
878 | > readline | |
873 | > readline |
|
879 | > readline | |
874 | > EOF |
|
880 | > EOF | |
875 | using raw connection to peer |
|
881 | using raw connection to peer | |
876 | i> write(6) -> 6: |
|
882 | i> write(6) -> 6: | |
877 | i> heads\n |
|
883 | i> heads\n | |
878 | o> readline() -> 3: |
|
884 | o> readline() -> 3: | |
879 | o> 41\n |
|
885 | o> 41\n | |
880 | i> write(104) -> 104: |
|
886 | i> write(104) -> 104: | |
881 | i> hello\n |
|
887 | i> hello\n | |
882 | i> between\n |
|
888 | i> between\n | |
883 | i> pairs 81\n |
|
889 | i> pairs 81\n | |
884 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
890 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
885 | o> readline() -> 41: |
|
891 | o> readline() -> 41: | |
886 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n |
|
892 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n | |
887 | o> readline() -> 4: |
|
893 | o> readline() -> 4: | |
888 |
o> 4 |
|
894 | o> 440\n | |
889 |
o> readline() -> 4 |
|
895 | o> readline() -> 440: | |
890 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
896 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
891 | o> readline() -> 2: |
|
897 | o> readline() -> 2: | |
892 | o> 1\n |
|
898 | o> 1\n | |
893 |
|
899 | |||
894 | And a variation that doesn't send the between command |
|
900 | And a variation that doesn't send the between command | |
895 |
|
901 | |||
896 | $ hg debugwireproto --localssh --peer raw << EOF |
|
902 | $ hg debugwireproto --localssh --peer raw << EOF | |
897 | > raw |
|
903 | > raw | |
898 | > heads\n |
|
904 | > heads\n | |
899 | > readline |
|
905 | > readline | |
900 | > raw |
|
906 | > raw | |
901 | > hello\n |
|
907 | > hello\n | |
902 | > readline |
|
908 | > readline | |
903 | > readline |
|
909 | > readline | |
904 | > EOF |
|
910 | > EOF | |
905 | using raw connection to peer |
|
911 | using raw connection to peer | |
906 | i> write(6) -> 6: |
|
912 | i> write(6) -> 6: | |
907 | i> heads\n |
|
913 | i> heads\n | |
908 | o> readline() -> 3: |
|
914 | o> readline() -> 3: | |
909 | o> 41\n |
|
915 | o> 41\n | |
910 | i> write(6) -> 6: |
|
916 | i> write(6) -> 6: | |
911 | i> hello\n |
|
917 | i> hello\n | |
912 | o> readline() -> 41: |
|
918 | o> readline() -> 41: | |
913 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n |
|
919 | o> 68986213bd4485ea51533535e3fc9e78007a711f\n | |
914 | o> readline() -> 4: |
|
920 | o> readline() -> 4: | |
915 |
o> 4 |
|
921 | o> 440\n | |
916 |
|
922 | |||
917 | Send an upgrade request to a server that doesn't support that command |
|
923 | Send an upgrade request to a server that doesn't support that command | |
918 |
|
924 | |||
919 | $ hg debugwireproto --localssh --peer raw << EOF |
|
925 | $ hg debugwireproto --localssh --peer raw << EOF | |
920 | > raw |
|
926 | > raw | |
921 | > upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n |
|
927 | > upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n | |
922 | > readline |
|
928 | > readline | |
923 | > raw |
|
929 | > raw | |
924 | > hello\n |
|
930 | > hello\n | |
925 | > between\n |
|
931 | > between\n | |
926 | > pairs 81\n |
|
932 | > pairs 81\n | |
927 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
933 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
928 | > readline |
|
934 | > readline | |
929 | > readline |
|
935 | > readline | |
930 | > readline |
|
936 | > readline | |
931 | > readline |
|
937 | > readline | |
932 | > EOF |
|
938 | > EOF | |
933 | using raw connection to peer |
|
939 | using raw connection to peer | |
934 | i> write(77) -> 77: |
|
940 | i> write(77) -> 77: | |
935 | i> upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n |
|
941 | i> upgrade 2e82ab3f-9ce3-4b4e-8f8c-6fd1c0e9e23a proto=irrelevant1%2Cirrelevant2\n | |
936 | o> readline() -> 2: |
|
942 | o> readline() -> 2: | |
937 | o> 0\n |
|
943 | o> 0\n | |
938 | i> write(104) -> 104: |
|
944 | i> write(104) -> 104: | |
939 | i> hello\n |
|
945 | i> hello\n | |
940 | i> between\n |
|
946 | i> between\n | |
941 | i> pairs 81\n |
|
947 | i> pairs 81\n | |
942 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
948 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
943 | o> readline() -> 4: |
|
949 | o> readline() -> 4: | |
944 |
o> 4 |
|
950 | o> 440\n | |
945 |
o> readline() -> 4 |
|
951 | o> readline() -> 440: | |
946 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
952 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
947 | o> readline() -> 2: |
|
953 | o> readline() -> 2: | |
948 | o> 1\n |
|
954 | o> 1\n | |
949 | o> readline() -> 1: |
|
955 | o> readline() -> 1: | |
950 | o> \n |
|
956 | o> \n | |
951 |
|
957 | |||
952 | $ cd .. |
|
958 | $ cd .. | |
953 |
|
959 | |||
954 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
|
960 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server | |
955 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
961 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
956 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
962 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
957 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) |
|
963 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) | |
958 | devel-peer-request: hello+between |
|
964 | devel-peer-request: hello+between | |
959 | devel-peer-request: pairs: 81 bytes |
|
965 | devel-peer-request: pairs: 81 bytes | |
960 | sending hello command |
|
966 | sending hello command | |
961 | sending between command |
|
967 | sending between command | |
962 | remote: 0 |
|
968 | remote: 0 | |
963 |
remote: 4 |
|
969 | remote: 440 | |
964 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
970 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
965 | remote: 1 |
|
971 | remote: 1 | |
966 | devel-peer-request: protocaps |
|
972 | devel-peer-request: protocaps | |
967 | devel-peer-request: caps: * bytes (glob) |
|
973 | devel-peer-request: caps: * bytes (glob) | |
968 | sending protocaps command |
|
974 | sending protocaps command | |
969 | url: ssh://user@dummy/server |
|
975 | url: ssh://user@dummy/server | |
970 | local: no |
|
976 | local: no | |
971 | pushable: yes |
|
977 | pushable: yes | |
972 |
|
978 | |||
973 | Enable version 2 support on server. We need to do this in hgrc because we can't |
|
979 | Enable version 2 support on server. We need to do this in hgrc because we can't | |
974 | use --config with `hg serve --stdio`. |
|
980 | use --config with `hg serve --stdio`. | |
975 |
|
981 | |||
976 | $ cat >> server/.hg/hgrc << EOF |
|
982 | $ cat >> server/.hg/hgrc << EOF | |
977 | > [experimental] |
|
983 | > [experimental] | |
978 | > sshserver.support-v2 = true |
|
984 | > sshserver.support-v2 = true | |
979 | > EOF |
|
985 | > EOF | |
980 |
|
986 | |||
981 | Send an upgrade request to a server that supports upgrade |
|
987 | Send an upgrade request to a server that supports upgrade | |
982 |
|
988 | |||
983 | $ cd server |
|
989 | $ cd server | |
984 |
|
990 | |||
985 | $ hg debugwireproto --localssh --peer raw << EOF |
|
991 | $ hg debugwireproto --localssh --peer raw << EOF | |
986 | > raw |
|
992 | > raw | |
987 | > upgrade this-is-some-token proto=exp-ssh-v2-0003\n |
|
993 | > upgrade this-is-some-token proto=exp-ssh-v2-0003\n | |
988 | > hello\n |
|
994 | > hello\n | |
989 | > between\n |
|
995 | > between\n | |
990 | > pairs 81\n |
|
996 | > pairs 81\n | |
991 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
997 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
992 | > readline |
|
998 | > readline | |
993 | > readline |
|
999 | > readline | |
994 | > readline |
|
1000 | > readline | |
995 | > EOF |
|
1001 | > EOF | |
996 | using raw connection to peer |
|
1002 | using raw connection to peer | |
997 | i> write(153) -> 153: |
|
1003 | i> write(153) -> 153: | |
998 | i> upgrade this-is-some-token proto=exp-ssh-v2-0003\n |
|
1004 | i> upgrade this-is-some-token proto=exp-ssh-v2-0003\n | |
999 | i> hello\n |
|
1005 | i> hello\n | |
1000 | i> between\n |
|
1006 | i> between\n | |
1001 | i> pairs 81\n |
|
1007 | i> pairs 81\n | |
1002 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1008 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1003 | o> readline() -> 44: |
|
1009 | o> readline() -> 44: | |
1004 | o> upgraded this-is-some-token exp-ssh-v2-0003\n |
|
1010 | o> upgraded this-is-some-token exp-ssh-v2-0003\n | |
1005 | o> readline() -> 4: |
|
1011 | o> readline() -> 4: | |
1006 |
o> 4 |
|
1012 | o> 439\n | |
1007 |
o> readline() -> 4 |
|
1013 | o> readline() -> 440: | |
1008 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1014 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1009 |
|
1015 | |||
1010 | $ cd .. |
|
1016 | $ cd .. | |
1011 |
|
1017 | |||
1012 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server |
|
1018 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server | |
1013 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
1019 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
1014 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
1020 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
1015 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) |
|
1021 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) | |
1016 | devel-peer-request: hello+between |
|
1022 | devel-peer-request: hello+between | |
1017 | devel-peer-request: pairs: 81 bytes |
|
1023 | devel-peer-request: pairs: 81 bytes | |
1018 | sending hello command |
|
1024 | sending hello command | |
1019 | sending between command |
|
1025 | sending between command | |
1020 | protocol upgraded to exp-ssh-v2-0003 |
|
1026 | protocol upgraded to exp-ssh-v2-0003 | |
1021 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1027 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1022 | devel-peer-request: protocaps |
|
1028 | devel-peer-request: protocaps | |
1023 | devel-peer-request: caps: * bytes (glob) |
|
1029 | devel-peer-request: caps: * bytes (glob) | |
1024 | sending protocaps command |
|
1030 | sending protocaps command | |
1025 | url: ssh://user@dummy/server |
|
1031 | url: ssh://user@dummy/server | |
1026 | local: no |
|
1032 | local: no | |
1027 | pushable: yes |
|
1033 | pushable: yes | |
1028 |
|
1034 | |||
1029 | Verify the peer has capabilities |
|
1035 | Verify the peer has capabilities | |
1030 |
|
1036 | |||
1031 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugcapabilities ssh://user@dummy/server |
|
1037 | $ hg --config experimental.sshpeer.advertise-v2=true --debug debugcapabilities ssh://user@dummy/server | |
1032 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) |
|
1038 | running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !) | |
1033 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) |
|
1039 | running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !) | |
1034 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) |
|
1040 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) | |
1035 | devel-peer-request: hello+between |
|
1041 | devel-peer-request: hello+between | |
1036 | devel-peer-request: pairs: 81 bytes |
|
1042 | devel-peer-request: pairs: 81 bytes | |
1037 | sending hello command |
|
1043 | sending hello command | |
1038 | sending between command |
|
1044 | sending between command | |
1039 | protocol upgraded to exp-ssh-v2-0003 |
|
1045 | protocol upgraded to exp-ssh-v2-0003 | |
1040 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
1046 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1041 | devel-peer-request: protocaps |
|
1047 | devel-peer-request: protocaps | |
1042 | devel-peer-request: caps: * bytes (glob) |
|
1048 | devel-peer-request: caps: * bytes (glob) | |
1043 | sending protocaps command |
|
1049 | sending protocaps command | |
1044 | Main capabilities: |
|
1050 | Main capabilities: | |
1045 | batch |
|
1051 | batch | |
1046 | branchmap |
|
1052 | branchmap | |
1047 | $USUAL_BUNDLE2_CAPS$ |
|
1053 | $USUAL_BUNDLE2_CAPS$ | |
1048 | changegroupsubset |
|
1054 | changegroupsubset | |
1049 | getbundle |
|
1055 | getbundle | |
1050 | known |
|
1056 | known | |
1051 | lookup |
|
1057 | lookup | |
1052 | protocaps |
|
1058 | protocaps | |
1053 | pushkey |
|
1059 | pushkey | |
1054 | streamreqs=generaldelta,revlogv1 |
|
1060 | streamreqs=generaldelta,revlogv1,sparserevlog | |
1055 | unbundle=HG10GZ,HG10BZ,HG10UN |
|
1061 | unbundle=HG10GZ,HG10BZ,HG10UN | |
1056 | unbundlehash |
|
1062 | unbundlehash | |
1057 | Bundle2 capabilities: |
|
1063 | Bundle2 capabilities: | |
1058 | HG20 |
|
1064 | HG20 | |
1059 | bookmarks |
|
1065 | bookmarks | |
1060 | changegroup |
|
1066 | changegroup | |
1061 | 01 |
|
1067 | 01 | |
1062 | 02 |
|
1068 | 02 | |
1063 | digests |
|
1069 | digests | |
1064 | md5 |
|
1070 | md5 | |
1065 | sha1 |
|
1071 | sha1 | |
1066 | sha512 |
|
1072 | sha512 | |
1067 | error |
|
1073 | error | |
1068 | abort |
|
1074 | abort | |
1069 | unsupportedcontent |
|
1075 | unsupportedcontent | |
1070 | pushraced |
|
1076 | pushraced | |
1071 | pushkey |
|
1077 | pushkey | |
1072 | hgtagsfnodes |
|
1078 | hgtagsfnodes | |
1073 | listkeys |
|
1079 | listkeys | |
1074 | phases |
|
1080 | phases | |
1075 | heads |
|
1081 | heads | |
1076 | pushkey |
|
1082 | pushkey | |
1077 | remote-changegroup |
|
1083 | remote-changegroup | |
1078 | http |
|
1084 | http | |
1079 | https |
|
1085 | https | |
1080 | rev-branch-cache |
|
1086 | rev-branch-cache | |
1081 | stream |
|
1087 | stream | |
1082 | v2 |
|
1088 | v2 | |
1083 |
|
1089 | |||
1084 | Command after upgrade to version 2 is processed |
|
1090 | Command after upgrade to version 2 is processed | |
1085 |
|
1091 | |||
1086 | $ cd server |
|
1092 | $ cd server | |
1087 |
|
1093 | |||
1088 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1094 | $ hg debugwireproto --localssh --peer raw << EOF | |
1089 | > raw |
|
1095 | > raw | |
1090 | > upgrade this-is-some-token proto=exp-ssh-v2-0003\n |
|
1096 | > upgrade this-is-some-token proto=exp-ssh-v2-0003\n | |
1091 | > hello\n |
|
1097 | > hello\n | |
1092 | > between\n |
|
1098 | > between\n | |
1093 | > pairs 81\n |
|
1099 | > pairs 81\n | |
1094 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1100 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1095 | > readline |
|
1101 | > readline | |
1096 | > readline |
|
1102 | > readline | |
1097 | > readline |
|
1103 | > readline | |
1098 | > raw |
|
1104 | > raw | |
1099 | > hello\n |
|
1105 | > hello\n | |
1100 | > readline |
|
1106 | > readline | |
1101 | > readline |
|
1107 | > readline | |
1102 | > EOF |
|
1108 | > EOF | |
1103 | using raw connection to peer |
|
1109 | using raw connection to peer | |
1104 | i> write(153) -> 153: |
|
1110 | i> write(153) -> 153: | |
1105 | i> upgrade this-is-some-token proto=exp-ssh-v2-0003\n |
|
1111 | i> upgrade this-is-some-token proto=exp-ssh-v2-0003\n | |
1106 | i> hello\n |
|
1112 | i> hello\n | |
1107 | i> between\n |
|
1113 | i> between\n | |
1108 | i> pairs 81\n |
|
1114 | i> pairs 81\n | |
1109 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1115 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1110 | o> readline() -> 44: |
|
1116 | o> readline() -> 44: | |
1111 | o> upgraded this-is-some-token exp-ssh-v2-0003\n |
|
1117 | o> upgraded this-is-some-token exp-ssh-v2-0003\n | |
1112 | o> readline() -> 4: |
|
1118 | o> readline() -> 4: | |
1113 |
o> 4 |
|
1119 | o> 439\n | |
1114 |
o> readline() -> 4 |
|
1120 | o> readline() -> 440: | |
1115 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1121 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1116 | i> write(6) -> 6: |
|
1122 | i> write(6) -> 6: | |
1117 | i> hello\n |
|
1123 | i> hello\n | |
1118 | o> readline() -> 4: |
|
1124 | o> readline() -> 4: | |
1119 |
o> 4 |
|
1125 | o> 424\n | |
1120 |
o> readline() -> 4 |
|
1126 | o> readline() -> 424: | |
1121 | o> capabilities: branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1127 | o> capabilities: branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1122 |
|
1128 | |||
1123 | Multiple upgrades is not allowed |
|
1129 | Multiple upgrades is not allowed | |
1124 |
|
1130 | |||
1125 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1131 | $ hg debugwireproto --localssh --peer raw << EOF | |
1126 | > raw |
|
1132 | > raw | |
1127 | > upgrade this-is-some-token proto=exp-ssh-v2-0003\n |
|
1133 | > upgrade this-is-some-token proto=exp-ssh-v2-0003\n | |
1128 | > hello\n |
|
1134 | > hello\n | |
1129 | > between\n |
|
1135 | > between\n | |
1130 | > pairs 81\n |
|
1136 | > pairs 81\n | |
1131 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1137 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1132 | > readline |
|
1138 | > readline | |
1133 | > readline |
|
1139 | > readline | |
1134 | > readline |
|
1140 | > readline | |
1135 | > raw |
|
1141 | > raw | |
1136 | > upgrade another-token proto=irrelevant\n |
|
1142 | > upgrade another-token proto=irrelevant\n | |
1137 | > hello\n |
|
1143 | > hello\n | |
1138 | > readline |
|
1144 | > readline | |
1139 | > readavailable |
|
1145 | > readavailable | |
1140 | > EOF |
|
1146 | > EOF | |
1141 | using raw connection to peer |
|
1147 | using raw connection to peer | |
1142 | i> write(153) -> 153: |
|
1148 | i> write(153) -> 153: | |
1143 | i> upgrade this-is-some-token proto=exp-ssh-v2-0003\n |
|
1149 | i> upgrade this-is-some-token proto=exp-ssh-v2-0003\n | |
1144 | i> hello\n |
|
1150 | i> hello\n | |
1145 | i> between\n |
|
1151 | i> between\n | |
1146 | i> pairs 81\n |
|
1152 | i> pairs 81\n | |
1147 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1153 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1148 | o> readline() -> 44: |
|
1154 | o> readline() -> 44: | |
1149 | o> upgraded this-is-some-token exp-ssh-v2-0003\n |
|
1155 | o> upgraded this-is-some-token exp-ssh-v2-0003\n | |
1150 | o> readline() -> 4: |
|
1156 | o> readline() -> 4: | |
1151 |
o> 4 |
|
1157 | o> 439\n | |
1152 |
o> readline() -> 4 |
|
1158 | o> readline() -> 440: | |
1153 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1159 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1154 | i> write(45) -> 45: |
|
1160 | i> write(45) -> 45: | |
1155 | i> upgrade another-token proto=irrelevant\n |
|
1161 | i> upgrade another-token proto=irrelevant\n | |
1156 | i> hello\n |
|
1162 | i> hello\n | |
1157 | o> readline() -> 1: |
|
1163 | o> readline() -> 1: | |
1158 | o> \n |
|
1164 | o> \n | |
1159 | e> read(-1) -> 42: |
|
1165 | e> read(-1) -> 42: | |
1160 | e> cannot upgrade protocols multiple times\n |
|
1166 | e> cannot upgrade protocols multiple times\n | |
1161 | e> -\n |
|
1167 | e> -\n | |
1162 |
|
1168 | |||
1163 | Malformed upgrade request line (not exactly 3 space delimited tokens) |
|
1169 | Malformed upgrade request line (not exactly 3 space delimited tokens) | |
1164 |
|
1170 | |||
1165 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1171 | $ hg debugwireproto --localssh --peer raw << EOF | |
1166 | > raw |
|
1172 | > raw | |
1167 | > upgrade\n |
|
1173 | > upgrade\n | |
1168 | > readline |
|
1174 | > readline | |
1169 | > EOF |
|
1175 | > EOF | |
1170 | using raw connection to peer |
|
1176 | using raw connection to peer | |
1171 | i> write(8) -> 8: |
|
1177 | i> write(8) -> 8: | |
1172 | i> upgrade\n |
|
1178 | i> upgrade\n | |
1173 | o> readline() -> 2: |
|
1179 | o> readline() -> 2: | |
1174 | o> 0\n |
|
1180 | o> 0\n | |
1175 |
|
1181 | |||
1176 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1182 | $ hg debugwireproto --localssh --peer raw << EOF | |
1177 | > raw |
|
1183 | > raw | |
1178 | > upgrade token\n |
|
1184 | > upgrade token\n | |
1179 | > readline |
|
1185 | > readline | |
1180 | > EOF |
|
1186 | > EOF | |
1181 | using raw connection to peer |
|
1187 | using raw connection to peer | |
1182 | i> write(14) -> 14: |
|
1188 | i> write(14) -> 14: | |
1183 | i> upgrade token\n |
|
1189 | i> upgrade token\n | |
1184 | o> readline() -> 2: |
|
1190 | o> readline() -> 2: | |
1185 | o> 0\n |
|
1191 | o> 0\n | |
1186 |
|
1192 | |||
1187 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1193 | $ hg debugwireproto --localssh --peer raw << EOF | |
1188 | > raw |
|
1194 | > raw | |
1189 | > upgrade token foo=bar extra-token\n |
|
1195 | > upgrade token foo=bar extra-token\n | |
1190 | > readline |
|
1196 | > readline | |
1191 | > EOF |
|
1197 | > EOF | |
1192 | using raw connection to peer |
|
1198 | using raw connection to peer | |
1193 | i> write(34) -> 34: |
|
1199 | i> write(34) -> 34: | |
1194 | i> upgrade token foo=bar extra-token\n |
|
1200 | i> upgrade token foo=bar extra-token\n | |
1195 | o> readline() -> 2: |
|
1201 | o> readline() -> 2: | |
1196 | o> 0\n |
|
1202 | o> 0\n | |
1197 |
|
1203 | |||
1198 | Upgrade request to unsupported protocol is ignored |
|
1204 | Upgrade request to unsupported protocol is ignored | |
1199 |
|
1205 | |||
1200 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1206 | $ hg debugwireproto --localssh --peer raw << EOF | |
1201 | > raw |
|
1207 | > raw | |
1202 | > upgrade this-is-some-token proto=unknown1,unknown2\n |
|
1208 | > upgrade this-is-some-token proto=unknown1,unknown2\n | |
1203 | > readline |
|
1209 | > readline | |
1204 | > raw |
|
1210 | > raw | |
1205 | > hello\n |
|
1211 | > hello\n | |
1206 | > readline |
|
1212 | > readline | |
1207 | > readline |
|
1213 | > readline | |
1208 | > raw |
|
1214 | > raw | |
1209 | > between\n |
|
1215 | > between\n | |
1210 | > pairs 81\n |
|
1216 | > pairs 81\n | |
1211 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1217 | > 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1212 | > readline |
|
1218 | > readline | |
1213 | > readline |
|
1219 | > readline | |
1214 | > EOF |
|
1220 | > EOF | |
1215 | using raw connection to peer |
|
1221 | using raw connection to peer | |
1216 | i> write(51) -> 51: |
|
1222 | i> write(51) -> 51: | |
1217 | i> upgrade this-is-some-token proto=unknown1,unknown2\n |
|
1223 | i> upgrade this-is-some-token proto=unknown1,unknown2\n | |
1218 | o> readline() -> 2: |
|
1224 | o> readline() -> 2: | |
1219 | o> 0\n |
|
1225 | o> 0\n | |
1220 | i> write(6) -> 6: |
|
1226 | i> write(6) -> 6: | |
1221 | i> hello\n |
|
1227 | i> hello\n | |
1222 | o> readline() -> 4: |
|
1228 | o> readline() -> 4: | |
1223 |
o> 4 |
|
1229 | o> 440\n | |
1224 |
o> readline() -> 4 |
|
1230 | o> readline() -> 440: | |
1225 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1231 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1226 | i> write(98) -> 98: |
|
1232 | i> write(98) -> 98: | |
1227 | i> between\n |
|
1233 | i> between\n | |
1228 | i> pairs 81\n |
|
1234 | i> pairs 81\n | |
1229 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1235 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1230 | o> readline() -> 2: |
|
1236 | o> readline() -> 2: | |
1231 | o> 1\n |
|
1237 | o> 1\n | |
1232 | o> readline() -> 1: |
|
1238 | o> readline() -> 1: | |
1233 | o> \n |
|
1239 | o> \n | |
1234 |
|
1240 | |||
1235 | Upgrade request must be followed by hello + between |
|
1241 | Upgrade request must be followed by hello + between | |
1236 |
|
1242 | |||
1237 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1243 | $ hg debugwireproto --localssh --peer raw << EOF | |
1238 | > raw |
|
1244 | > raw | |
1239 | > upgrade token proto=exp-ssh-v2-0003\n |
|
1245 | > upgrade token proto=exp-ssh-v2-0003\n | |
1240 | > invalid\n |
|
1246 | > invalid\n | |
1241 | > readline |
|
1247 | > readline | |
1242 | > readavailable |
|
1248 | > readavailable | |
1243 | > EOF |
|
1249 | > EOF | |
1244 | using raw connection to peer |
|
1250 | using raw connection to peer | |
1245 | i> write(44) -> 44: |
|
1251 | i> write(44) -> 44: | |
1246 | i> upgrade token proto=exp-ssh-v2-0003\n |
|
1252 | i> upgrade token proto=exp-ssh-v2-0003\n | |
1247 | i> invalid\n |
|
1253 | i> invalid\n | |
1248 | o> readline() -> 1: |
|
1254 | o> readline() -> 1: | |
1249 | o> \n |
|
1255 | o> \n | |
1250 | e> read(-1) -> 46: |
|
1256 | e> read(-1) -> 46: | |
1251 | e> malformed handshake protocol: missing hello\n |
|
1257 | e> malformed handshake protocol: missing hello\n | |
1252 | e> -\n |
|
1258 | e> -\n | |
1253 |
|
1259 | |||
1254 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1260 | $ hg debugwireproto --localssh --peer raw << EOF | |
1255 | > raw |
|
1261 | > raw | |
1256 | > upgrade token proto=exp-ssh-v2-0003\n |
|
1262 | > upgrade token proto=exp-ssh-v2-0003\n | |
1257 | > hello\n |
|
1263 | > hello\n | |
1258 | > invalid\n |
|
1264 | > invalid\n | |
1259 | > readline |
|
1265 | > readline | |
1260 | > readavailable |
|
1266 | > readavailable | |
1261 | > EOF |
|
1267 | > EOF | |
1262 | using raw connection to peer |
|
1268 | using raw connection to peer | |
1263 | i> write(50) -> 50: |
|
1269 | i> write(50) -> 50: | |
1264 | i> upgrade token proto=exp-ssh-v2-0003\n |
|
1270 | i> upgrade token proto=exp-ssh-v2-0003\n | |
1265 | i> hello\n |
|
1271 | i> hello\n | |
1266 | i> invalid\n |
|
1272 | i> invalid\n | |
1267 | o> readline() -> 1: |
|
1273 | o> readline() -> 1: | |
1268 | o> \n |
|
1274 | o> \n | |
1269 | e> read(-1) -> 48: |
|
1275 | e> read(-1) -> 48: | |
1270 | e> malformed handshake protocol: missing between\n |
|
1276 | e> malformed handshake protocol: missing between\n | |
1271 | e> -\n |
|
1277 | e> -\n | |
1272 |
|
1278 | |||
1273 | $ hg debugwireproto --localssh --peer raw << EOF |
|
1279 | $ hg debugwireproto --localssh --peer raw << EOF | |
1274 | > raw |
|
1280 | > raw | |
1275 | > upgrade token proto=exp-ssh-v2-0003\n |
|
1281 | > upgrade token proto=exp-ssh-v2-0003\n | |
1276 | > hello\n |
|
1282 | > hello\n | |
1277 | > between\n |
|
1283 | > between\n | |
1278 | > invalid\n |
|
1284 | > invalid\n | |
1279 | > readline |
|
1285 | > readline | |
1280 | > readavailable |
|
1286 | > readavailable | |
1281 | > EOF |
|
1287 | > EOF | |
1282 | using raw connection to peer |
|
1288 | using raw connection to peer | |
1283 | i> write(58) -> 58: |
|
1289 | i> write(58) -> 58: | |
1284 | i> upgrade token proto=exp-ssh-v2-0003\n |
|
1290 | i> upgrade token proto=exp-ssh-v2-0003\n | |
1285 | i> hello\n |
|
1291 | i> hello\n | |
1286 | i> between\n |
|
1292 | i> between\n | |
1287 | i> invalid\n |
|
1293 | i> invalid\n | |
1288 | o> readline() -> 1: |
|
1294 | o> readline() -> 1: | |
1289 | o> \n |
|
1295 | o> \n | |
1290 | e> read(-1) -> 49: |
|
1296 | e> read(-1) -> 49: | |
1291 | e> malformed handshake protocol: missing pairs 81\n |
|
1297 | e> malformed handshake protocol: missing pairs 81\n | |
1292 | e> -\n |
|
1298 | e> -\n | |
1293 |
|
1299 | |||
1294 | Legacy commands are not exposed to version 2 of protocol |
|
1300 | Legacy commands are not exposed to version 2 of protocol | |
1295 |
|
1301 | |||
1296 | TODO re-enable these once we're back to actually using v2 commands |
|
1302 | TODO re-enable these once we're back to actually using v2 commands | |
1297 |
|
1303 | |||
1298 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
|
1304 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | |
1299 | > command branches |
|
1305 | > command branches | |
1300 | > nodes 0000000000000000000000000000000000000000 |
|
1306 | > nodes 0000000000000000000000000000000000000000 | |
1301 | > EOF |
|
1307 | > EOF | |
1302 | creating ssh peer from handshake results |
|
1308 | creating ssh peer from handshake results | |
1303 | sending branches command |
|
1309 | sending branches command | |
1304 | response: |
|
1310 | response: | |
1305 |
|
1311 | |||
1306 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
|
1312 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | |
1307 | > command changegroup |
|
1313 | > command changegroup | |
1308 | > roots 0000000000000000000000000000000000000000 |
|
1314 | > roots 0000000000000000000000000000000000000000 | |
1309 | > EOF |
|
1315 | > EOF | |
1310 | creating ssh peer from handshake results |
|
1316 | creating ssh peer from handshake results | |
1311 | sending changegroup command |
|
1317 | sending changegroup command | |
1312 | response: |
|
1318 | response: | |
1313 |
|
1319 | |||
1314 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF |
|
1320 | $ hg --config experimental.sshpeer.advertise-v2=true debugwireproto --localssh << EOF | |
1315 | > command changegroupsubset |
|
1321 | > command changegroupsubset | |
1316 | > bases 0000000000000000000000000000000000000000 |
|
1322 | > bases 0000000000000000000000000000000000000000 | |
1317 | > heads 0000000000000000000000000000000000000000 |
|
1323 | > heads 0000000000000000000000000000000000000000 | |
1318 | > EOF |
|
1324 | > EOF | |
1319 | creating ssh peer from handshake results |
|
1325 | creating ssh peer from handshake results | |
1320 | sending changegroupsubset command |
|
1326 | sending changegroupsubset command | |
1321 | response: |
|
1327 | response: | |
1322 |
|
1328 | |||
1323 | $ cd .. |
|
1329 | $ cd .. | |
1324 |
|
1330 | |||
1325 | Test listkeys for listing namespaces |
|
1331 | Test listkeys for listing namespaces | |
1326 |
|
1332 | |||
1327 | $ hg init empty |
|
1333 | $ hg init empty | |
1328 | $ cd empty |
|
1334 | $ cd empty | |
1329 | $ debugwireproto << EOF |
|
1335 | $ debugwireproto << EOF | |
1330 | > command listkeys |
|
1336 | > command listkeys | |
1331 | > namespace namespaces |
|
1337 | > namespace namespaces | |
1332 | > EOF |
|
1338 | > EOF | |
1333 | testing ssh1 |
|
1339 | testing ssh1 | |
1334 | creating ssh peer from handshake results |
|
1340 | creating ssh peer from handshake results | |
1335 | i> write(104) -> 104: |
|
1341 | i> write(104) -> 104: | |
1336 | i> hello\n |
|
1342 | i> hello\n | |
1337 | i> between\n |
|
1343 | i> between\n | |
1338 | i> pairs 81\n |
|
1344 | i> pairs 81\n | |
1339 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1345 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1340 | i> flush() -> None |
|
1346 | i> flush() -> None | |
1341 | o> readline() -> 4: |
|
1347 | o> readline() -> 4: | |
1342 |
o> 4 |
|
1348 | o> 440\n | |
1343 |
o> readline() -> 4 |
|
1349 | o> readline() -> 440: | |
1344 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1350 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1345 | o> readline() -> 2: |
|
1351 | o> readline() -> 2: | |
1346 | o> 1\n |
|
1352 | o> 1\n | |
1347 | o> readline() -> 1: |
|
1353 | o> readline() -> 1: | |
1348 | o> \n |
|
1354 | o> \n | |
1349 | sending listkeys command |
|
1355 | sending listkeys command | |
1350 | i> write(9) -> 9: |
|
1356 | i> write(9) -> 9: | |
1351 | i> listkeys\n |
|
1357 | i> listkeys\n | |
1352 | i> write(13) -> 13: |
|
1358 | i> write(13) -> 13: | |
1353 | i> namespace 10\n |
|
1359 | i> namespace 10\n | |
1354 | i> write(10) -> 10: namespaces |
|
1360 | i> write(10) -> 10: namespaces | |
1355 | i> flush() -> None |
|
1361 | i> flush() -> None | |
1356 | o> bufferedreadline() -> 3: |
|
1362 | o> bufferedreadline() -> 3: | |
1357 | o> 30\n |
|
1363 | o> 30\n | |
1358 | o> bufferedread(30) -> 30: |
|
1364 | o> bufferedread(30) -> 30: | |
1359 | o> bookmarks\t\n |
|
1365 | o> bookmarks\t\n | |
1360 | o> namespaces\t\n |
|
1366 | o> namespaces\t\n | |
1361 | o> phases\t |
|
1367 | o> phases\t | |
1362 | response: { |
|
1368 | response: { | |
1363 | b'bookmarks': b'', |
|
1369 | b'bookmarks': b'', | |
1364 | b'namespaces': b'', |
|
1370 | b'namespaces': b'', | |
1365 | b'phases': b'' |
|
1371 | b'phases': b'' | |
1366 | } |
|
1372 | } | |
1367 |
|
1373 | |||
1368 | testing ssh2 |
|
1374 | testing ssh2 | |
1369 | creating ssh peer from handshake results |
|
1375 | creating ssh peer from handshake results | |
1370 | i> write(171) -> 171: |
|
1376 | i> write(171) -> 171: | |
1371 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1377 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1372 | i> hello\n |
|
1378 | i> hello\n | |
1373 | i> between\n |
|
1379 | i> between\n | |
1374 | i> pairs 81\n |
|
1380 | i> pairs 81\n | |
1375 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1381 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1376 | i> flush() -> None |
|
1382 | i> flush() -> None | |
1377 | o> readline() -> 62: |
|
1383 | o> readline() -> 62: | |
1378 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1384 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1379 | o> readline() -> 4: |
|
1385 | o> readline() -> 4: | |
1380 |
o> 4 |
|
1386 | o> 439\n | |
1381 |
o> read(4 |
|
1387 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1382 | o> read(1) -> 1: |
|
1388 | o> read(1) -> 1: | |
1383 | o> \n |
|
1389 | o> \n | |
1384 | sending listkeys command |
|
1390 | sending listkeys command | |
1385 | i> write(9) -> 9: |
|
1391 | i> write(9) -> 9: | |
1386 | i> listkeys\n |
|
1392 | i> listkeys\n | |
1387 | i> write(13) -> 13: |
|
1393 | i> write(13) -> 13: | |
1388 | i> namespace 10\n |
|
1394 | i> namespace 10\n | |
1389 | i> write(10) -> 10: namespaces |
|
1395 | i> write(10) -> 10: namespaces | |
1390 | i> flush() -> None |
|
1396 | i> flush() -> None | |
1391 | o> bufferedreadline() -> 3: |
|
1397 | o> bufferedreadline() -> 3: | |
1392 | o> 30\n |
|
1398 | o> 30\n | |
1393 | o> bufferedread(30) -> 30: |
|
1399 | o> bufferedread(30) -> 30: | |
1394 | o> bookmarks\t\n |
|
1400 | o> bookmarks\t\n | |
1395 | o> namespaces\t\n |
|
1401 | o> namespaces\t\n | |
1396 | o> phases\t |
|
1402 | o> phases\t | |
1397 | response: { |
|
1403 | response: { | |
1398 | b'bookmarks': b'', |
|
1404 | b'bookmarks': b'', | |
1399 | b'namespaces': b'', |
|
1405 | b'namespaces': b'', | |
1400 | b'phases': b'' |
|
1406 | b'phases': b'' | |
1401 | } |
|
1407 | } | |
1402 |
|
1408 | |||
1403 | $ cd .. |
|
1409 | $ cd .. | |
1404 |
|
1410 | |||
1405 | Test listkeys for bookmarks |
|
1411 | Test listkeys for bookmarks | |
1406 |
|
1412 | |||
1407 | $ hg init bookmarkrepo |
|
1413 | $ hg init bookmarkrepo | |
1408 | $ cd bookmarkrepo |
|
1414 | $ cd bookmarkrepo | |
1409 | $ echo 0 > foo |
|
1415 | $ echo 0 > foo | |
1410 | $ hg add foo |
|
1416 | $ hg add foo | |
1411 | $ hg -q commit -m initial |
|
1417 | $ hg -q commit -m initial | |
1412 | $ echo 1 > foo |
|
1418 | $ echo 1 > foo | |
1413 | $ hg commit -m second |
|
1419 | $ hg commit -m second | |
1414 |
|
1420 | |||
1415 | With no bookmarks set |
|
1421 | With no bookmarks set | |
1416 |
|
1422 | |||
1417 | $ debugwireproto << EOF |
|
1423 | $ debugwireproto << EOF | |
1418 | > command listkeys |
|
1424 | > command listkeys | |
1419 | > namespace bookmarks |
|
1425 | > namespace bookmarks | |
1420 | > EOF |
|
1426 | > EOF | |
1421 | testing ssh1 |
|
1427 | testing ssh1 | |
1422 | creating ssh peer from handshake results |
|
1428 | creating ssh peer from handshake results | |
1423 | i> write(104) -> 104: |
|
1429 | i> write(104) -> 104: | |
1424 | i> hello\n |
|
1430 | i> hello\n | |
1425 | i> between\n |
|
1431 | i> between\n | |
1426 | i> pairs 81\n |
|
1432 | i> pairs 81\n | |
1427 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1433 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1428 | i> flush() -> None |
|
1434 | i> flush() -> None | |
1429 | o> readline() -> 4: |
|
1435 | o> readline() -> 4: | |
1430 |
o> 4 |
|
1436 | o> 440\n | |
1431 |
o> readline() -> 4 |
|
1437 | o> readline() -> 440: | |
1432 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1438 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1433 | o> readline() -> 2: |
|
1439 | o> readline() -> 2: | |
1434 | o> 1\n |
|
1440 | o> 1\n | |
1435 | o> readline() -> 1: |
|
1441 | o> readline() -> 1: | |
1436 | o> \n |
|
1442 | o> \n | |
1437 | sending listkeys command |
|
1443 | sending listkeys command | |
1438 | i> write(9) -> 9: |
|
1444 | i> write(9) -> 9: | |
1439 | i> listkeys\n |
|
1445 | i> listkeys\n | |
1440 | i> write(12) -> 12: |
|
1446 | i> write(12) -> 12: | |
1441 | i> namespace 9\n |
|
1447 | i> namespace 9\n | |
1442 | i> write(9) -> 9: bookmarks |
|
1448 | i> write(9) -> 9: bookmarks | |
1443 | i> flush() -> None |
|
1449 | i> flush() -> None | |
1444 | o> bufferedreadline() -> 2: |
|
1450 | o> bufferedreadline() -> 2: | |
1445 | o> 0\n |
|
1451 | o> 0\n | |
1446 | response: {} |
|
1452 | response: {} | |
1447 |
|
1453 | |||
1448 | testing ssh2 |
|
1454 | testing ssh2 | |
1449 | creating ssh peer from handshake results |
|
1455 | creating ssh peer from handshake results | |
1450 | i> write(171) -> 171: |
|
1456 | i> write(171) -> 171: | |
1451 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1457 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1452 | i> hello\n |
|
1458 | i> hello\n | |
1453 | i> between\n |
|
1459 | i> between\n | |
1454 | i> pairs 81\n |
|
1460 | i> pairs 81\n | |
1455 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1461 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1456 | i> flush() -> None |
|
1462 | i> flush() -> None | |
1457 | o> readline() -> 62: |
|
1463 | o> readline() -> 62: | |
1458 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1464 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1459 | o> readline() -> 4: |
|
1465 | o> readline() -> 4: | |
1460 |
o> 4 |
|
1466 | o> 439\n | |
1461 |
o> read(4 |
|
1467 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1462 | o> read(1) -> 1: |
|
1468 | o> read(1) -> 1: | |
1463 | o> \n |
|
1469 | o> \n | |
1464 | sending listkeys command |
|
1470 | sending listkeys command | |
1465 | i> write(9) -> 9: |
|
1471 | i> write(9) -> 9: | |
1466 | i> listkeys\n |
|
1472 | i> listkeys\n | |
1467 | i> write(12) -> 12: |
|
1473 | i> write(12) -> 12: | |
1468 | i> namespace 9\n |
|
1474 | i> namespace 9\n | |
1469 | i> write(9) -> 9: bookmarks |
|
1475 | i> write(9) -> 9: bookmarks | |
1470 | i> flush() -> None |
|
1476 | i> flush() -> None | |
1471 | o> bufferedreadline() -> 2: |
|
1477 | o> bufferedreadline() -> 2: | |
1472 | o> 0\n |
|
1478 | o> 0\n | |
1473 | response: {} |
|
1479 | response: {} | |
1474 |
|
1480 | |||
1475 | With a single bookmark set |
|
1481 | With a single bookmark set | |
1476 |
|
1482 | |||
1477 | $ hg book -r 0 bookA |
|
1483 | $ hg book -r 0 bookA | |
1478 | $ debugwireproto << EOF |
|
1484 | $ debugwireproto << EOF | |
1479 | > command listkeys |
|
1485 | > command listkeys | |
1480 | > namespace bookmarks |
|
1486 | > namespace bookmarks | |
1481 | > EOF |
|
1487 | > EOF | |
1482 | testing ssh1 |
|
1488 | testing ssh1 | |
1483 | creating ssh peer from handshake results |
|
1489 | creating ssh peer from handshake results | |
1484 | i> write(104) -> 104: |
|
1490 | i> write(104) -> 104: | |
1485 | i> hello\n |
|
1491 | i> hello\n | |
1486 | i> between\n |
|
1492 | i> between\n | |
1487 | i> pairs 81\n |
|
1493 | i> pairs 81\n | |
1488 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1494 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1489 | i> flush() -> None |
|
1495 | i> flush() -> None | |
1490 | o> readline() -> 4: |
|
1496 | o> readline() -> 4: | |
1491 |
o> 4 |
|
1497 | o> 440\n | |
1492 |
o> readline() -> 4 |
|
1498 | o> readline() -> 440: | |
1493 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1499 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1494 | o> readline() -> 2: |
|
1500 | o> readline() -> 2: | |
1495 | o> 1\n |
|
1501 | o> 1\n | |
1496 | o> readline() -> 1: |
|
1502 | o> readline() -> 1: | |
1497 | o> \n |
|
1503 | o> \n | |
1498 | sending listkeys command |
|
1504 | sending listkeys command | |
1499 | i> write(9) -> 9: |
|
1505 | i> write(9) -> 9: | |
1500 | i> listkeys\n |
|
1506 | i> listkeys\n | |
1501 | i> write(12) -> 12: |
|
1507 | i> write(12) -> 12: | |
1502 | i> namespace 9\n |
|
1508 | i> namespace 9\n | |
1503 | i> write(9) -> 9: bookmarks |
|
1509 | i> write(9) -> 9: bookmarks | |
1504 | i> flush() -> None |
|
1510 | i> flush() -> None | |
1505 | o> bufferedreadline() -> 3: |
|
1511 | o> bufferedreadline() -> 3: | |
1506 | o> 46\n |
|
1512 | o> 46\n | |
1507 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f |
|
1513 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f | |
1508 | response: { |
|
1514 | response: { | |
1509 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f' |
|
1515 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f' | |
1510 | } |
|
1516 | } | |
1511 |
|
1517 | |||
1512 | testing ssh2 |
|
1518 | testing ssh2 | |
1513 | creating ssh peer from handshake results |
|
1519 | creating ssh peer from handshake results | |
1514 | i> write(171) -> 171: |
|
1520 | i> write(171) -> 171: | |
1515 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1521 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1516 | i> hello\n |
|
1522 | i> hello\n | |
1517 | i> between\n |
|
1523 | i> between\n | |
1518 | i> pairs 81\n |
|
1524 | i> pairs 81\n | |
1519 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1525 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1520 | i> flush() -> None |
|
1526 | i> flush() -> None | |
1521 | o> readline() -> 62: |
|
1527 | o> readline() -> 62: | |
1522 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1528 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1523 | o> readline() -> 4: |
|
1529 | o> readline() -> 4: | |
1524 |
o> 4 |
|
1530 | o> 439\n | |
1525 |
o> read(4 |
|
1531 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1526 | o> read(1) -> 1: |
|
1532 | o> read(1) -> 1: | |
1527 | o> \n |
|
1533 | o> \n | |
1528 | sending listkeys command |
|
1534 | sending listkeys command | |
1529 | i> write(9) -> 9: |
|
1535 | i> write(9) -> 9: | |
1530 | i> listkeys\n |
|
1536 | i> listkeys\n | |
1531 | i> write(12) -> 12: |
|
1537 | i> write(12) -> 12: | |
1532 | i> namespace 9\n |
|
1538 | i> namespace 9\n | |
1533 | i> write(9) -> 9: bookmarks |
|
1539 | i> write(9) -> 9: bookmarks | |
1534 | i> flush() -> None |
|
1540 | i> flush() -> None | |
1535 | o> bufferedreadline() -> 3: |
|
1541 | o> bufferedreadline() -> 3: | |
1536 | o> 46\n |
|
1542 | o> 46\n | |
1537 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f |
|
1543 | o> bufferedread(46) -> 46: bookA\t68986213bd4485ea51533535e3fc9e78007a711f | |
1538 | response: { |
|
1544 | response: { | |
1539 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f' |
|
1545 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f' | |
1540 | } |
|
1546 | } | |
1541 |
|
1547 | |||
1542 | With multiple bookmarks set |
|
1548 | With multiple bookmarks set | |
1543 |
|
1549 | |||
1544 | $ hg book -r 1 bookB |
|
1550 | $ hg book -r 1 bookB | |
1545 | $ debugwireproto << EOF |
|
1551 | $ debugwireproto << EOF | |
1546 | > command listkeys |
|
1552 | > command listkeys | |
1547 | > namespace bookmarks |
|
1553 | > namespace bookmarks | |
1548 | > EOF |
|
1554 | > EOF | |
1549 | testing ssh1 |
|
1555 | testing ssh1 | |
1550 | creating ssh peer from handshake results |
|
1556 | creating ssh peer from handshake results | |
1551 | i> write(104) -> 104: |
|
1557 | i> write(104) -> 104: | |
1552 | i> hello\n |
|
1558 | i> hello\n | |
1553 | i> between\n |
|
1559 | i> between\n | |
1554 | i> pairs 81\n |
|
1560 | i> pairs 81\n | |
1555 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1561 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1556 | i> flush() -> None |
|
1562 | i> flush() -> None | |
1557 | o> readline() -> 4: |
|
1563 | o> readline() -> 4: | |
1558 |
o> 4 |
|
1564 | o> 440\n | |
1559 |
o> readline() -> 4 |
|
1565 | o> readline() -> 440: | |
1560 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1566 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1561 | o> readline() -> 2: |
|
1567 | o> readline() -> 2: | |
1562 | o> 1\n |
|
1568 | o> 1\n | |
1563 | o> readline() -> 1: |
|
1569 | o> readline() -> 1: | |
1564 | o> \n |
|
1570 | o> \n | |
1565 | sending listkeys command |
|
1571 | sending listkeys command | |
1566 | i> write(9) -> 9: |
|
1572 | i> write(9) -> 9: | |
1567 | i> listkeys\n |
|
1573 | i> listkeys\n | |
1568 | i> write(12) -> 12: |
|
1574 | i> write(12) -> 12: | |
1569 | i> namespace 9\n |
|
1575 | i> namespace 9\n | |
1570 | i> write(9) -> 9: bookmarks |
|
1576 | i> write(9) -> 9: bookmarks | |
1571 | i> flush() -> None |
|
1577 | i> flush() -> None | |
1572 | o> bufferedreadline() -> 3: |
|
1578 | o> bufferedreadline() -> 3: | |
1573 | o> 93\n |
|
1579 | o> 93\n | |
1574 | o> bufferedread(93) -> 93: |
|
1580 | o> bufferedread(93) -> 93: | |
1575 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
|
1581 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n | |
1576 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
|
1582 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d | |
1577 | response: { |
|
1583 | response: { | |
1578 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', |
|
1584 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', | |
1579 | b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d' |
|
1585 | b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d' | |
1580 | } |
|
1586 | } | |
1581 |
|
1587 | |||
1582 | testing ssh2 |
|
1588 | testing ssh2 | |
1583 | creating ssh peer from handshake results |
|
1589 | creating ssh peer from handshake results | |
1584 | i> write(171) -> 171: |
|
1590 | i> write(171) -> 171: | |
1585 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1591 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1586 | i> hello\n |
|
1592 | i> hello\n | |
1587 | i> between\n |
|
1593 | i> between\n | |
1588 | i> pairs 81\n |
|
1594 | i> pairs 81\n | |
1589 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1595 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1590 | i> flush() -> None |
|
1596 | i> flush() -> None | |
1591 | o> readline() -> 62: |
|
1597 | o> readline() -> 62: | |
1592 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1598 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1593 | o> readline() -> 4: |
|
1599 | o> readline() -> 4: | |
1594 |
o> 4 |
|
1600 | o> 439\n | |
1595 |
o> read(4 |
|
1601 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1596 | o> read(1) -> 1: |
|
1602 | o> read(1) -> 1: | |
1597 | o> \n |
|
1603 | o> \n | |
1598 | sending listkeys command |
|
1604 | sending listkeys command | |
1599 | i> write(9) -> 9: |
|
1605 | i> write(9) -> 9: | |
1600 | i> listkeys\n |
|
1606 | i> listkeys\n | |
1601 | i> write(12) -> 12: |
|
1607 | i> write(12) -> 12: | |
1602 | i> namespace 9\n |
|
1608 | i> namespace 9\n | |
1603 | i> write(9) -> 9: bookmarks |
|
1609 | i> write(9) -> 9: bookmarks | |
1604 | i> flush() -> None |
|
1610 | i> flush() -> None | |
1605 | o> bufferedreadline() -> 3: |
|
1611 | o> bufferedreadline() -> 3: | |
1606 | o> 93\n |
|
1612 | o> 93\n | |
1607 | o> bufferedread(93) -> 93: |
|
1613 | o> bufferedread(93) -> 93: | |
1608 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n |
|
1614 | o> bookA\t68986213bd4485ea51533535e3fc9e78007a711f\n | |
1609 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d |
|
1615 | o> bookB\t1880f3755e2e52e3199e0ee5638128b08642f34d | |
1610 | response: { |
|
1616 | response: { | |
1611 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', |
|
1617 | b'bookA': b'68986213bd4485ea51533535e3fc9e78007a711f', | |
1612 | b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d' |
|
1618 | b'bookB': b'1880f3755e2e52e3199e0ee5638128b08642f34d' | |
1613 | } |
|
1619 | } | |
1614 |
|
1620 | |||
1615 | Test pushkey for bookmarks |
|
1621 | Test pushkey for bookmarks | |
1616 |
|
1622 | |||
1617 | $ debugwireproto << EOF |
|
1623 | $ debugwireproto << EOF | |
1618 | > command pushkey |
|
1624 | > command pushkey | |
1619 | > namespace bookmarks |
|
1625 | > namespace bookmarks | |
1620 | > key remote |
|
1626 | > key remote | |
1621 | > old |
|
1627 | > old | |
1622 | > new 68986213bd4485ea51533535e3fc9e78007a711f |
|
1628 | > new 68986213bd4485ea51533535e3fc9e78007a711f | |
1623 | > EOF |
|
1629 | > EOF | |
1624 | testing ssh1 |
|
1630 | testing ssh1 | |
1625 | creating ssh peer from handshake results |
|
1631 | creating ssh peer from handshake results | |
1626 | i> write(104) -> 104: |
|
1632 | i> write(104) -> 104: | |
1627 | i> hello\n |
|
1633 | i> hello\n | |
1628 | i> between\n |
|
1634 | i> between\n | |
1629 | i> pairs 81\n |
|
1635 | i> pairs 81\n | |
1630 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1636 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1631 | i> flush() -> None |
|
1637 | i> flush() -> None | |
1632 | o> readline() -> 4: |
|
1638 | o> readline() -> 4: | |
1633 |
o> 4 |
|
1639 | o> 440\n | |
1634 |
o> readline() -> 4 |
|
1640 | o> readline() -> 440: | |
1635 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1641 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1636 | o> readline() -> 2: |
|
1642 | o> readline() -> 2: | |
1637 | o> 1\n |
|
1643 | o> 1\n | |
1638 | o> readline() -> 1: |
|
1644 | o> readline() -> 1: | |
1639 | o> \n |
|
1645 | o> \n | |
1640 | sending pushkey command |
|
1646 | sending pushkey command | |
1641 | i> write(8) -> 8: |
|
1647 | i> write(8) -> 8: | |
1642 | i> pushkey\n |
|
1648 | i> pushkey\n | |
1643 | i> write(6) -> 6: |
|
1649 | i> write(6) -> 6: | |
1644 | i> key 6\n |
|
1650 | i> key 6\n | |
1645 | i> write(6) -> 6: remote |
|
1651 | i> write(6) -> 6: remote | |
1646 | i> write(12) -> 12: |
|
1652 | i> write(12) -> 12: | |
1647 | i> namespace 9\n |
|
1653 | i> namespace 9\n | |
1648 | i> write(9) -> 9: bookmarks |
|
1654 | i> write(9) -> 9: bookmarks | |
1649 | i> write(7) -> 7: |
|
1655 | i> write(7) -> 7: | |
1650 | i> new 40\n |
|
1656 | i> new 40\n | |
1651 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
|
1657 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f | |
1652 | i> write(6) -> 6: |
|
1658 | i> write(6) -> 6: | |
1653 | i> old 0\n |
|
1659 | i> old 0\n | |
1654 | i> flush() -> None |
|
1660 | i> flush() -> None | |
1655 | o> bufferedreadline() -> 2: |
|
1661 | o> bufferedreadline() -> 2: | |
1656 | o> 2\n |
|
1662 | o> 2\n | |
1657 | o> bufferedread(2) -> 2: |
|
1663 | o> bufferedread(2) -> 2: | |
1658 | o> 1\n |
|
1664 | o> 1\n | |
1659 | response: True |
|
1665 | response: True | |
1660 |
|
1666 | |||
1661 | testing ssh2 |
|
1667 | testing ssh2 | |
1662 | creating ssh peer from handshake results |
|
1668 | creating ssh peer from handshake results | |
1663 | i> write(171) -> 171: |
|
1669 | i> write(171) -> 171: | |
1664 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1670 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1665 | i> hello\n |
|
1671 | i> hello\n | |
1666 | i> between\n |
|
1672 | i> between\n | |
1667 | i> pairs 81\n |
|
1673 | i> pairs 81\n | |
1668 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1674 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1669 | i> flush() -> None |
|
1675 | i> flush() -> None | |
1670 | o> readline() -> 62: |
|
1676 | o> readline() -> 62: | |
1671 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1677 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1672 | o> readline() -> 4: |
|
1678 | o> readline() -> 4: | |
1673 |
o> 4 |
|
1679 | o> 439\n | |
1674 |
o> read(4 |
|
1680 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1675 | o> read(1) -> 1: |
|
1681 | o> read(1) -> 1: | |
1676 | o> \n |
|
1682 | o> \n | |
1677 | sending pushkey command |
|
1683 | sending pushkey command | |
1678 | i> write(8) -> 8: |
|
1684 | i> write(8) -> 8: | |
1679 | i> pushkey\n |
|
1685 | i> pushkey\n | |
1680 | i> write(6) -> 6: |
|
1686 | i> write(6) -> 6: | |
1681 | i> key 6\n |
|
1687 | i> key 6\n | |
1682 | i> write(6) -> 6: remote |
|
1688 | i> write(6) -> 6: remote | |
1683 | i> write(12) -> 12: |
|
1689 | i> write(12) -> 12: | |
1684 | i> namespace 9\n |
|
1690 | i> namespace 9\n | |
1685 | i> write(9) -> 9: bookmarks |
|
1691 | i> write(9) -> 9: bookmarks | |
1686 | i> write(7) -> 7: |
|
1692 | i> write(7) -> 7: | |
1687 | i> new 40\n |
|
1693 | i> new 40\n | |
1688 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f |
|
1694 | i> write(40) -> 40: 68986213bd4485ea51533535e3fc9e78007a711f | |
1689 | i> write(6) -> 6: |
|
1695 | i> write(6) -> 6: | |
1690 | i> old 0\n |
|
1696 | i> old 0\n | |
1691 | i> flush() -> None |
|
1697 | i> flush() -> None | |
1692 | o> bufferedreadline() -> 2: |
|
1698 | o> bufferedreadline() -> 2: | |
1693 | o> 2\n |
|
1699 | o> 2\n | |
1694 | o> bufferedread(2) -> 2: |
|
1700 | o> bufferedread(2) -> 2: | |
1695 | o> 1\n |
|
1701 | o> 1\n | |
1696 | response: True |
|
1702 | response: True | |
1697 |
|
1703 | |||
1698 | $ hg bookmarks |
|
1704 | $ hg bookmarks | |
1699 | bookA 0:68986213bd44 |
|
1705 | bookA 0:68986213bd44 | |
1700 | bookB 1:1880f3755e2e |
|
1706 | bookB 1:1880f3755e2e | |
1701 | remote 0:68986213bd44 |
|
1707 | remote 0:68986213bd44 | |
1702 |
|
1708 | |||
1703 | $ cd .. |
|
1709 | $ cd .. | |
1704 |
|
1710 | |||
1705 | Test listkeys for phases |
|
1711 | Test listkeys for phases | |
1706 |
|
1712 | |||
1707 | $ hg init phasesrepo |
|
1713 | $ hg init phasesrepo | |
1708 | $ cd phasesrepo |
|
1714 | $ cd phasesrepo | |
1709 |
|
1715 | |||
1710 | Phases on empty repo |
|
1716 | Phases on empty repo | |
1711 |
|
1717 | |||
1712 | $ debugwireproto << EOF |
|
1718 | $ debugwireproto << EOF | |
1713 | > command listkeys |
|
1719 | > command listkeys | |
1714 | > namespace phases |
|
1720 | > namespace phases | |
1715 | > EOF |
|
1721 | > EOF | |
1716 | testing ssh1 |
|
1722 | testing ssh1 | |
1717 | creating ssh peer from handshake results |
|
1723 | creating ssh peer from handshake results | |
1718 | i> write(104) -> 104: |
|
1724 | i> write(104) -> 104: | |
1719 | i> hello\n |
|
1725 | i> hello\n | |
1720 | i> between\n |
|
1726 | i> between\n | |
1721 | i> pairs 81\n |
|
1727 | i> pairs 81\n | |
1722 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1728 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1723 | i> flush() -> None |
|
1729 | i> flush() -> None | |
1724 | o> readline() -> 4: |
|
1730 | o> readline() -> 4: | |
1725 |
o> 4 |
|
1731 | o> 440\n | |
1726 |
o> readline() -> 4 |
|
1732 | o> readline() -> 440: | |
1727 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1733 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1728 | o> readline() -> 2: |
|
1734 | o> readline() -> 2: | |
1729 | o> 1\n |
|
1735 | o> 1\n | |
1730 | o> readline() -> 1: |
|
1736 | o> readline() -> 1: | |
1731 | o> \n |
|
1737 | o> \n | |
1732 | sending listkeys command |
|
1738 | sending listkeys command | |
1733 | i> write(9) -> 9: |
|
1739 | i> write(9) -> 9: | |
1734 | i> listkeys\n |
|
1740 | i> listkeys\n | |
1735 | i> write(12) -> 12: |
|
1741 | i> write(12) -> 12: | |
1736 | i> namespace 6\n |
|
1742 | i> namespace 6\n | |
1737 | i> write(6) -> 6: phases |
|
1743 | i> write(6) -> 6: phases | |
1738 | i> flush() -> None |
|
1744 | i> flush() -> None | |
1739 | o> bufferedreadline() -> 3: |
|
1745 | o> bufferedreadline() -> 3: | |
1740 | o> 15\n |
|
1746 | o> 15\n | |
1741 | o> bufferedread(15) -> 15: publishing\tTrue |
|
1747 | o> bufferedread(15) -> 15: publishing\tTrue | |
1742 | response: { |
|
1748 | response: { | |
1743 | b'publishing': b'True' |
|
1749 | b'publishing': b'True' | |
1744 | } |
|
1750 | } | |
1745 |
|
1751 | |||
1746 | testing ssh2 |
|
1752 | testing ssh2 | |
1747 | creating ssh peer from handshake results |
|
1753 | creating ssh peer from handshake results | |
1748 | i> write(171) -> 171: |
|
1754 | i> write(171) -> 171: | |
1749 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1755 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1750 | i> hello\n |
|
1756 | i> hello\n | |
1751 | i> between\n |
|
1757 | i> between\n | |
1752 | i> pairs 81\n |
|
1758 | i> pairs 81\n | |
1753 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1759 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1754 | i> flush() -> None |
|
1760 | i> flush() -> None | |
1755 | o> readline() -> 62: |
|
1761 | o> readline() -> 62: | |
1756 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1762 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1757 | o> readline() -> 4: |
|
1763 | o> readline() -> 4: | |
1758 |
o> 4 |
|
1764 | o> 439\n | |
1759 |
o> read(4 |
|
1765 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1760 | o> read(1) -> 1: |
|
1766 | o> read(1) -> 1: | |
1761 | o> \n |
|
1767 | o> \n | |
1762 | sending listkeys command |
|
1768 | sending listkeys command | |
1763 | i> write(9) -> 9: |
|
1769 | i> write(9) -> 9: | |
1764 | i> listkeys\n |
|
1770 | i> listkeys\n | |
1765 | i> write(12) -> 12: |
|
1771 | i> write(12) -> 12: | |
1766 | i> namespace 6\n |
|
1772 | i> namespace 6\n | |
1767 | i> write(6) -> 6: phases |
|
1773 | i> write(6) -> 6: phases | |
1768 | i> flush() -> None |
|
1774 | i> flush() -> None | |
1769 | o> bufferedreadline() -> 3: |
|
1775 | o> bufferedreadline() -> 3: | |
1770 | o> 15\n |
|
1776 | o> 15\n | |
1771 | o> bufferedread(15) -> 15: publishing\tTrue |
|
1777 | o> bufferedread(15) -> 15: publishing\tTrue | |
1772 | response: { |
|
1778 | response: { | |
1773 | b'publishing': b'True' |
|
1779 | b'publishing': b'True' | |
1774 | } |
|
1780 | } | |
1775 |
|
1781 | |||
1776 | Create some commits |
|
1782 | Create some commits | |
1777 |
|
1783 | |||
1778 | $ echo 0 > foo |
|
1784 | $ echo 0 > foo | |
1779 | $ hg add foo |
|
1785 | $ hg add foo | |
1780 | $ hg -q commit -m initial |
|
1786 | $ hg -q commit -m initial | |
1781 | $ hg phase --public |
|
1787 | $ hg phase --public | |
1782 | $ echo 1 > foo |
|
1788 | $ echo 1 > foo | |
1783 | $ hg commit -m 'head 1 commit 1' |
|
1789 | $ hg commit -m 'head 1 commit 1' | |
1784 | $ echo 2 > foo |
|
1790 | $ echo 2 > foo | |
1785 | $ hg commit -m 'head 1 commit 2' |
|
1791 | $ hg commit -m 'head 1 commit 2' | |
1786 | $ hg -q up 0 |
|
1792 | $ hg -q up 0 | |
1787 | $ echo 1a > foo |
|
1793 | $ echo 1a > foo | |
1788 | $ hg commit -m 'head 2 commit 1' |
|
1794 | $ hg commit -m 'head 2 commit 1' | |
1789 | created new head |
|
1795 | created new head | |
1790 | $ echo 2a > foo |
|
1796 | $ echo 2a > foo | |
1791 | $ hg commit -m 'head 2 commit 2' |
|
1797 | $ hg commit -m 'head 2 commit 2' | |
1792 |
|
1798 | |||
1793 | Two draft heads |
|
1799 | Two draft heads | |
1794 |
|
1800 | |||
1795 | $ debugwireproto << EOF |
|
1801 | $ debugwireproto << EOF | |
1796 | > command listkeys |
|
1802 | > command listkeys | |
1797 | > namespace phases |
|
1803 | > namespace phases | |
1798 | > EOF |
|
1804 | > EOF | |
1799 | testing ssh1 |
|
1805 | testing ssh1 | |
1800 | creating ssh peer from handshake results |
|
1806 | creating ssh peer from handshake results | |
1801 | i> write(104) -> 104: |
|
1807 | i> write(104) -> 104: | |
1802 | i> hello\n |
|
1808 | i> hello\n | |
1803 | i> between\n |
|
1809 | i> between\n | |
1804 | i> pairs 81\n |
|
1810 | i> pairs 81\n | |
1805 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1811 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1806 | i> flush() -> None |
|
1812 | i> flush() -> None | |
1807 | o> readline() -> 4: |
|
1813 | o> readline() -> 4: | |
1808 |
o> 4 |
|
1814 | o> 440\n | |
1809 |
o> readline() -> 4 |
|
1815 | o> readline() -> 440: | |
1810 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1816 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1811 | o> readline() -> 2: |
|
1817 | o> readline() -> 2: | |
1812 | o> 1\n |
|
1818 | o> 1\n | |
1813 | o> readline() -> 1: |
|
1819 | o> readline() -> 1: | |
1814 | o> \n |
|
1820 | o> \n | |
1815 | sending listkeys command |
|
1821 | sending listkeys command | |
1816 | i> write(9) -> 9: |
|
1822 | i> write(9) -> 9: | |
1817 | i> listkeys\n |
|
1823 | i> listkeys\n | |
1818 | i> write(12) -> 12: |
|
1824 | i> write(12) -> 12: | |
1819 | i> namespace 6\n |
|
1825 | i> namespace 6\n | |
1820 | i> write(6) -> 6: phases |
|
1826 | i> write(6) -> 6: phases | |
1821 | i> flush() -> None |
|
1827 | i> flush() -> None | |
1822 | o> bufferedreadline() -> 4: |
|
1828 | o> bufferedreadline() -> 4: | |
1823 | o> 101\n |
|
1829 | o> 101\n | |
1824 | o> bufferedread(101) -> 101: |
|
1830 | o> bufferedread(101) -> 101: | |
1825 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
|
1831 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n | |
1826 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1832 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1827 | o> publishing\tTrue |
|
1833 | o> publishing\tTrue | |
1828 | response: { |
|
1834 | response: { | |
1829 | b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', |
|
1835 | b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', | |
1830 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', |
|
1836 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', | |
1831 | b'publishing': b'True' |
|
1837 | b'publishing': b'True' | |
1832 | } |
|
1838 | } | |
1833 |
|
1839 | |||
1834 | testing ssh2 |
|
1840 | testing ssh2 | |
1835 | creating ssh peer from handshake results |
|
1841 | creating ssh peer from handshake results | |
1836 | i> write(171) -> 171: |
|
1842 | i> write(171) -> 171: | |
1837 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1843 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1838 | i> hello\n |
|
1844 | i> hello\n | |
1839 | i> between\n |
|
1845 | i> between\n | |
1840 | i> pairs 81\n |
|
1846 | i> pairs 81\n | |
1841 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1847 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1842 | i> flush() -> None |
|
1848 | i> flush() -> None | |
1843 | o> readline() -> 62: |
|
1849 | o> readline() -> 62: | |
1844 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1850 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1845 | o> readline() -> 4: |
|
1851 | o> readline() -> 4: | |
1846 |
o> 4 |
|
1852 | o> 439\n | |
1847 |
o> read(4 |
|
1853 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1848 | o> read(1) -> 1: |
|
1854 | o> read(1) -> 1: | |
1849 | o> \n |
|
1855 | o> \n | |
1850 | sending listkeys command |
|
1856 | sending listkeys command | |
1851 | i> write(9) -> 9: |
|
1857 | i> write(9) -> 9: | |
1852 | i> listkeys\n |
|
1858 | i> listkeys\n | |
1853 | i> write(12) -> 12: |
|
1859 | i> write(12) -> 12: | |
1854 | i> namespace 6\n |
|
1860 | i> namespace 6\n | |
1855 | i> write(6) -> 6: phases |
|
1861 | i> write(6) -> 6: phases | |
1856 | i> flush() -> None |
|
1862 | i> flush() -> None | |
1857 | o> bufferedreadline() -> 4: |
|
1863 | o> bufferedreadline() -> 4: | |
1858 | o> 101\n |
|
1864 | o> 101\n | |
1859 | o> bufferedread(101) -> 101: |
|
1865 | o> bufferedread(101) -> 101: | |
1860 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n |
|
1866 | o> 20b8a89289d80036e6c4e87c2083e3bea1586637\t1\n | |
1861 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1867 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1862 | o> publishing\tTrue |
|
1868 | o> publishing\tTrue | |
1863 | response: { |
|
1869 | response: { | |
1864 | b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', |
|
1870 | b'20b8a89289d80036e6c4e87c2083e3bea1586637': b'1', | |
1865 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', |
|
1871 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', | |
1866 | b'publishing': b'True' |
|
1872 | b'publishing': b'True' | |
1867 | } |
|
1873 | } | |
1868 |
|
1874 | |||
1869 | Single draft head |
|
1875 | Single draft head | |
1870 |
|
1876 | |||
1871 | $ hg phase --public -r 2 |
|
1877 | $ hg phase --public -r 2 | |
1872 | $ debugwireproto << EOF |
|
1878 | $ debugwireproto << EOF | |
1873 | > command listkeys |
|
1879 | > command listkeys | |
1874 | > namespace phases |
|
1880 | > namespace phases | |
1875 | > EOF |
|
1881 | > EOF | |
1876 | testing ssh1 |
|
1882 | testing ssh1 | |
1877 | creating ssh peer from handshake results |
|
1883 | creating ssh peer from handshake results | |
1878 | i> write(104) -> 104: |
|
1884 | i> write(104) -> 104: | |
1879 | i> hello\n |
|
1885 | i> hello\n | |
1880 | i> between\n |
|
1886 | i> between\n | |
1881 | i> pairs 81\n |
|
1887 | i> pairs 81\n | |
1882 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1888 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1883 | i> flush() -> None |
|
1889 | i> flush() -> None | |
1884 | o> readline() -> 4: |
|
1890 | o> readline() -> 4: | |
1885 |
o> 4 |
|
1891 | o> 440\n | |
1886 |
o> readline() -> 4 |
|
1892 | o> readline() -> 440: | |
1887 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1893 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1888 | o> readline() -> 2: |
|
1894 | o> readline() -> 2: | |
1889 | o> 1\n |
|
1895 | o> 1\n | |
1890 | o> readline() -> 1: |
|
1896 | o> readline() -> 1: | |
1891 | o> \n |
|
1897 | o> \n | |
1892 | sending listkeys command |
|
1898 | sending listkeys command | |
1893 | i> write(9) -> 9: |
|
1899 | i> write(9) -> 9: | |
1894 | i> listkeys\n |
|
1900 | i> listkeys\n | |
1895 | i> write(12) -> 12: |
|
1901 | i> write(12) -> 12: | |
1896 | i> namespace 6\n |
|
1902 | i> namespace 6\n | |
1897 | i> write(6) -> 6: phases |
|
1903 | i> write(6) -> 6: phases | |
1898 | i> flush() -> None |
|
1904 | i> flush() -> None | |
1899 | o> bufferedreadline() -> 3: |
|
1905 | o> bufferedreadline() -> 3: | |
1900 | o> 58\n |
|
1906 | o> 58\n | |
1901 | o> bufferedread(58) -> 58: |
|
1907 | o> bufferedread(58) -> 58: | |
1902 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1908 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1903 | o> publishing\tTrue |
|
1909 | o> publishing\tTrue | |
1904 | response: { |
|
1910 | response: { | |
1905 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', |
|
1911 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', | |
1906 | b'publishing': b'True' |
|
1912 | b'publishing': b'True' | |
1907 | } |
|
1913 | } | |
1908 |
|
1914 | |||
1909 | testing ssh2 |
|
1915 | testing ssh2 | |
1910 | creating ssh peer from handshake results |
|
1916 | creating ssh peer from handshake results | |
1911 | i> write(171) -> 171: |
|
1917 | i> write(171) -> 171: | |
1912 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1918 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1913 | i> hello\n |
|
1919 | i> hello\n | |
1914 | i> between\n |
|
1920 | i> between\n | |
1915 | i> pairs 81\n |
|
1921 | i> pairs 81\n | |
1916 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1922 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1917 | i> flush() -> None |
|
1923 | i> flush() -> None | |
1918 | o> readline() -> 62: |
|
1924 | o> readline() -> 62: | |
1919 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1925 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1920 | o> readline() -> 4: |
|
1926 | o> readline() -> 4: | |
1921 |
o> 4 |
|
1927 | o> 439\n | |
1922 |
o> read(4 |
|
1928 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1923 | o> read(1) -> 1: |
|
1929 | o> read(1) -> 1: | |
1924 | o> \n |
|
1930 | o> \n | |
1925 | sending listkeys command |
|
1931 | sending listkeys command | |
1926 | i> write(9) -> 9: |
|
1932 | i> write(9) -> 9: | |
1927 | i> listkeys\n |
|
1933 | i> listkeys\n | |
1928 | i> write(12) -> 12: |
|
1934 | i> write(12) -> 12: | |
1929 | i> namespace 6\n |
|
1935 | i> namespace 6\n | |
1930 | i> write(6) -> 6: phases |
|
1936 | i> write(6) -> 6: phases | |
1931 | i> flush() -> None |
|
1937 | i> flush() -> None | |
1932 | o> bufferedreadline() -> 3: |
|
1938 | o> bufferedreadline() -> 3: | |
1933 | o> 58\n |
|
1939 | o> 58\n | |
1934 | o> bufferedread(58) -> 58: |
|
1940 | o> bufferedread(58) -> 58: | |
1935 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n |
|
1941 | o> c4750011d906c18ea2f0527419cbc1a544435150\t1\n | |
1936 | o> publishing\tTrue |
|
1942 | o> publishing\tTrue | |
1937 | response: { |
|
1943 | response: { | |
1938 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', |
|
1944 | b'c4750011d906c18ea2f0527419cbc1a544435150': b'1', | |
1939 | b'publishing': b'True' |
|
1945 | b'publishing': b'True' | |
1940 | } |
|
1946 | } | |
1941 |
|
1947 | |||
1942 | All public heads |
|
1948 | All public heads | |
1943 |
|
1949 | |||
1944 | $ hg phase --public -r 4 |
|
1950 | $ hg phase --public -r 4 | |
1945 | $ debugwireproto << EOF |
|
1951 | $ debugwireproto << EOF | |
1946 | > command listkeys |
|
1952 | > command listkeys | |
1947 | > namespace phases |
|
1953 | > namespace phases | |
1948 | > EOF |
|
1954 | > EOF | |
1949 | testing ssh1 |
|
1955 | testing ssh1 | |
1950 | creating ssh peer from handshake results |
|
1956 | creating ssh peer from handshake results | |
1951 | i> write(104) -> 104: |
|
1957 | i> write(104) -> 104: | |
1952 | i> hello\n |
|
1958 | i> hello\n | |
1953 | i> between\n |
|
1959 | i> between\n | |
1954 | i> pairs 81\n |
|
1960 | i> pairs 81\n | |
1955 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1961 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1956 | i> flush() -> None |
|
1962 | i> flush() -> None | |
1957 | o> readline() -> 4: |
|
1963 | o> readline() -> 4: | |
1958 |
o> 4 |
|
1964 | o> 440\n | |
1959 |
o> readline() -> 4 |
|
1965 | o> readline() -> 440: | |
1960 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
1966 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
1961 | o> readline() -> 2: |
|
1967 | o> readline() -> 2: | |
1962 | o> 1\n |
|
1968 | o> 1\n | |
1963 | o> readline() -> 1: |
|
1969 | o> readline() -> 1: | |
1964 | o> \n |
|
1970 | o> \n | |
1965 | sending listkeys command |
|
1971 | sending listkeys command | |
1966 | i> write(9) -> 9: |
|
1972 | i> write(9) -> 9: | |
1967 | i> listkeys\n |
|
1973 | i> listkeys\n | |
1968 | i> write(12) -> 12: |
|
1974 | i> write(12) -> 12: | |
1969 | i> namespace 6\n |
|
1975 | i> namespace 6\n | |
1970 | i> write(6) -> 6: phases |
|
1976 | i> write(6) -> 6: phases | |
1971 | i> flush() -> None |
|
1977 | i> flush() -> None | |
1972 | o> bufferedreadline() -> 3: |
|
1978 | o> bufferedreadline() -> 3: | |
1973 | o> 15\n |
|
1979 | o> 15\n | |
1974 | o> bufferedread(15) -> 15: publishing\tTrue |
|
1980 | o> bufferedread(15) -> 15: publishing\tTrue | |
1975 | response: { |
|
1981 | response: { | |
1976 | b'publishing': b'True' |
|
1982 | b'publishing': b'True' | |
1977 | } |
|
1983 | } | |
1978 |
|
1984 | |||
1979 | testing ssh2 |
|
1985 | testing ssh2 | |
1980 | creating ssh peer from handshake results |
|
1986 | creating ssh peer from handshake results | |
1981 | i> write(171) -> 171: |
|
1987 | i> write(171) -> 171: | |
1982 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
1988 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
1983 | i> hello\n |
|
1989 | i> hello\n | |
1984 | i> between\n |
|
1990 | i> between\n | |
1985 | i> pairs 81\n |
|
1991 | i> pairs 81\n | |
1986 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
1992 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
1987 | i> flush() -> None |
|
1993 | i> flush() -> None | |
1988 | o> readline() -> 62: |
|
1994 | o> readline() -> 62: | |
1989 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
1995 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
1990 | o> readline() -> 4: |
|
1996 | o> readline() -> 4: | |
1991 |
o> 4 |
|
1997 | o> 439\n | |
1992 |
o> read(4 |
|
1998 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
1993 | o> read(1) -> 1: |
|
1999 | o> read(1) -> 1: | |
1994 | o> \n |
|
2000 | o> \n | |
1995 | sending listkeys command |
|
2001 | sending listkeys command | |
1996 | i> write(9) -> 9: |
|
2002 | i> write(9) -> 9: | |
1997 | i> listkeys\n |
|
2003 | i> listkeys\n | |
1998 | i> write(12) -> 12: |
|
2004 | i> write(12) -> 12: | |
1999 | i> namespace 6\n |
|
2005 | i> namespace 6\n | |
2000 | i> write(6) -> 6: phases |
|
2006 | i> write(6) -> 6: phases | |
2001 | i> flush() -> None |
|
2007 | i> flush() -> None | |
2002 | o> bufferedreadline() -> 3: |
|
2008 | o> bufferedreadline() -> 3: | |
2003 | o> 15\n |
|
2009 | o> 15\n | |
2004 | o> bufferedread(15) -> 15: publishing\tTrue |
|
2010 | o> bufferedread(15) -> 15: publishing\tTrue | |
2005 | response: { |
|
2011 | response: { | |
2006 | b'publishing': b'True' |
|
2012 | b'publishing': b'True' | |
2007 | } |
|
2013 | } | |
2008 |
|
2014 | |||
2009 | Setting public phase via pushkey |
|
2015 | Setting public phase via pushkey | |
2010 |
|
2016 | |||
2011 | $ hg phase --draft --force -r . |
|
2017 | $ hg phase --draft --force -r . | |
2012 |
|
2018 | |||
2013 | $ debugwireproto << EOF |
|
2019 | $ debugwireproto << EOF | |
2014 | > command pushkey |
|
2020 | > command pushkey | |
2015 | > namespace phases |
|
2021 | > namespace phases | |
2016 | > key 7127240a084fd9dc86fe8d1f98e26229161ec82b |
|
2022 | > key 7127240a084fd9dc86fe8d1f98e26229161ec82b | |
2017 | > old 1 |
|
2023 | > old 1 | |
2018 | > new 0 |
|
2024 | > new 0 | |
2019 | > EOF |
|
2025 | > EOF | |
2020 | testing ssh1 |
|
2026 | testing ssh1 | |
2021 | creating ssh peer from handshake results |
|
2027 | creating ssh peer from handshake results | |
2022 | i> write(104) -> 104: |
|
2028 | i> write(104) -> 104: | |
2023 | i> hello\n |
|
2029 | i> hello\n | |
2024 | i> between\n |
|
2030 | i> between\n | |
2025 | i> pairs 81\n |
|
2031 | i> pairs 81\n | |
2026 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
2032 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
2027 | i> flush() -> None |
|
2033 | i> flush() -> None | |
2028 | o> readline() -> 4: |
|
2034 | o> readline() -> 4: | |
2029 |
o> 4 |
|
2035 | o> 440\n | |
2030 |
o> readline() -> 4 |
|
2036 | o> readline() -> 440: | |
2031 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
2037 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
2032 | o> readline() -> 2: |
|
2038 | o> readline() -> 2: | |
2033 | o> 1\n |
|
2039 | o> 1\n | |
2034 | o> readline() -> 1: |
|
2040 | o> readline() -> 1: | |
2035 | o> \n |
|
2041 | o> \n | |
2036 | sending pushkey command |
|
2042 | sending pushkey command | |
2037 | i> write(8) -> 8: |
|
2043 | i> write(8) -> 8: | |
2038 | i> pushkey\n |
|
2044 | i> pushkey\n | |
2039 | i> write(7) -> 7: |
|
2045 | i> write(7) -> 7: | |
2040 | i> key 40\n |
|
2046 | i> key 40\n | |
2041 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
|
2047 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b | |
2042 | i> write(12) -> 12: |
|
2048 | i> write(12) -> 12: | |
2043 | i> namespace 6\n |
|
2049 | i> namespace 6\n | |
2044 | i> write(6) -> 6: phases |
|
2050 | i> write(6) -> 6: phases | |
2045 | i> write(6) -> 6: |
|
2051 | i> write(6) -> 6: | |
2046 | i> new 1\n |
|
2052 | i> new 1\n | |
2047 | i> write(1) -> 1: 0 |
|
2053 | i> write(1) -> 1: 0 | |
2048 | i> write(6) -> 6: |
|
2054 | i> write(6) -> 6: | |
2049 | i> old 1\n |
|
2055 | i> old 1\n | |
2050 | i> write(1) -> 1: 1 |
|
2056 | i> write(1) -> 1: 1 | |
2051 | i> flush() -> None |
|
2057 | i> flush() -> None | |
2052 | o> bufferedreadline() -> 2: |
|
2058 | o> bufferedreadline() -> 2: | |
2053 | o> 2\n |
|
2059 | o> 2\n | |
2054 | o> bufferedread(2) -> 2: |
|
2060 | o> bufferedread(2) -> 2: | |
2055 | o> 1\n |
|
2061 | o> 1\n | |
2056 | response: True |
|
2062 | response: True | |
2057 |
|
2063 | |||
2058 | testing ssh2 |
|
2064 | testing ssh2 | |
2059 | creating ssh peer from handshake results |
|
2065 | creating ssh peer from handshake results | |
2060 | i> write(171) -> 171: |
|
2066 | i> write(171) -> 171: | |
2061 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
2067 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
2062 | i> hello\n |
|
2068 | i> hello\n | |
2063 | i> between\n |
|
2069 | i> between\n | |
2064 | i> pairs 81\n |
|
2070 | i> pairs 81\n | |
2065 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
2071 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
2066 | i> flush() -> None |
|
2072 | i> flush() -> None | |
2067 | o> readline() -> 62: |
|
2073 | o> readline() -> 62: | |
2068 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
2074 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
2069 | o> readline() -> 4: |
|
2075 | o> readline() -> 4: | |
2070 |
o> 4 |
|
2076 | o> 439\n | |
2071 |
o> read(4 |
|
2077 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
2072 | o> read(1) -> 1: |
|
2078 | o> read(1) -> 1: | |
2073 | o> \n |
|
2079 | o> \n | |
2074 | sending pushkey command |
|
2080 | sending pushkey command | |
2075 | i> write(8) -> 8: |
|
2081 | i> write(8) -> 8: | |
2076 | i> pushkey\n |
|
2082 | i> pushkey\n | |
2077 | i> write(7) -> 7: |
|
2083 | i> write(7) -> 7: | |
2078 | i> key 40\n |
|
2084 | i> key 40\n | |
2079 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b |
|
2085 | i> write(40) -> 40: 7127240a084fd9dc86fe8d1f98e26229161ec82b | |
2080 | i> write(12) -> 12: |
|
2086 | i> write(12) -> 12: | |
2081 | i> namespace 6\n |
|
2087 | i> namespace 6\n | |
2082 | i> write(6) -> 6: phases |
|
2088 | i> write(6) -> 6: phases | |
2083 | i> write(6) -> 6: |
|
2089 | i> write(6) -> 6: | |
2084 | i> new 1\n |
|
2090 | i> new 1\n | |
2085 | i> write(1) -> 1: 0 |
|
2091 | i> write(1) -> 1: 0 | |
2086 | i> write(6) -> 6: |
|
2092 | i> write(6) -> 6: | |
2087 | i> old 1\n |
|
2093 | i> old 1\n | |
2088 | i> write(1) -> 1: 1 |
|
2094 | i> write(1) -> 1: 1 | |
2089 | i> flush() -> None |
|
2095 | i> flush() -> None | |
2090 | o> bufferedreadline() -> 2: |
|
2096 | o> bufferedreadline() -> 2: | |
2091 | o> 2\n |
|
2097 | o> 2\n | |
2092 | o> bufferedread(2) -> 2: |
|
2098 | o> bufferedread(2) -> 2: | |
2093 | o> 1\n |
|
2099 | o> 1\n | |
2094 | response: True |
|
2100 | response: True | |
2095 |
|
2101 | |||
2096 | $ hg phase . |
|
2102 | $ hg phase . | |
2097 | 4: public |
|
2103 | 4: public | |
2098 |
|
2104 | |||
2099 | $ cd .. |
|
2105 | $ cd .. | |
2100 |
|
2106 | |||
2101 | Test batching of requests |
|
2107 | Test batching of requests | |
2102 |
|
2108 | |||
2103 | $ hg init batching |
|
2109 | $ hg init batching | |
2104 | $ cd batching |
|
2110 | $ cd batching | |
2105 | $ echo 0 > foo |
|
2111 | $ echo 0 > foo | |
2106 | $ hg add foo |
|
2112 | $ hg add foo | |
2107 | $ hg -q commit -m initial |
|
2113 | $ hg -q commit -m initial | |
2108 | $ hg phase --public |
|
2114 | $ hg phase --public | |
2109 | $ echo 1 > foo |
|
2115 | $ echo 1 > foo | |
2110 | $ hg commit -m 'commit 1' |
|
2116 | $ hg commit -m 'commit 1' | |
2111 | $ hg -q up 0 |
|
2117 | $ hg -q up 0 | |
2112 | $ echo 2 > foo |
|
2118 | $ echo 2 > foo | |
2113 | $ hg commit -m 'commit 2' |
|
2119 | $ hg commit -m 'commit 2' | |
2114 | created new head |
|
2120 | created new head | |
2115 | $ hg book -r 1 bookA |
|
2121 | $ hg book -r 1 bookA | |
2116 | $ hg book -r 2 bookB |
|
2122 | $ hg book -r 2 bookB | |
2117 |
|
2123 | |||
2118 | $ debugwireproto << EOF |
|
2124 | $ debugwireproto << EOF | |
2119 | > batchbegin |
|
2125 | > batchbegin | |
2120 | > command heads |
|
2126 | > command heads | |
2121 | > command listkeys |
|
2127 | > command listkeys | |
2122 | > namespace bookmarks |
|
2128 | > namespace bookmarks | |
2123 | > command listkeys |
|
2129 | > command listkeys | |
2124 | > namespace phases |
|
2130 | > namespace phases | |
2125 | > batchsubmit |
|
2131 | > batchsubmit | |
2126 | > EOF |
|
2132 | > EOF | |
2127 | testing ssh1 |
|
2133 | testing ssh1 | |
2128 | creating ssh peer from handshake results |
|
2134 | creating ssh peer from handshake results | |
2129 | i> write(104) -> 104: |
|
2135 | i> write(104) -> 104: | |
2130 | i> hello\n |
|
2136 | i> hello\n | |
2131 | i> between\n |
|
2137 | i> between\n | |
2132 | i> pairs 81\n |
|
2138 | i> pairs 81\n | |
2133 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
2139 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
2134 | i> flush() -> None |
|
2140 | i> flush() -> None | |
2135 | o> readline() -> 4: |
|
2141 | o> readline() -> 4: | |
2136 |
o> 4 |
|
2142 | o> 440\n | |
2137 |
o> readline() -> 4 |
|
2143 | o> readline() -> 440: | |
2138 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n |
|
2144 | o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n | |
2139 | o> readline() -> 2: |
|
2145 | o> readline() -> 2: | |
2140 | o> 1\n |
|
2146 | o> 1\n | |
2141 | o> readline() -> 1: |
|
2147 | o> readline() -> 1: | |
2142 | o> \n |
|
2148 | o> \n | |
2143 | sending batch with 3 sub-commands |
|
2149 | sending batch with 3 sub-commands | |
2144 | i> write(6) -> 6: |
|
2150 | i> write(6) -> 6: | |
2145 | i> batch\n |
|
2151 | i> batch\n | |
2146 | i> write(4) -> 4: |
|
2152 | i> write(4) -> 4: | |
2147 | i> * 0\n |
|
2153 | i> * 0\n | |
2148 | i> write(8) -> 8: |
|
2154 | i> write(8) -> 8: | |
2149 | i> cmds 61\n |
|
2155 | i> cmds 61\n | |
2150 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases |
|
2156 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases | |
2151 | i> flush() -> None |
|
2157 | i> flush() -> None | |
2152 | o> bufferedreadline() -> 4: |
|
2158 | o> bufferedreadline() -> 4: | |
2153 | o> 278\n |
|
2159 | o> 278\n | |
2154 | o> bufferedread(278) -> 278: |
|
2160 | o> bufferedread(278) -> 278: | |
2155 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2161 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2156 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2162 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2157 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
|
2163 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n | |
2158 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
|
2164 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n | |
2159 | o> publishing\tTrue |
|
2165 | o> publishing\tTrue | |
2160 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2166 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2161 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
|
2167 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 | |
2162 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |
|
2168 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue | |
2163 |
|
2169 | |||
2164 | testing ssh2 |
|
2170 | testing ssh2 | |
2165 | creating ssh peer from handshake results |
|
2171 | creating ssh peer from handshake results | |
2166 | i> write(171) -> 171: |
|
2172 | i> write(171) -> 171: | |
2167 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) |
|
2173 | i> upgrade * proto=exp-ssh-v2-0003\n (glob) | |
2168 | i> hello\n |
|
2174 | i> hello\n | |
2169 | i> between\n |
|
2175 | i> between\n | |
2170 | i> pairs 81\n |
|
2176 | i> pairs 81\n | |
2171 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 |
|
2177 | i> 0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 | |
2172 | i> flush() -> None |
|
2178 | i> flush() -> None | |
2173 | o> readline() -> 62: |
|
2179 | o> readline() -> 62: | |
2174 | o> upgraded * exp-ssh-v2-0003\n (glob) |
|
2180 | o> upgraded * exp-ssh-v2-0003\n (glob) | |
2175 | o> readline() -> 4: |
|
2181 | o> readline() -> 4: | |
2176 |
o> 4 |
|
2182 | o> 439\n | |
2177 |
o> read(4 |
|
2183 | o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
2178 | o> read(1) -> 1: |
|
2184 | o> read(1) -> 1: | |
2179 | o> \n |
|
2185 | o> \n | |
2180 | sending batch with 3 sub-commands |
|
2186 | sending batch with 3 sub-commands | |
2181 | i> write(6) -> 6: |
|
2187 | i> write(6) -> 6: | |
2182 | i> batch\n |
|
2188 | i> batch\n | |
2183 | i> write(4) -> 4: |
|
2189 | i> write(4) -> 4: | |
2184 | i> * 0\n |
|
2190 | i> * 0\n | |
2185 | i> write(8) -> 8: |
|
2191 | i> write(8) -> 8: | |
2186 | i> cmds 61\n |
|
2192 | i> cmds 61\n | |
2187 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases |
|
2193 | i> write(61) -> 61: heads ;listkeys namespace=bookmarks;listkeys namespace=phases | |
2188 | i> flush() -> None |
|
2194 | i> flush() -> None | |
2189 | o> bufferedreadline() -> 4: |
|
2195 | o> bufferedreadline() -> 4: | |
2190 | o> 278\n |
|
2196 | o> 278\n | |
2191 | o> bufferedread(278) -> 278: |
|
2197 | o> bufferedread(278) -> 278: | |
2192 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2198 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2193 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2199 | o> ;bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2194 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n |
|
2200 | o> bookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6;4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\n | |
2195 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n |
|
2201 | o> bfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\n | |
2196 | o> publishing\tTrue |
|
2202 | o> publishing\tTrue | |
2197 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n |
|
2203 | response #0: bfebe6bd38eebc6f8202e419c1171268987ea6a6 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\n | |
2198 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 |
|
2204 | response #1: bookA\t4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\nbookB\tbfebe6bd38eebc6f8202e419c1171268987ea6a6 | |
2199 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |
|
2205 | response #2: 4ee3fcef1c800fa2bf23e20af7c83ff111d9c7ab\t1\nbfebe6bd38eebc6f8202e419c1171268987ea6a6\t1\npublishing\tTrue |
General Comments 0
You need to be logged in to leave comments.
Login now