##// END OF EJS Templates
tests: unify test-verify
Nicolas Dumazet -
r11787:7830e693 default
parent child Browse files
Show More
@@ -1,51 +1,87 b''
1 #!/bin/sh
1 prepare repo
2
3 $ hg init a
4 $ cd a
5 $ echo "some text" > FOO.txt
6 $ echo "another text" > bar.txt
7 $ echo "more text" > QUICK.txt
8 $ hg add
9 adding FOO.txt
10 adding QUICK.txt
11 adding bar.txt
12 $ hg ci -mtest1
13
14 verify
2 15
3 echo % prepare repo
4 hg init a
5 cd a
6 echo "some text" > FOO.txt
7 echo "another text" > bar.txt
8 echo "more text" > QUICK.txt
9 hg add
10 hg ci -mtest1
16 $ hg verify
17 checking changesets
18 checking manifests
19 crosschecking files in changesets and manifests
20 checking files
21 3 files, 1 changesets, 3 total revisions
22
23 verify with journal
11 24
12 echo
13 echo % verify
14 hg verify
25 $ touch .hg/store/journal
26 $ hg verify
27 abandoned transaction found - run hg recover
28 checking changesets
29 checking manifests
30 crosschecking files in changesets and manifests
31 checking files
32 3 files, 1 changesets, 3 total revisions
33 $ rm .hg/store/journal
15 34
16 echo
17 echo % verify with journal
18 touch .hg/store/journal
19 hg verify
20 rm .hg/store/journal
35 introduce some bugs in repo
36
37 $ cd .hg/store/data
38 $ mv _f_o_o.txt.i X_f_o_o.txt.i
39 $ mv bar.txt.i xbar.txt.i
40 $ rm _q_u_i_c_k.txt.i
21 41
22 echo
23 echo % introduce some bugs in repo
24 cd .hg/store/data
25 mv _f_o_o.txt.i X_f_o_o.txt.i
26 mv bar.txt.i xbar.txt.i
27 rm _q_u_i_c_k.txt.i
42 $ hg verify
43 checking changesets
44 checking manifests
45 crosschecking files in changesets and manifests
46 checking files
47 data/FOO.txt.i@0: missing revlog!
48 0: empty or missing FOO.txt
49 FOO.txt@0: f62022d3d590 in manifests not found
50 data/QUICK.txt.i@0: missing revlog!
51 0: empty or missing QUICK.txt
52 QUICK.txt@0: 88b857db8eba in manifests not found
53 data/bar.txt.i@0: missing revlog!
54 0: empty or missing bar.txt
55 bar.txt@0: 256559129457 in manifests not found
56 3 files, 1 changesets, 0 total revisions
57 9 integrity errors encountered!
58 (first damaged changeset appears to be 0)
28 59
29 echo
30 echo % verify
31 hg verify
60 $ cd ..
32 61
33 cd ..
62 test revlog corruption
34 63
35 echo % test revlog corruption
36 hg init b
37 cd b
64 $ hg init b
65 $ cd b
38 66
39 touch a
40 hg add a
41 hg ci -m a
67 $ touch a
68 $ hg add a
69 $ hg ci -m a
70
71 $ echo 'corrupted' > b
72 $ dd if=.hg/store/data/a.i of=start bs=1 count=20 2>/dev/null
73 $ cat start b > .hg/store/data/a.i
42 74
43 echo 'corrupted' > b
44 dd if=.hg/store/data/a.i of=start bs=1 count=20 2>/dev/null
45 cat start b > .hg/store/data/a.i
75 $ hg verify
76 checking changesets
77 checking manifests
78 crosschecking files in changesets and manifests
79 checking files
80 a@0: broken revlog! (index data/a.i is corrupted)
81 warning: orphan revlog 'data/a.i'
82 1 files, 1 changesets, 0 total revisions
83 1 warnings encountered!
84 1 integrity errors encountered!
85 (first damaged changeset appears to be 0)
46 86
47 echo
48 echo % verify
49 hg verify
50
51 exit 0
87 $ exit 0
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now