##// END OF EJS Templates
tests: unify test-fncache
Adrian Buehlmann -
r11865:400aa8f2 default
parent child Browse files
Show More
@@ -1,70 +1,108 b''
1 #!/bin/sh
1 Init repo1:
2
2
3 echo "% init repo1"
3 $ hg init repo1
4 hg init repo1
4 $ cd repo1
5 cd repo1
5 $ echo "some text" > a
6 $ hg add
7 adding a
8 $ hg ci -m first
9 $ cat .hg/store/fncache
10 data/a.i
6
11
7 echo
12 Testing a.i/b:
8 echo "% add a; ci"
9 echo "some text" > a
10 hg add
11 hg ci -m first
12
13
13 echo
14 $ mkdir a.i
14 echo "% cat .hg/store/fncache"
15 $ echo "some other text" > a.i/b
15 cat .hg/store/fncache
16 $ hg add
17 adding a.i/b
18 $ hg ci -m second
19 $ cat .hg/store/fncache
20 data/a.i
21 data/a.i.hg/b.i
16
22
17 echo
23 Testing a.i.hg/c:
18 echo "% add a.i/b; ci"
19 mkdir a.i
20 echo "some other text" > a.i/b
21 hg add
22 hg ci -m second
23
24
24 echo
25 $ mkdir a.i.hg
25 echo "% cat .hg/store/fncache"
26 $ echo "yet another text" > a.i.hg/c
26 cat .hg/store/fncache
27 $ hg add
28 adding a.i.hg/c
29 $ hg ci -m third
30 $ cat .hg/store/fncache
31 data/a.i
32 data/a.i.hg/b.i
33 data/a.i.hg.hg/c.i
27
34
28 echo
35 Testing verify:
29 echo "% add a.i.hg/c; ci"
36
30 mkdir a.i.hg
37 $ hg verify
31 echo "yet another text" > a.i.hg/c
38 checking changesets
32 hg add
39 checking manifests
33 hg ci -m third
40 crosschecking files in changesets and manifests
41 checking files
42 3 files, 3 changesets, 3 total revisions
43
44 $ rm .hg/store/fncache
34
45
35 echo
46 $ hg verify
36 echo "% cat .hg/store/fncache"
47 checking changesets
37 cat .hg/store/fncache
48 checking manifests
38
49 crosschecking files in changesets and manifests
39 echo
50 checking files
40 echo "% hg verify"
51 data/a.i@0: missing revlog!
41 hg verify
52 data/a.i.hg/c.i@2: missing revlog!
53 data/a.i/b.i@1: missing revlog!
54 3 files, 3 changesets, 3 total revisions
55 3 integrity errors encountered!
56 (first damaged changeset appears to be 0)
57 $ cd ..
42
58
43 echo
59 Non store repo:
44 echo "% rm .hg/store/fncache"
45 rm .hg/store/fncache
46
47 echo
48 echo "% hg verify"
49 hg verify
50
60
51 # try non store repo encoding
61 $ hg --config format.usestore=False init foo
52 cd ..
62 $ cd foo
53 echo % non store repo
63 $ mkdir tst.d
54 hg --config format.usestore=False init foo
64 $ echo foo > tst.d/foo
55 cd foo
65 $ hg ci -Amfoo
56 mkdir tst.d
66 adding tst.d/foo
57 echo foo > tst.d/foo
67 $ find .hg | sort
58 hg ci -Amfoo
68 .hg
59 find .hg | sort
69 .hg/00changelog.i
70 .hg/00manifest.i
71 .hg/data
72 .hg/data/tst.d.hg
73 .hg/data/tst.d.hg/foo.i
74 .hg/dirstate
75 .hg/last-message.txt
76 .hg/requires
77 .hg/undo
78 .hg/undo.branch
79 .hg/undo.desc
80 .hg/undo.dirstate
81 $ cd ..
82
83 Non fncache repo:
60
84
61 cd ..
85 $ hg --config format.usefncache=False init bar
62 echo % non fncache repo
86 $ cd bar
63 hg --config format.usefncache=False init bar
87 $ mkdir tst.d
64 cd bar
88 $ echo foo > tst.d/Foo
65 mkdir tst.d
89 $ hg ci -Amfoo
66 echo foo > tst.d/Foo
90 adding tst.d/Foo
67 hg ci -Amfoo
91 $ find .hg | sort
68 find .hg | sort
92 .hg
93 .hg/00changelog.i
94 .hg/dirstate
95 .hg/last-message.txt
96 .hg/requires
97 .hg/store
98 .hg/store/00changelog.i
99 .hg/store/00manifest.i
100 .hg/store/data
101 .hg/store/data/tst.d.hg
102 .hg/store/data/tst.d.hg/_foo.i
103 .hg/store/undo
104 .hg/undo.branch
105 .hg/undo.desc
106 .hg/undo.dirstate
107 $ cd ..
69
108
70 exit 0
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now