##// END OF EJS Templates
merge with crew-stable
merge with crew-stable

File last commit:

r3853:c0b44915 default
r4181:ac9e891f merge default
Show More
test-ssh
100 lines | 1.9 KiB | text/plain | TextLexer
mpm@selenic.com
Add a simple dummy ssh test...
r1110 #!/bin/sh
# This test tries to exercise the ssh functionality with a dummy script
cat <<'EOF' > dummyssh
#!/bin/sh
# this attempts to deal with relative pathnames
cd `dirname $0`
# check for proper args
if [ $1 != "user@dummy" ] ; then
exit -1
fi
# check that we're in the right directory
Thomas Arendsen Hein
Fixed two tests to run with bourne shell.
r1168 if [ ! -x dummyssh ] ; then
mpm@selenic.com
Add a simple dummy ssh test...
r1110 exit -1
fi
Vadim Gelfer
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks...
r2673 SSH_CLIENT='127.0.0.1 1 2'
export SSH_CLIENT
mpm@selenic.com
Add a simple dummy ssh test...
r1110 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
$2
EOF
chmod +x dummyssh
echo "# creating 'remote'"
hg init remote
cd remote
echo this > foo
Benoit Boissinot
switch to the .hg/store layout, fix the tests
r3853 echo this > fooO
hg ci -A -m "init" -d "1000000 0" foo fooO
Vadim Gelfer
clone: disable stream support on server side by default....
r2621 echo '[server]' > .hg/hgrc
Vadim Gelfer
rename stream hgrc option to compressed.
r2622 echo 'uncompressed = True' >> .hg/hgrc
Vadim Gelfer
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks...
r2673 echo '[hooks]' >> .hg/hgrc
echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc
mpm@selenic.com
Add a simple dummy ssh test...
r1110
cd ..
Benoit Boissinot
ssh: make the error message more clear, add a testcase
r3275 echo "# repo not found error"
hg clone -e ./dummyssh ssh://user@dummy/nonexistent local
Vadim Gelfer
add support for streaming clone....
r2612 echo "# clone remote via stream"
Vadim Gelfer
clone: disable stream support on server side by default....
r2621 hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \
Lee Cantey
Allow for MB/sec transfer rates in test-http-proxy and test-ssh....
r3015 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
Vadim Gelfer
add support for streaming clone....
r2612 cd local-stream
hg verify
cd ..
echo "# clone remote via pull"
Vadim Gelfer
clone: do not make streaming default. add --stream option instead.
r2613 hg clone -e ./dummyssh ssh://user@dummy/remote local
mpm@selenic.com
Add a simple dummy ssh test...
r1110
echo "# verify"
cd local
hg verify
Vadim Gelfer
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks...
r2673 echo '[hooks]' >> .hg/hgrc
echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc
mpm@selenic.com
Add a simple dummy ssh test...
r1110 echo "# empty default pull"
hg paths
hg pull -e ../dummyssh
echo "# local change"
echo bleah > foo
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg ci -m "add" -d "1000000 0"
mpm@selenic.com
Add a simple dummy ssh test...
r1110
echo "# updating rc"
echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
echo "[ui]" >> .hg/hgrc
echo "ssh = ../dummyssh" >> .hg/hgrc
echo "# find outgoing"
hg out ssh://user@dummy/remote
Thomas Arendsen Hein
Added test for incoming via ssh.
r1982 echo "# find incoming on the remote side"
hg incoming -R ../remote -e ../dummyssh ssh://user@dummy/local
mpm@selenic.com
Add a simple dummy ssh test...
r1110 echo "# push"
hg push
cd ../remote
echo "# check remote tip"
hg tip
hg verify
Brendan Cully
cat: default to working dir parent instead of tip...
r3095 hg cat -r tip foo
mpm@selenic.com
Add a simple dummy ssh test...
r1110
Vadim Gelfer
extend network protocol to stop clients from locking servers...
r2439 echo z > z
hg ci -A -m z -d '1000001 0' z
cd ../local
echo r > r
hg ci -A -m z -d '1000002 0' r
Matt Mackall
correct remote heads test in prepush
r3684 echo "# push should succeed"
Vadim Gelfer
extend network protocol to stop clients from locking servers...
r2439 hg push
mpm@selenic.com
Add a simple dummy ssh test...
r1110 cd ..
cat dummylog