Mercurial > hg-stable
view tests/test-ssh @ 1974:0d54675cd566
Delete bundle file of hg incoming in case of errors, preserve existing files.
Let write_bundle always create the bundle file, check if target doesn't exist
and delete it in case of errors.
This way incoming only has to delete the bundle file if it was meant to
be a temporary file.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 18 Mar 2006 14:36:45 +0100 |
parents | 7544700fd931 |
children | 70ba0c86da8b |
line wrap: on
line source
#!/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 if [ ! -x dummyssh ] ; then exit -1 fi 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 hg ci -A -m "init" -d "1000000 0" foo cd .. echo "# clone remote" hg clone -e ./dummyssh ssh://user@dummy/remote local echo "# verify" cd local hg verify echo "# empty default pull" hg paths hg pull -e ../dummyssh echo "# local change" echo bleah > foo hg ci -m "add" -d "1000000 0" 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 echo "# push" hg push cd ../remote echo "# check remote tip" hg tip hg verify hg cat foo cd .. cat dummylog