##// 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:

r4299:6b1e1b9d default
r10521:bde1bb25 stable
Show More
test-ssh-clone-r
100 lines | 1.8 KiB | text/plain | TextLexer
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 #!/bin/sh
# This test tries to exercise the ssh functionality with a dummy script
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 cat <<EOF > dummyssh
import sys
import os
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 os.chdir(os.path.dirname(sys.argv[0]))
if sys.argv[1] != "user@dummy":
sys.exit(-1)
if not os.path.exists("dummyssh"):
sys.exit(-1)
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 log = open("dummylog", "ab")
log.write("Got arguments")
for i, arg in enumerate(sys.argv[1:]):
log.write(" %d:%s" % (i+1, arg))
log.write("\n")
log.close()
r = os.system(sys.argv[2])
sys.exit(bool(r))
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 EOF
hg init remote
cd remote
echo "# creating 'remote'"
cat >>afile <<EOF
0
EOF
hg add afile
hg commit -m "0.0"
cat >>afile <<EOF
1
EOF
hg commit -m "0.1"
cat >>afile <<EOF
2
EOF
hg commit -m "0.2"
cat >>afile <<EOF
3
EOF
hg commit -m "0.3"
hg update -C 0
cat >>afile <<EOF
1
EOF
hg commit -m "1.1"
cat >>afile <<EOF
2
EOF
hg commit -m "1.2"
cat >fred <<EOF
a line
EOF
cat >>afile <<EOF
3
EOF
hg add fred
hg commit -m "1.3"
hg mv afile adifferentfile
hg commit -m "1.3m"
hg update -C 3
hg mv afile anotherfile
hg commit -m "0.3m"
Benoit Boissinot
switch to the .hg/store layout, fix the tests
r3853 hg debugindex .hg/store/data/afile.i
hg debugindex .hg/store/data/adifferentfile.i
hg debugindex .hg/store/data/anotherfile.i
hg debugindex .hg/store/data/fred.i
hg debugindex .hg/store/00manifest.i
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 hg verify
cd ..
echo "# clone remote via stream"
for i in 0 1 2 3 4 5 6 7 8; do
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 hg clone -e "python ./dummyssh" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" 2>&1
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 if cd test-"$i"; then
hg verify
cd ..
fi
done
cd test-8
hg pull ../test-7
hg verify
cd ..
cd test-1
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 hg pull -e "python ../dummyssh" -r 4 ssh://user@dummy/remote 2>&1
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 hg verify
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 hg pull -e "python ../dummyssh" ssh://user@dummy/remote 2>&1
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 cd ..
cd test-2
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 hg pull -e "python ../dummyssh" -r 5 ssh://user@dummy/remote 2>&1
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 hg verify
Alexis S. L. Carvalho
test-ssh-clone-r: avoid a shell script
r4299 hg pull -e "python ../dummyssh" ssh://user@dummy/remote 2>&1
Eric Hopper
Testing the new changegroupsubset remote function in the ssh...
r3449 hg verify
cd ..