Show More
@@ -0,0 +1,52 b'' | |||
|
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 |
@@ -0,0 +1,56 b'' | |||
|
1 | # creating 'local' | |
|
2 | adding foo | |
|
3 | # init+push to remote2 | |
|
4 | changeset: 0:c4e059d443be | |
|
5 | tag: tip | |
|
6 | user: test | |
|
7 | date: Mon Jan 12 13:46:40 1970 +0000 | |
|
8 | summary: init | |
|
9 | ||
|
10 | pushing to ssh://user@dummy/remote2 | |
|
11 | searching for changes | |
|
12 | remote: adding changesets | |
|
13 | remote: adding manifests | |
|
14 | remote: adding file changes | |
|
15 | remote: added 1 changesets with 1 changes to 1 files | |
|
16 | # clone to remote1 | |
|
17 | searching for changes | |
|
18 | remote: abort: repository remote1 not found! | |
|
19 | remote: adding changesets | |
|
20 | remote: adding manifests | |
|
21 | remote: adding file changes | |
|
22 | remote: added 1 changesets with 1 changes to 1 files | |
|
23 | # output of dummyssh | |
|
24 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5: | |
|
25 | Got arguments 1:user@dummy 2:hg init remote2 3: 4: 5: | |
|
26 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5: | |
|
27 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5: | |
|
28 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5: | |
|
29 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5: | |
|
30 | Got arguments 1:user@dummy 2:hg init remote1 3: 4: 5: | |
|
31 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5: | |
|
32 | # comparing repositories | |
|
33 | 0:c4e059d443be | |
|
34 | 0:c4e059d443be | |
|
35 | 0:c4e059d443be | |
|
36 | # check names for repositories (clashes with URL schemes, special chars) | |
|
37 | # hg init "bundle" | |
|
38 | ok | |
|
39 | # hg init "file" | |
|
40 | ok | |
|
41 | # hg init "hg" | |
|
42 | ok | |
|
43 | # hg init "http" | |
|
44 | ok | |
|
45 | # hg init "https" | |
|
46 | ok | |
|
47 | # hg init "old-http" | |
|
48 | ok | |
|
49 | # hg init "ssh" | |
|
50 | ok | |
|
51 | # hg init "static-http" | |
|
52 | ok | |
|
53 | # hg init " " | |
|
54 | ok | |
|
55 | # hg init "with space" | |
|
56 | ok |
General Comments 0
You need to be logged in to leave comments.
Login now