Show More
@@ -2,25 +2,26 b'' | |||
|
2 | 2 | |
|
3 | 3 | # This test tries to exercise the ssh functionality with a dummy script |
|
4 | 4 | |
|
5 |
cat << |
|
|
6 | #!/bin/sh | |
|
7 | # this attempts to deal with relative pathnames | |
|
8 | cd `dirname $0` | |
|
5 | cat <<EOF > dummyssh | |
|
6 | import sys | |
|
7 | import os | |
|
9 | 8 | |
|
10 | # check for proper args | |
|
11 |
if [ |
|
|
12 | exit -1 | |
|
13 | fi | |
|
9 | os.chdir(os.path.dirname(sys.argv[0])) | |
|
10 | if sys.argv[1] != "user@dummy": | |
|
11 | sys.exit(-1) | |
|
14 | 12 | |
|
15 | # check that we're in the right directory | |
|
16 | if [ ! -x dummyssh ] ; then | |
|
17 | exit -1 | |
|
18 | fi | |
|
13 | if not os.path.exists("dummyssh"): | |
|
14 | sys.exit(-1) | |
|
19 | 15 | |
|
20 | echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog | |
|
21 | $2 | |
|
16 | log = open("dummylog", "ab") | |
|
17 | log.write("Got arguments") | |
|
18 | for i, arg in enumerate(sys.argv[1:]): | |
|
19 | log.write(" %d:%s" % (i+1, arg)) | |
|
20 | log.write("\n") | |
|
21 | log.close() | |
|
22 | r = os.system(sys.argv[2]) | |
|
23 | sys.exit(bool(r)) | |
|
22 | 24 | EOF |
|
23 | chmod +x dummyssh | |
|
24 | 25 | |
|
25 | 26 | checknewrepo() |
|
26 | 27 | { |
@@ -51,18 +52,18 b' echo "#test failure"' | |||
|
51 | 52 | hg init local |
|
52 | 53 | |
|
53 | 54 | echo "# init+push to remote2" |
|
54 | hg init -e ./dummyssh ssh://user@dummy/remote2 | |
|
55 | hg init -e "python ./dummyssh" ssh://user@dummy/remote2 | |
|
55 | 56 | hg incoming -R remote2 local |
|
56 | hg push -R local -e ./dummyssh ssh://user@dummy/remote2 | |
|
57 | hg push -R local -e "python ./dummyssh" ssh://user@dummy/remote2 | |
|
57 | 58 | |
|
58 | 59 | echo "# clone to remote1" |
|
59 | hg clone -e ./dummyssh local ssh://user@dummy/remote1 | |
|
60 | hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 | |
|
60 | 61 | |
|
61 | 62 | echo "# init to existing repo" |
|
62 | hg init -e ./dummyssh ssh://user@dummy/remote1 | |
|
63 | hg init -e "python ./dummyssh" ssh://user@dummy/remote1 | |
|
63 | 64 | |
|
64 | 65 | echo "# clone to existing repo" |
|
65 | hg clone -e ./dummyssh local ssh://user@dummy/remote1 | |
|
66 | hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1 | |
|
66 | 67 | |
|
67 | 68 | echo "# output of dummyssh" |
|
68 | 69 | cat dummylog |
@@ -35,13 +35,13 b' abort: could not create remote repo!' | |||
|
35 | 35 | abort: repository remote1 already exists! |
|
36 | 36 | abort: could not create remote repo! |
|
37 | 37 | # output of dummyssh |
|
38 |
Got arguments 1:user@dummy 2:hg init remote2 |
|
|
39 |
Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
|
40 |
Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
|
41 |
Got arguments 1:user@dummy 2:hg init remote1 |
|
|
42 |
Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio |
|
|
43 |
Got arguments 1:user@dummy 2:hg init remote1 |
|
|
44 |
Got arguments 1:user@dummy 2:hg init remote1 |
|
|
38 | Got arguments 1:user@dummy 2:hg init remote2 | |
|
39 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
|
40 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
|
41 | Got arguments 1:user@dummy 2:hg init remote1 | |
|
42 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio | |
|
43 | Got arguments 1:user@dummy 2:hg init remote1 | |
|
44 | Got arguments 1:user@dummy 2:hg init remote1 | |
|
45 | 45 | # comparing repositories |
|
46 | 46 | 0:c4e059d443be |
|
47 | 47 | 0:c4e059d443be |
General Comments 0
You need to be logged in to leave comments.
Login now