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