Mercurial > hg
annotate tests/test-fncache @ 9479:f3569d95c2ab
push: fix subtle bug in prepush logic
A test case demonstrating the bug has been added.
Contributed by Henrik Stuart and Sune Foldager.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Wed, 23 Sep 2009 18:56:09 +0200 |
parents | 2816239e0020 |
children |
rev | line source |
---|---|
7290 | 1 #!/bin/sh |
2 | |
3 echo "% init repo1" | |
4 hg init repo1 | |
5 cd repo1 | |
6 | |
7 echo | |
8 echo "% add a; ci" | |
9 echo "some text" > a | |
10 hg add | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7290
diff
changeset
|
11 hg ci -m first |
7290 | 12 |
13 echo | |
14 echo "% cat .hg/store/fncache" | |
15 cat .hg/store/fncache | |
16 | |
17 echo | |
18 echo "% add a.i/b; ci" | |
19 mkdir a.i | |
20 echo "some other text" > a.i/b | |
21 hg add | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7290
diff
changeset
|
22 hg ci -m second |
7290 | 23 |
24 echo | |
25 echo "% cat .hg/store/fncache" | |
26 cat .hg/store/fncache | |
27 | |
28 echo | |
29 echo "% add a.i.hg/c; ci" | |
30 mkdir a.i.hg | |
31 echo "yet another text" > a.i.hg/c | |
32 hg add | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7290
diff
changeset
|
33 hg ci -m third |
7290 | 34 |
35 echo | |
36 echo "% cat .hg/store/fncache" | |
37 cat .hg/store/fncache | |
38 | |
39 echo | |
40 echo "% hg verify" | |
41 hg verify | |
42 | |
43 echo | |
44 echo "% rm .hg/store/fncache" | |
45 rm .hg/store/fncache | |
46 | |
47 echo | |
48 echo "% hg verify" | |
49 hg verify | |
50 | |
8633
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
51 # try non store repo encoding |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
52 cd .. |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
53 echo % non store repo |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
54 hg --config format.usestore=False init foo |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
55 cd foo |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
56 mkdir tst.d |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
57 echo foo > tst.d/foo |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
58 hg ci -Amfoo |
8721
2816239e0020
test-fncache: Use find instead of ls -R.
Will Maier <willmaier@ml1.net>
parents:
8633
diff
changeset
|
59 find .hg | sort |
8633
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
60 |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
61 cd .. |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
62 echo % non fncache repo |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
63 hg --config format.usefncache=False init bar |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
64 cd bar |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
65 mkdir tst.d |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
66 echo foo > tst.d/Foo |
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
67 hg ci -Amfoo |
8721
2816239e0020
test-fncache: Use find instead of ls -R.
Will Maier <willmaier@ml1.net>
parents:
8633
diff
changeset
|
68 find .hg | sort |
8633
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
69 |
7290 | 70 exit 0 |