equal
deleted
inserted
replaced
1 This test tries to exercise the ssh functionality with a dummy script |
1 This test tries to exercise the ssh functionality with a dummy script |
2 |
2 |
3 $ cat <<EOF > dummyssh |
3 creating 'remote' repo |
4 > import sys |
|
5 > import os |
|
6 > |
|
7 > os.chdir(os.path.dirname(sys.argv[0])) |
|
8 > if sys.argv[1] != "user@dummy": |
|
9 > sys.exit(-1) |
|
10 > |
|
11 > if not os.path.exists("dummyssh"): |
|
12 > sys.exit(-1) |
|
13 > |
|
14 > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" |
|
15 > |
|
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)) |
|
24 > EOF |
|
25 |
|
26 creating 'remote |
|
27 |
4 |
28 $ hg init remote |
5 $ hg init remote |
29 $ cd remote |
6 $ cd remote |
30 $ hg unbundle $TESTDIR/bundles/remote.hg |
7 $ hg unbundle $TESTDIR/bundles/remote.hg |
31 adding changesets |
8 adding changesets |
38 $ cd .. |
15 $ cd .. |
39 |
16 |
40 clone remote via stream |
17 clone remote via stream |
41 |
18 |
42 $ for i in 0 1 2 3 4 5 6 7 8; do |
19 $ for i in 0 1 2 3 4 5 6 7 8; do |
43 > hg clone -e "python ./dummyssh" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" |
20 > hg clone -e "python $TESTDIR/dummyssh" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" |
44 > if cd test-"$i"; then |
21 > if cd test-"$i"; then |
45 > hg verify |
22 > hg verify |
46 > cd .. |
23 > cd .. |
47 > fi |
24 > fi |
48 > done |
25 > done |
160 crosschecking files in changesets and manifests |
137 crosschecking files in changesets and manifests |
161 checking files |
138 checking files |
162 4 files, 9 changesets, 7 total revisions |
139 4 files, 9 changesets, 7 total revisions |
163 $ cd .. |
140 $ cd .. |
164 $ cd test-1 |
141 $ cd test-1 |
165 $ hg pull -e "python ../dummyssh" -r 4 ssh://user@dummy/remote |
142 $ hg pull -e "python $TESTDIR/dummyssh" -r 4 ssh://user@dummy/remote |
166 pulling from ssh://user@dummy/remote |
143 pulling from ssh://user@dummy/remote |
167 searching for changes |
144 searching for changes |
168 adding changesets |
145 adding changesets |
169 adding manifests |
146 adding manifests |
170 adding file changes |
147 adding file changes |
174 checking changesets |
151 checking changesets |
175 checking manifests |
152 checking manifests |
176 crosschecking files in changesets and manifests |
153 crosschecking files in changesets and manifests |
177 checking files |
154 checking files |
178 1 files, 3 changesets, 2 total revisions |
155 1 files, 3 changesets, 2 total revisions |
179 $ hg pull -e "python ../dummyssh" ssh://user@dummy/remote |
156 $ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote |
180 pulling from ssh://user@dummy/remote |
157 pulling from ssh://user@dummy/remote |
181 searching for changes |
158 searching for changes |
182 adding changesets |
159 adding changesets |
183 adding manifests |
160 adding manifests |
184 adding file changes |
161 adding file changes |
185 added 6 changesets with 5 changes to 4 files |
162 added 6 changesets with 5 changes to 4 files |
186 (run 'hg update' to get a working copy) |
163 (run 'hg update' to get a working copy) |
187 $ cd .. |
164 $ cd .. |
188 $ cd test-2 |
165 $ cd test-2 |
189 $ hg pull -e "python ../dummyssh" -r 5 ssh://user@dummy/remote |
166 $ hg pull -e "python $TESTDIR/dummyssh" -r 5 ssh://user@dummy/remote |
190 pulling from ssh://user@dummy/remote |
167 pulling from ssh://user@dummy/remote |
191 searching for changes |
168 searching for changes |
192 adding changesets |
169 adding changesets |
193 adding manifests |
170 adding manifests |
194 adding file changes |
171 adding file changes |
198 checking changesets |
175 checking changesets |
199 checking manifests |
176 checking manifests |
200 crosschecking files in changesets and manifests |
177 crosschecking files in changesets and manifests |
201 checking files |
178 checking files |
202 1 files, 5 changesets, 3 total revisions |
179 1 files, 5 changesets, 3 total revisions |
203 $ hg pull -e "python ../dummyssh" ssh://user@dummy/remote |
180 $ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote |
204 pulling from ssh://user@dummy/remote |
181 pulling from ssh://user@dummy/remote |
205 searching for changes |
182 searching for changes |
206 adding changesets |
183 adding changesets |
207 adding manifests |
184 adding manifests |
208 adding file changes |
185 adding file changes |