##// END OF EJS Templates
debug-delta-chain: print less data by default...
marmoute -
r51969:786b6225 default
parent child Browse files
Show More
@@ -756,7 +756,7 b' def debugdate(ui, date, range=None, **op'
756 (
756 (
757 b'',
757 b'',
758 b'all-info',
758 b'all-info',
759 True,
759 False,
760 _('compute all information unless specified otherwise'),
760 _('compute all information unless specified otherwise'),
761 ),
761 ),
762 (
762 (
@@ -874,7 +874,7 b' def debugdeltachain(ui, repo, file_=None'
874 if revs_opt:
874 if revs_opt:
875 revs = [int(r) for r in revs_opt]
875 revs = [int(r) for r in revs_opt]
876
876
877 all_info = opts.pop('all_info', True)
877 all_info = opts.pop('all_info', False)
878 size_info = opts.pop('size_info', None)
878 size_info = opts.pop('size_info', None)
879 if size_info is None:
879 if size_info is None:
880 size_info = all_info
880 size_info = all_info
@@ -32,7 +32,7 b' echo ho > a'
32 hg up null
32 hg up null
33 echo ha > a
33 echo ha > a
34 ../../../hg commit -Am root-A
34 ../../../hg commit -Am root-A
35 ../../../hg debugdeltachain a
35 ../../../hg debugdeltachain a --all-info
36 rm -rf .hg/cache/ .hg/wcache/
36 rm -rf .hg/cache/ .hg/wcache/
37 cd ..
37 cd ..
38
38
@@ -205,7 +205,7 b' debugdelta chain basic output'
205 #endif
205 #endif
206
206
207 #if reporevlogstore no-pure
207 #if reporevlogstore no-pure
208 $ hg debugdeltachain -m
208 $ hg debugdeltachain -m --all-info
209 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
209 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
210 0 -1 -1 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
210 0 -1 -1 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
211 1 0 -1 2 1 -1 base 0 0 0 0.00000 0 0 0.00000 0 0 1.00000 1
211 1 0 -1 2 1 -1 base 0 0 0 0.00000 0 0 0.00000 0 0 1.00000 1
@@ -216,7 +216,50 b' debugdelta chain basic output'
216 1 2 1
216 1 2 1
217 2 3 1
217 2 3 1
218
218
219 $ hg debugdeltachain -m -Tjson
219 $ hg debugdeltachain -m -Tjson --size-info
220 [
221 {
222 "chainid": 1,
223 "chainlen": 1,
224 "chainratio": 1.0232558139534884,
225 "chainsize": 44,
226 "compsize": 44,
227 "deltatype": "base",
228 "p1": -1,
229 "p2": -1,
230 "prevrev": -1,
231 "rev": 0,
232 "uncompsize": 43
233 },
234 {
235 "chainid": 2,
236 "chainlen": 1,
237 "chainratio": 0,
238 "chainsize": 0,
239 "compsize": 0,
240 "deltatype": "base",
241 "p1": 0,
242 "p2": -1,
243 "prevrev": -1,
244 "rev": 1,
245 "uncompsize": 0
246 },
247 {
248 "chainid": 3,
249 "chainlen": 1,
250 "chainratio": 1.0232558139534884,
251 "chainsize": 44,
252 "compsize": 44,
253 "deltatype": "base",
254 "p1": 1,
255 "p2": -1,
256 "prevrev": -1,
257 "rev": 2,
258 "uncompsize": 43
259 }
260 ]
261
262 $ hg debugdeltachain -m -Tjson --all-info
220 [
263 [
221 {
264 {
222 "chainid": 1,
265 "chainid": 1,
@@ -286,18 +329,61 b' debugdelta chain with sparse read enable'
286 > [experimental]
329 > [experimental]
287 > sparse-read = True
330 > sparse-read = True
288 > EOF
331 > EOF
289 $ hg debugdeltachain -m
332 $ hg debugdeltachain -m --all-info
290 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
333 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
291 0 -1 -1 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
334 0 -1 -1 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
292 1 0 -1 2 1 -1 base 0 0 0 0.00000 0 0 0.00000 0 0 1.00000 1
335 1 0 -1 2 1 -1 base 0 0 0 0.00000 0 0 0.00000 0 0 1.00000 1
293 2 1 -1 3 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
336 2 1 -1 3 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
294
337
295 $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n'
338 $ hg debugdeltachain -m --sparse-info -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n'
296 0 1 1 44 44 1.0
339 0 1 1 44 44 1.0
297 1 2 1 0 0 1
340 1 2 1 0 0 1
298 2 3 1 44 44 1.0
341 2 3 1 44 44 1.0
299
342
300 $ hg debugdeltachain -m -Tjson
343 $ hg debugdeltachain -m -Tjson --sparse-info
344 [
345 {
346 "chainid": 1,
347 "chainlen": 1,
348 "deltatype": "base",
349 "largestblock": 44,
350 "p1": -1,
351 "p2": -1,
352 "prevrev": -1,
353 "readdensity": 1.0,
354 "readsize": 44,
355 "rev": 0,
356 "srchunks": 1
357 },
358 {
359 "chainid": 2,
360 "chainlen": 1,
361 "deltatype": "base",
362 "largestblock": 0,
363 "p1": 0,
364 "p2": -1,
365 "prevrev": -1,
366 "readdensity": 1,
367 "readsize": 0,
368 "rev": 1,
369 "srchunks": 1
370 },
371 {
372 "chainid": 3,
373 "chainlen": 1,
374 "deltatype": "base",
375 "largestblock": 44,
376 "p1": 1,
377 "p2": -1,
378 "prevrev": -1,
379 "readdensity": 1.0,
380 "readsize": 44,
381 "rev": 2,
382 "srchunks": 1
383 }
384 ]
385
386 $ hg debugdeltachain -m -Tjson --all-info
301 [
387 [
302 {
388 {
303 "chainid": 1,
389 "chainid": 1,
@@ -374,7 +460,7 b' debugdelta chain with sparse read enable'
374 > hg ci -m "a default:$i"
460 > hg ci -m "a default:$i"
375 > hg up -q other
461 > hg up -q other
376 > done
462 > done
377 $ hg debugdeltachain a -T '{rev} {srchunks}\n' \
463 $ hg debugdeltachain a -T '{rev} {srchunks}\n' --all-info\
378 > --config experimental.sparse-read.density-threshold=0.50 \
464 > --config experimental.sparse-read.density-threshold=0.50 \
379 > --config experimental.sparse-read.min-gap-size=0
465 > --config experimental.sparse-read.min-gap-size=0
380 0 1
466 0 1
@@ -74,8 +74,8 b' commit.'
74 $ cd client
74 $ cd client
75 $ hg pull -q ../server -r 4
75 $ hg pull -q ../server -r 4
76 $ hg debugdeltachain x
76 $ hg debugdeltachain x
77 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
77 rev p1 p2 chain# chainlen prev delta
78 0 -1 -1 1 1 -1 base 3 2 3 1.50000 3 0 0.00000
78 0 -1 -1 1 1 -1 base
79
79
80 $ cd ..
80 $ cd ..
81
81
@@ -104,23 +104,23 b' delta coming from the server base delta '
104 updating to branch default
104 updating to branch default
105 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
105 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
106 $ hg -R repo debugdeltachain -m
106 $ hg -R repo debugdeltachain -m
107 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
107 rev p1 p2 chain# chainlen prev delta
108 0 -1 -1 1 1 -1 base 10? 135 10? 0.7???? 10? 0 0.00000 (glob)
108 0 -1 -1 1 1 -1 base
109 1 0 -1 1 2 0 prev 57 135 1?? 1.????? 16? 0 0.00000 (glob)
109 1 0 -1 1 2 0 prev
110 2 0 -1 1 3 1 prev 57 135 2?? 1.6???? 2?? 0 0.00000 (glob)
110 2 0 -1 1 3 1 prev
111 3 0 -1 2 1 -1 base 104 135 104 0.77037 104 0 0.00000
111 3 0 -1 2 1 -1 base
112 $ hg -R usegd debugdeltachain -m
112 $ hg -R usegd debugdeltachain -m
113 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
113 rev p1 p2 chain# chainlen prev delta
114 0 -1 -1 1 1 -1 base 10? 135 10? 0.7???? 10? 0 0.00000 (glob)
114 0 -1 -1 1 1 -1 base
115 1 0 -1 1 2 0 p1 57 135 16? 1.????? 16? 0 0.00000 (glob)
115 1 0 -1 1 2 0 p1
116 2 0 -1 1 3 1 prev 57 135 2?? 1.6???? 2?? 0 0.00000 (glob)
116 2 0 -1 1 3 1 prev
117 3 0 -1 1 2 0 p1 57 135 16? 1.????? 27? 114 0.????? (glob)
117 3 0 -1 1 2 0 p1
118 $ hg -R full debugdeltachain -m
118 $ hg -R full debugdeltachain -m
119 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
119 rev p1 p2 chain# chainlen prev delta
120 0 -1 -1 1 1 -1 base 10? 135 10? 0.7???? 10? 0 0.00000 (glob)
120 0 -1 -1 1 1 -1 base
121 1 0 -1 1 2 0 p1 57 135 16? 1.????? 16? 0 0.00000 (glob)
121 1 0 -1 1 2 0 p1
122 2 0 -1 1 2 0 p1 57 135 16? 1.????? 2?? 57 0.3???? (glob)
122 2 0 -1 1 2 0 p1
123 3 0 -1 1 2 0 p1 57 135 16? 1.????? 27? 114 0.????? (glob)
123 3 0 -1 1 2 0 p1
124
124
125 Test revlog.optimize-delta-parent-choice
125 Test revlog.optimize-delta-parent-choice
126
126
@@ -140,10 +140,10 b' Test revlog.optimize-delta-parent-choice'
140 $ hg merge -q 0
140 $ hg merge -q 0
141 $ hg commit -q -m merge
141 $ hg commit -q -m merge
142 $ hg debugdeltachain -m
142 $ hg debugdeltachain -m
143 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
143 rev p1 p2 chain# chainlen prev delta
144 0 -1 -1 1 1 -1 base ?? 215 ?? 0.????? ?? 0 0.00000 (glob)
144 0 -1 -1 1 1 -1 base
145 1 -1 -1 1 2 0 prev ?? 86 1?? 1.????? 1?? 0 0.00000 (glob)
145 1 -1 -1 1 2 0 prev
146 2 1 0 1 2 0 p2 ?? 301 1?? 0.4???? ??? ?? 0.5???? (glob)
146 2 1 0 1 2 0 p2
147
147
148 $ hg strip -q -r . --config extensions.strip=
148 $ hg strip -q -r . --config extensions.strip=
149
149
@@ -152,10 +152,10 b' Test revlog.optimize-delta-parent-choice'
152 $ hg merge -q 0
152 $ hg merge -q 0
153 $ hg commit -q -m merge --config storage.revlog.optimize-delta-parent-choice=yes
153 $ hg commit -q -m merge --config storage.revlog.optimize-delta-parent-choice=yes
154 $ hg debugdeltachain -m
154 $ hg debugdeltachain -m
155 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
155 rev p1 p2 chain# chainlen prev delta
156 0 -1 -1 1 1 -1 base ?? 215 ?? 0.????? ?? 0 0.00000 (glob)
156 0 -1 -1 1 1 -1 base
157 1 -1 -1 1 2 0 prev ?? 86 1?? 1.????? 1?? 0 0.00000 (glob)
157 1 -1 -1 1 2 0 prev
158 2 1 0 1 2 0 p2 ?? 301 1?? 0.4???? ??? ?? 0.5???? (glob)
158 2 1 0 1 2 0 p2
159
159
160 Test that strip bundle use bundle2
160 Test that strip bundle use bundle2
161 $ hg --config extensions.strip= strip .
161 $ hg --config extensions.strip= strip .
@@ -215,7 +215,7 b' test maxdeltachainspan'
215 0 files updated, 0 files merged, 14 files removed, 0 files unresolved
215 0 files updated, 0 files merged, 14 files removed, 0 files unresolved
216 $
216 $
217 $ cd ..
217 $ cd ..
218 $ hg -R source-repo debugdeltachain -m
218 $ hg -R source-repo debugdeltachain -m --all-info
219 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
219 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
220 0 -1 -1 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
220 0 -1 -1 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
221 1 0 -1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
221 1 0 -1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
@@ -281,7 +281,7 b' test maxdeltachainspan'
281 new changesets 61246295ee1e:c930ac4a5b32
281 new changesets 61246295ee1e:c930ac4a5b32
282 updating to branch default
282 updating to branch default
283 14 files updated, 0 files merged, 0 files removed, 0 files unresolved
283 14 files updated, 0 files merged, 0 files removed, 0 files unresolved
284 $ hg -R relax-chain debugdeltachain -m
284 $ hg -R relax-chain debugdeltachain -m --all-info
285 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
285 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
286 0 -1 -1 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
286 0 -1 -1 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
287 1 0 -1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
287 1 0 -1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
@@ -347,7 +347,7 b' test maxdeltachainspan'
347 new changesets 61246295ee1e:c930ac4a5b32
347 new changesets 61246295ee1e:c930ac4a5b32
348 updating to branch default
348 updating to branch default
349 14 files updated, 0 files merged, 0 files removed, 0 files unresolved
349 14 files updated, 0 files merged, 0 files removed, 0 files unresolved
350 $ hg -R noconst-chain debugdeltachain -m
350 $ hg -R noconst-chain debugdeltachain -m --all-info
351 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
351 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
352 0 -1 -1 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
352 0 -1 -1 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
353 1 0 -1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
353 1 0 -1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
@@ -155,9 +155,9 b' Test corrupted p1/p2 fields that could c'
155 1 0000 65 1 0 2 26333235a41c
155 1 0000 65 1 0 2 26333235a41c
156
156
157 $ hg -R limit debugdeltachain -c
157 $ hg -R limit debugdeltachain -c
158 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
158 rev p1 p2 chain# chainlen prev delta
159 0 2 -1 1 1 -1 base 63 62 63 1.01613 63 0 0.00000
159 0 2 -1 1 1 -1 base
160 1 0 2 2 1 -1 base 66 65 66 1.01538 66 0 0.00000
160 1 0 2 2 1 -1 base
161
161
162 $ hg -R neglimit debugrevlogindex -f1 -c
162 $ hg -R neglimit debugrevlogindex -f1 -c
163 rev flag size link p1 p2 nodeid
163 rev flag size link p1 p2 nodeid
@@ -170,9 +170,9 b' Test corrupted p1/p2 fields that could c'
170 1 0000 65 1 0 65536 26333235a41c
170 1 0000 65 1 0 65536 26333235a41c
171
171
172 $ hg -R segv debugdeltachain -c
172 $ hg -R segv debugdeltachain -c
173 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
173 rev p1 p2 chain# chainlen prev delta
174 0 65536 -1 1 1 -1 base 63 62 63 1.01613 63 0 0.00000
174 0 65536 -1 1 1 -1 base
175 1 0 65536 2 1 -1 base 66 65 66 1.01538 66 0 0.00000
175 1 0 65536 2 1 -1 base
176
176
177 $ cat <<EOF > test.py
177 $ cat <<EOF > test.py
178 > import sys
178 > import sys
@@ -76,10 +76,10 b' This is what we did to produce the repo '
76 $ tar -xf - < "$TESTDIR"/bundles/test-revlog-diff-relative-to-nullrev.tar
76 $ tar -xf - < "$TESTDIR"/bundles/test-revlog-diff-relative-to-nullrev.tar
77 $ cd nullrev-diff
77 $ cd nullrev-diff
78 $ hg debugdeltachain a
78 $ hg debugdeltachain a
79 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
79 rev p1 p2 chain# chainlen prev delta
80 0 -1 -1 1 2 -1 p1 15 3 15 5.00000 15 0 0.00000 15 15 1.00000 1
80 0 -1 -1 1 2 -1 p1
81 1 0 -1 1 2 -1 p2 15 3 15 5.00000 30 15 1.00000 30 30 0.50000 1
81 1 0 -1 1 2 -1 p2
82 2 -1 -1 1 2 -1 p1 15 3 15 5.00000 45 30 2.00000 45 45 0.33333 1
82 2 -1 -1 1 2 -1 p1
83 $ hg cat --config rhg.cat=true -r 0 a
83 $ hg cat --config rhg.cat=true -r 0 a
84 hi
84 hi
85 $ hg cat --config rhg.cat=true -r 1 a
85 $ hg cat --config rhg.cat=true -r 1 a
@@ -161,7 +161,7 b' Test `debug-delta-find`'
161 $ ls -1
161 $ ls -1
162 SPARSE-REVLOG-TEST-FILE
162 SPARSE-REVLOG-TEST-FILE
163 $ hg debugdeltachain SPARSE-REVLOG-TEST-FILE | grep snap | tail -1
163 $ hg debugdeltachain SPARSE-REVLOG-TEST-FILE | grep snap | tail -1
164 4971 4970 -1 3 5 4930 snap 19179 346472 427596 1.23414 15994877 15567281 36.40652 427596 179288 1.00000 5
164 4971 4970 -1 3 5 4930 snap
165 $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971
165 $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971
166 DBG-DELTAS-SEARCH: SEARCH rev=4971
166 DBG-DELTAS-SEARCH: SEARCH rev=4971
167 DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - search-down
167 DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - search-down
@@ -1427,7 +1427,7 b' repository config is taken in account'
1427 $ hg config format
1427 $ hg config format
1428 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1428 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1429 format.maxchainlen=9001
1429 format.maxchainlen=9001
1430 $ hg debugdeltachain file
1430 $ hg debugdeltachain file --all-info
1431 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1431 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1432 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1432 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1433 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1433 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
@@ -1475,7 +1475,7 b' repository config is taken in account'
1475 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1475 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1476 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1476 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1477 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1477 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1478 $ hg debugdeltachain file
1478 $ hg debugdeltachain file --all-info
1479 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1479 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1480 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1480 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1481 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1481 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
General Comments 0
You need to be logged in to leave comments. Login now