##// END OF EJS Templates
commands.debugrevlog: report max chain length...
Gregory Szorc -
r24503:944749de default
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,96 +1,97 b''
1 1 $ hg init debugrevlog
2 2 $ cd debugrevlog
3 3 $ echo a > a
4 4 $ hg ci -Am adda
5 5 adding a
6 6 $ hg debugrevlog -m
7 7 format : 1
8 8 flags : inline
9 9
10 10 revisions : 1
11 11 merges : 0 ( 0.00%)
12 12 normal : 1 (100.00%)
13 13 revisions : 1
14 14 full : 1 (100.00%)
15 15 deltas : 0 ( 0.00%)
16 16 revision size : 44
17 17 full : 44 (100.00%)
18 18 deltas : 0 ( 0.00%)
19 19
20 20 avg chain length : 0
21 max chain length : 0
21 22 compression ratio : 0
22 23
23 24 uncompressed data size (min/max/avg) : 43 / 43 / 43
24 25 full revision size (min/max/avg) : 44 / 44 / 44
25 26 delta size (min/max/avg) : 0 / 0 / 0
26 27
27 28 Test debugindex, with and without the --debug flag
28 29 $ hg debugindex a
29 30 rev offset length .... linkrev nodeid p1 p2 (re)
30 31 0 0 3 .... 0 b789fdd96dc2 000000000000 000000000000 (re)
31 32 $ hg --debug debugindex a
32 33 rev offset length .... linkrev nodeid p1 p2 (re)
33 34 0 0 3 .... 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 (re)
34 35 $ hg debugindex -f 1 a
35 36 rev flag offset length size .... link p1 p2 nodeid (re)
36 37 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2 (re)
37 38 $ hg --debug debugindex -f 1 a
38 39 rev flag offset length size .... link p1 p2 nodeid (re)
39 40 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (re)
40 41
41 42
42 43 Test max chain len
43 44 $ cat >> $HGRCPATH << EOF
44 45 > [format]
45 46 > maxchainlen=4
46 47 > EOF
47 48
48 49 $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a
49 50 $ hg ci -m a
50 51 $ printf "b\n" >> a
51 52 $ hg ci -m a
52 53 $ printf "c\n" >> a
53 54 $ hg ci -m a
54 55 $ printf "d\n" >> a
55 56 $ hg ci -m a
56 57 $ printf "e\n" >> a
57 58 $ hg ci -m a
58 59 $ printf "f\n" >> a
59 60 $ hg ci -m a
60 61 $ printf 'g\n' >> a
61 62 $ hg ci -m a
62 63 $ printf 'h\n' >> a
63 64 $ hg ci -m a
64 65 $ hg debugrevlog -d a
65 66 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
66 67 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob)
67 68 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob)
68 69 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
69 70 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
70 71 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob)
71 72 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob)
72 73 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob)
73 74 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
74 75 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
75 76 $ cd ..
76 77
77 78 Test internal debugstacktrace command
78 79
79 80 $ cat > debugstacktrace.py << EOF
80 81 > from mercurial.util import debugstacktrace, dst, sys
81 82 > def f():
82 83 > dst('hello world')
83 84 > def g():
84 85 > f()
85 86 > debugstacktrace(skip=-5, f=sys.stdout)
86 87 > g()
87 88 > EOF
88 89 $ python debugstacktrace.py
89 90 hello world at:
90 91 debugstacktrace.py:7 in * (glob)
91 92 debugstacktrace.py:5 in g
92 93 debugstacktrace.py:3 in f
93 94 stacktrace at:
94 95 debugstacktrace.py:7 *in * (glob)
95 96 debugstacktrace.py:6 *in g (glob)
96 97 */util.py:* in debugstacktrace (glob)
General Comments 0
You need to be logged in to leave comments. Login now