Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-ssh-clone-r @ 3755:05120e210c65
Use unsigned version format.
This way can use one additional bit, and when encountering invalid revlogs
with the first bit set don't produce python warnings or strange error messages.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 01 Dec 2006 23:27:53 +0100 |
parents | c8686e3f0291 |
children | c0b449154a90 |
rev | line source |
---|---|
3449
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
1 #!/bin/sh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
3 # This test tries to exercise the ssh functionality with a dummy script |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
4 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
5 cat <<'EOF' > dummyssh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
6 #!/bin/sh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
7 # this attempts to deal with relative pathnames |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
8 cd `dirname $0` |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
9 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
10 # check for proper args |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
11 if [ $1 != "user@dummy" ] ; then |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
12 exit -1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
13 fi |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
14 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
15 # check that we're in the right directory |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
16 if [ ! -x dummyssh ] ; then |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
17 exit -1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
18 fi |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
19 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
20 SSH_CLIENT='127.0.0.1 1 2' |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
21 export SSH_CLIENT |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
22 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
23 $2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
24 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
25 chmod +x dummyssh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
26 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
27 hg init remote |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
28 cd remote |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
29 echo "# creating 'remote'" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
30 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
31 0 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
32 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
33 hg add afile |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
34 hg commit -m "0.0" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
35 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
36 1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
37 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
38 hg commit -m "0.1" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
39 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
40 2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
41 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
42 hg commit -m "0.2" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
43 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
44 3 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
45 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
46 hg commit -m "0.3" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
47 hg update -C 0 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
48 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
49 1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
50 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
51 hg commit -m "1.1" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
52 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
53 2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
54 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
55 hg commit -m "1.2" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
56 cat >fred <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
57 a line |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
58 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
59 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
60 3 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
61 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
62 hg add fred |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
63 hg commit -m "1.3" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
64 hg mv afile adifferentfile |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
65 hg commit -m "1.3m" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
66 hg update -C 3 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
67 hg mv afile anotherfile |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
68 hg commit -m "0.3m" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
69 hg debugindex .hg/data/afile.i |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
70 hg debugindex .hg/data/adifferentfile.i |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
71 hg debugindex .hg/data/anotherfile.i |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
72 hg debugindex .hg/data/fred.i |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
73 hg debugindex .hg/00manifest.i |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
74 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
75 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
76 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
77 echo "# clone remote via stream" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
78 for i in 0 1 2 3 4 5 6 7 8; do |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
79 hg clone -e ./dummyssh --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
80 if cd test-"$i"; then |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
81 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
82 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
83 fi |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
84 done |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
85 cd test-8 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
86 hg pull ../test-7 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
87 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
88 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
89 cd test-1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
90 hg pull -e ../dummyssh -r 4 ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
91 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
92 hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
93 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
94 cd test-2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
95 hg pull -e ../dummyssh -r 5 ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
96 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
97 hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
98 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
99 cd .. |