tests/test-mq-caches
changeset 4205 a7af0eeae8a3
parent 3988 9dcf9d45cab8
equal deleted inserted replaced
4204:f9bbcebcacea 4205:a7af0eeae8a3
     3 echo '[extensions]' >> $HGRCPATH
     3 echo '[extensions]' >> $HGRCPATH
     4 echo 'hgext.mq=' >> $HGRCPATH
     4 echo 'hgext.mq=' >> $HGRCPATH
     5 
     5 
     6 show_branch_cache()
     6 show_branch_cache()
     7 {
     7 {
     8     branches=.hg/branches.cache
     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
    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/branches.cache
    64 rm .hg/branch.cache
    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