Mercurial > hg
comparison tests/test-mq-caches @ 6160:3ee3bc5d06c5
tests: hide the name of the branch cache file
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 21 Feb 2008 16:22:31 -0300 |
parents | a7af0eeae8a3 |
children | 816b708f23af |
comparison
equal
deleted
inserted
replaced
6159:bc784304fea1 | 6160:3ee3bc5d06c5 |
---|---|
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 |
19 hg log -r $b --template "branch $b: "'#rev#\n' | 19 hg log -r $b --template "branch $b: "'#rev#\n' |
20 done | 20 done |
59 hg qrefresh -m 'patch 2' | 59 hg qrefresh -m 'patch 2' |
60 show_branch_cache 1 | 60 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 |
68 echo '# importing rev 1 (the cache now ends in one of the patches)' | 68 echo '# importing rev 1 (the cache now ends in one of the patches)' |
69 hg qimport -r 1 -n p0 | 69 hg qimport -r 1 -n p0 |