Mercurial > hg
annotate tests/test-debugcommands.t @ 26981:cda2e980281e
histedit: extracts _isdirtywc function
Checking if working copy is dirty was done in few places, this
patch extracts it in _isdirtywc procedure.
author | liscju <piotr.listkiewicz@gmail.com> |
---|---|
date | Thu, 12 Nov 2015 12:44:15 +0100 |
parents | 0438df737fb7 |
children | 4efb36ecaaec |
rev | line source |
---|---|
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
1 $ cat << EOF >> $HGRCPATH |
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
2 > [format] |
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
3 > usegeneraldelta=yes |
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
4 > EOF |
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
5 |
17188
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
6 $ hg init debugrevlog |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
7 $ cd debugrevlog |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
8 $ echo a > a |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
9 $ hg ci -Am adda |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
10 adding a |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
11 $ hg debugrevlog -m |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
12 format : 1 |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
13 flags : inline, generaldelta |
17188
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
14 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
15 revisions : 1 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
16 merges : 0 ( 0.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
17 normal : 1 (100.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
18 revisions : 1 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
19 full : 1 (100.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
20 deltas : 0 ( 0.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
21 revision size : 44 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
22 full : 44 (100.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
23 deltas : 0 ( 0.00%) |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
24 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
25 avg chain length : 0 |
24503
944749de6f3a
commands.debugrevlog: report max chain length
Gregory Szorc <gregory.szorc@gmail.com>
parents:
23547
diff
changeset
|
26 max chain length : 0 |
17188
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
27 compression ratio : 0 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
28 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
29 uncompressed data size (min/max/avg) : 43 / 43 / 43 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
30 full revision size (min/max/avg) : 44 / 44 / 44 |
76e55914c303
debugrevlog: handle numrevs == numfull case (issue3537)
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
31 delta size (min/max/avg) : 0 / 0 / 0 |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
32 |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
33 Test debugindex, with and without the --debug flag |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
34 $ hg debugindex a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
35 rev offset length ..... linkrev nodeid p1 p2 (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
36 0 0 3 .... 0 b789fdd96dc2 000000000000 000000000000 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
37 $ hg --debug debugindex a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
38 rev offset length ..... linkrev nodeid p1 p2 (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
39 0 0 3 .... 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
40 $ hg debugindex -f 1 a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
41 rev flag offset length size ..... link p1 p2 nodeid (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
42 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
43 $ hg --debug debugindex -f 1 a |
26918
0438df737fb7
test: enable generaldelta in 'test-debugcommand.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24503
diff
changeset
|
44 rev flag offset length size ..... link p1 p2 nodeid (re) |
23547
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
45 0 0000 0 3 2 .... 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (re) |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
46 |
21446f4d5c62
debugindex: respect --debug flag to show full nodeids
Kyle Lippincott <spectral@google.com>
parents:
23256
diff
changeset
|
47 |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
48 Test max chain len |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
49 $ cat >> $HGRCPATH << EOF |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
50 > [format] |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
51 > maxchainlen=4 |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
52 > EOF |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
53 |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
54 $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
55 $ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
56 $ printf "b\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
57 $ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
58 $ printf "c\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
59 $ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
60 $ printf "d\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
61 $ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
62 $ printf "e\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
63 $ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
64 $ printf "f\n" >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
65 $ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
66 $ printf 'g\n' >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
67 $ hg ci -m a |
23256
1c11393d5dfb
localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com>
parents:
23255
diff
changeset
|
68 $ printf 'h\n' >> a |
23255
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
69 $ hg ci -m a |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
70 $ hg debugrevlog -d a |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
71 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
72 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
73 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
74 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
75 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
76 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
77 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
78 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
79 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
80 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) |
76effa770ff9
revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com>
parents:
20543
diff
changeset
|
81 $ cd .. |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
82 |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
83 Test internal debugstacktrace command |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
84 |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
85 $ cat > debugstacktrace.py << EOF |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
86 > from mercurial.util import debugstacktrace, dst, sys |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
87 > def f(): |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
88 > dst('hello world') |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
89 > def g(): |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
90 > f() |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
91 > debugstacktrace(skip=-5, f=sys.stdout) |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
92 > g() |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
93 > EOF |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
94 $ python debugstacktrace.py |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
95 hello world at: |
20543
01df3660eb11
tests: backout a82de9dc4f77, debugstacktrace is now stable, drop workaround
Mads Kiilerich <madski@unity3d.com>
parents:
20382
diff
changeset
|
96 debugstacktrace.py:7 in * (glob) |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
97 debugstacktrace.py:5 in g |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
98 debugstacktrace.py:3 in f |
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
99 stacktrace at: |
20543
01df3660eb11
tests: backout a82de9dc4f77, debugstacktrace is now stable, drop workaround
Mads Kiilerich <madski@unity3d.com>
parents:
20382
diff
changeset
|
100 debugstacktrace.py:7 *in * (glob) |
01df3660eb11
tests: backout a82de9dc4f77, debugstacktrace is now stable, drop workaround
Mads Kiilerich <madski@unity3d.com>
parents:
20382
diff
changeset
|
101 debugstacktrace.py:6 *in g (glob) |
20244
47d0843647d1
util: introduce util.debugstacktrace for showing a stack trace without crashing
Mads Kiilerich <madski@unity3d.com>
parents:
17188
diff
changeset
|
102 */util.py:* in debugstacktrace (glob) |