equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 # This test tries to exercise the ssh functionality with a dummy script |
|
4 |
|
5 cat <<'EOF' > dummyssh |
|
6 #!/bin/sh |
|
7 # this attempts to deal with relative pathnames |
|
8 cd `dirname $0` |
|
9 |
|
10 # check for proper args |
|
11 if [ $1 != "user@dummy" ] ; then |
|
12 exit -1 |
|
13 fi |
|
14 |
|
15 # check that we're in the right directory |
|
16 if [ ! -x dummyssh ] ; then |
|
17 exit -1 |
|
18 fi |
|
19 |
|
20 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog |
|
21 $2 |
|
22 EOF |
|
23 chmod +x dummyssh |
|
24 |
|
25 echo "# creating 'local'" |
|
26 hg init local |
|
27 echo this > local/foo |
|
28 hg ci --cwd local -A -m "init" -d "1000000 0" |
|
29 |
|
30 echo "# init+push to remote2" |
|
31 hg init -e ./dummyssh ssh://user@dummy/remote2 |
|
32 hg incoming -R remote2 local |
|
33 hg push -R local -e ./dummyssh ssh://user@dummy/remote2 |
|
34 |
|
35 echo "# clone to remote1" |
|
36 hg clone -e ./dummyssh local ssh://user@dummy/remote1 |
|
37 |
|
38 echo "# output of dummyssh" |
|
39 cat dummylog |
|
40 |
|
41 echo "# comparing repositories" |
|
42 hg tip -q -R local |
|
43 hg tip -q -R remote1 |
|
44 hg tip -q -R remote2 |
|
45 |
|
46 echo "# check names for repositories (clashes with URL schemes, special chars)" |
|
47 for i in bundle file hg http https old-http ssh static-http " " "with space"; do |
|
48 echo "# hg init \"$i\"" |
|
49 hg init "$i" |
|
50 test -d "$i" -a -d "$i/.hg" -a -d "$i/.hg/data" && echo "ok" || echo "failed" |
|
51 done |
|
52 |