##// END OF EJS Templates
test-bundle: split some variant in there own section...
marmoute -
r49491:ff0233f3 default
parent child Browse files
Show More
@@ -1,668 +1,710
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 #if rust
653
652 $ hg --debug debugpeer ssh://user@dummy/debugrevlog
654 $ hg --debug debugpeer ssh://user@dummy/debugrevlog
653 running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R debugrevlog serve --stdio['"] (re)
655 running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R debugrevlog serve --stdio['"] (re)
654 devel-peer-request: hello+between
656 devel-peer-request: hello+between
655 devel-peer-request: pairs: 81 bytes
657 devel-peer-request: pairs: 81 bytes
656 sending hello command
658 sending hello command
657 sending between command
659 sending between command
658 remote: 444 (no-rust !)
660 remote: 463
659 remote: 463 (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
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 !)
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 !)
662 remote: 1
662 remote: 1
663 devel-peer-request: protocaps
663 devel-peer-request: protocaps
664 devel-peer-request: caps: * bytes (glob)
664 devel-peer-request: caps: * bytes (glob)
665 sending protocaps command
665 sending protocaps command
666 url: ssh://user@dummy/debugrevlog
666 url: ssh://user@dummy/debugrevlog
667 local: no
667 local: no
668 pushable: yes
668 pushable: yes
669
670 #endif
671
672 #if no-rust zstd
673
674 $ hg --debug debugpeer ssh://user@dummy/debugrevlog
675 running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R debugrevlog serve --stdio['"] (re)
676 devel-peer-request: hello+between
677 devel-peer-request: pairs: 81 bytes
678 sending hello command
679 sending between command
680 remote: 444
681 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
682 remote: 1
683 devel-peer-request: protocaps
684 devel-peer-request: caps: * bytes (glob)
685 sending protocaps command
686 url: ssh://user@dummy/debugrevlog
687 local: no
688 pushable: yes
689
690 #endif
691
692 #if no-rust no-zstd
693
694 $ hg --debug debugpeer ssh://user@dummy/debugrevlog
695 running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R debugrevlog serve --stdio['"] (re)
696 devel-peer-request: hello+between
697 devel-peer-request: pairs: 81 bytes
698 sending hello command
699 sending between command
700 remote: 444
701 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
702 remote: 1
703 devel-peer-request: protocaps
704 devel-peer-request: caps: * bytes (glob)
705 sending protocaps command
706 url: ssh://user@dummy/debugrevlog
707 local: no
708 pushable: yes
709
710 #endif
General Comments 0
You need to be logged in to leave comments. Login now