##// END OF EJS Templates
Do not use osutil.c with python 2.4 and Windows (issue1364)...
Do not use osutil.c with python 2.4 and Windows (issue1364) Windows python 2.4 os.stat() reports times including DST offset, while osutil.c reports the correct value, which makes status() systematically compare files content. This bug is fixed in python 2.5. Using osutil.py instead of osutil.c is 4x times slower on large repositories but current code is completely unusable. Given few people are likely to use python 2.4 on Windows this solution was considered a good trade-off compared to more invasive solutions trying to address the offset issue.

File last commit:

r10119:bb5ea667 default
r10521:bde1bb25 stable
Show More
test-mq-caches
78 lines | 1.3 KiB | text/plain | TextLexer
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492 #!/bin/sh
John Mulligan
store all heads of a branch in the branch cache...
r7654 branches=.hg/branchheads.cache
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492 echo '[extensions]' >> $HGRCPATH
Martin Geisler
tests: load with "ext =" instead of "hgext.ext ="
r10119 echo 'mq =' >> $HGRCPATH
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492
show_branch_cache()
{
Alexis S. L. Carvalho
test-mq-caches: look up a revision that does not exist to force cache creation
r3501 # force cache (re)generation
hg log -r does-not-exist 2> /dev/null
Martin Geisler
tests: replace #...# syntax with {...}
r8523 hg log -r tip --template 'tip: {rev}\n'
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492 if [ -f $branches ]; then
sort $branches
else
Alexis S. L. Carvalho
tests: hide the name of the branch cache file
r6160 echo No branch cache
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492 fi
if [ "$1" = 1 ]; then
for b in foo bar; do
Martin Geisler
tests: replace #...# syntax with {...}
r8523 hg log -r $b --template "branch $b: "'{rev}\n'
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492 done
fi
}
hg init a
cd a
hg qinit -c
echo '# mq patch on an empty repo'
hg qnew p1
show_branch_cache
echo > pfile
hg add pfile
hg qrefresh -m 'patch 1'
show_branch_cache
echo
echo '# some regular revisions'
hg qpop
echo foo > foo
hg add foo
echo foo > .hg/branch
hg ci -m 'branch foo' -d '1000000 0'
echo bar > bar
hg add bar
echo bar > .hg/branch
hg ci -m 'branch bar' -d '1000000 0'
show_branch_cache
echo
echo '# add some mq patches'
hg qpush
show_branch_cache
hg qnew p2
echo foo > .hg/branch
echo foo2 >> foo
hg qrefresh -m 'patch 2'
show_branch_cache 1
echo
echo '# removing the cache'
Alexis S. L. Carvalho
tests: hide the name of the branch cache file
r6160 rm $branches
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492 show_branch_cache 1
echo
echo '# importing rev 1 (the cache now ends in one of the patches)'
hg qimport -r 1 -n p0
show_branch_cache 1
Martin Geisler
tests: replace #...# syntax with {...}
r8523 hg log -r qbase --template 'qbase: {rev}\n'
Alexis S. L. Carvalho
make mq play nicely with the branch cache...
r3492
echo
echo '# detect an invalid cache'
hg qpop -a
hg qpush -a
show_branch_cache