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