##// END OF EJS Templates
tests: hide the name of the branch cache file
Alexis S. L. Carvalho -
r6160:3ee3bc5d default
parent child Browse files
Show More
@@ -54,7 +54,7 b' echo'
54 echo '% after commit'
54 echo '% after commit'
55 echo '% working dir files can only be written by the owner'
55 echo '% working dir files can only be written by the owner'
56 echo '% files created in .hg can be written by the group'
56 echo '% files created in .hg can be written by the group'
57 echo '% (in particular, store/**, dirstate, branch.cache, undo files)'
57 echo '% (in particular, store/**, dirstate, branch cache file, undo files)'
58 echo '% new directories are setgid'
58 echo '% new directories are setgid'
59 python ../printmodes.py .
59 python ../printmodes.py .
60
60
@@ -9,7 +9,7 b' 00770 ./.hg/store/'
9 % after commit
9 % after commit
10 % working dir files can only be written by the owner
10 % working dir files can only be written by the owner
11 % files created in .hg can be written by the group
11 % files created in .hg can be written by the group
12 % (in particular, store/**, dirstate, branch.cache, undo files)
12 % (in particular, store/**, dirstate, branch cache file, undo files)
13 % new directories are setgid
13 % new directories are setgid
14 00700 ./.hg/
14 00700 ./.hg/
15 00600 ./.hg/00changelog.i
15 00600 ./.hg/00changelog.i
@@ -1,18 +1,18 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 branches=.hg/branch.cache
3 echo '[extensions]' >> $HGRCPATH
4 echo '[extensions]' >> $HGRCPATH
4 echo 'hgext.mq=' >> $HGRCPATH
5 echo 'hgext.mq=' >> $HGRCPATH
5
6
6 show_branch_cache()
7 show_branch_cache()
7 {
8 {
8 branches=.hg/branch.cache
9 # force cache (re)generation
9 # force cache (re)generation
10 hg log -r does-not-exist 2> /dev/null
10 hg log -r does-not-exist 2> /dev/null
11 hg log -r tip --template 'tip: #rev#\n'
11 hg log -r tip --template 'tip: #rev#\n'
12 if [ -f $branches ]; then
12 if [ -f $branches ]; then
13 sort $branches
13 sort $branches
14 else
14 else
15 echo No $branches
15 echo No branch cache
16 fi
16 fi
17 if [ "$1" = 1 ]; then
17 if [ "$1" = 1 ]; then
18 for b in foo bar; do
18 for b in foo bar; do
@@ -61,7 +61,7 b' show_branch_cache 1'
61
61
62 echo
62 echo
63 echo '# removing the cache'
63 echo '# removing the cache'
64 rm .hg/branch.cache
64 rm $branches
65 show_branch_cache 1
65 show_branch_cache 1
66
66
67 echo
67 echo
@@ -1,8 +1,8 b''
1 # mq patch on an empty repo
1 # mq patch on an empty repo
2 tip: 0
2 tip: 0
3 No .hg/branch.cache
3 No branch cache
4 tip: 0
4 tip: 0
5 No .hg/branch.cache
5 No branch cache
6
6
7 # some regular revisions
7 # some regular revisions
8 Patch queue now empty
8 Patch queue now empty
@@ -1,5 +1,7 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 branchcache=.hg/branch.cache
4
3 hg init t
5 hg init t
4 cd t
6 cd t
5 hg branches
7 hg branches
@@ -32,23 +34,23 b' hg branches -q'
32
34
33 echo % test for invalid branch cache
35 echo % test for invalid branch cache
34 hg rollback
36 hg rollback
35 cp .hg/branch.cache .hg/bc-invalid
37 cp $branchcache .hg/bc-invalid
36 hg log -r foo
38 hg log -r foo
37 cp .hg/bc-invalid .hg/branch.cache
39 cp .hg/bc-invalid $branchcache
38 hg --debug log -r foo
40 hg --debug log -r foo
39 rm .hg/branch.cache
41 rm $branchcache
40 echo corrupted > .hg/branch.cache
42 echo corrupted > $branchcache
41 hg log -qr foo
43 hg log -qr foo
42 cat .hg/branch.cache
44 cat $branchcache
43
45
44 echo % push should update the branch cache
46 echo % push should update the branch cache
45 hg init ../target
47 hg init ../target
46 echo % pushing just rev 0
48 echo % pushing just rev 0
47 hg push -qr 0 ../target
49 hg push -qr 0 ../target
48 cat ../target/.hg/branch.cache
50 cat ../target/$branchcache
49 echo % pushing everything
51 echo % pushing everything
50 hg push -qf ../target
52 hg push -qf ../target
51 cat ../target/.hg/branch.cache
53 cat ../target/$branchcache
52
54
53 echo % update with no arguments: tipmost revision of the current branch
55 echo % update with no arguments: tipmost revision of the current branch
54 hg up -q -C 0
56 hg up -q -C 0
General Comments 0
You need to be logged in to leave comments. Login now