view tests/test-ssh @ 1381:c29c36745c6e

log --debug: fix misplaced manifest field Index: hg/mercurial/commands.py =================================================================== --- hg.orig/mercurial/commands.py 2005-10-04 16:44:26.000000000 -0700 +++ hg/mercurial/commands.py 2005-10-04 17:16:42.000000000 -0700 @@ -1238,6 +1238,9 @@ def log(ui, repo, *pats, **opts): self.write(*args) def write(self, *args): self.hunk[self.rev].append(args) + def debug(self, *args): + if self.debugflag: + self.write(*args) def __getattr__(self, key): return getattr(self.ui, key) cwd = repo.getcwd()
author TK Soh <teekaysoh@yahoo.com>
date Tue, 04 Oct 2005 17:34:02 -0700
parents 235e0effa672
children 7544700fd931
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 "0 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 "0 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