42 > EOF |
42 > EOF |
43 $ cd .. |
43 $ cd .. |
44 |
44 |
45 repo not found error |
45 repo not found error |
46 |
46 |
47 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
47 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
48 remote: abort: repository nonexistent not found! |
48 remote: abort: repository nonexistent not found! |
49 abort: no suitable response from remote hg! |
49 abort: no suitable response from remote hg! |
50 [255] |
50 [255] |
51 |
51 |
52 non-existent absolute path |
52 non-existent absolute path |
53 |
53 |
54 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local |
54 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local |
55 remote: abort: repository /$TESTTMP/nonexistent not found! |
55 remote: abort: repository /$TESTTMP/nonexistent not found! |
56 abort: no suitable response from remote hg! |
56 abort: no suitable response from remote hg! |
57 [255] |
57 [255] |
58 |
58 |
59 clone remote via stream |
59 clone remote via stream |
60 |
60 |
61 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream |
61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream |
62 streaming all changes |
62 streaming all changes |
63 4 files to transfer, 602 bytes of data |
63 4 files to transfer, 602 bytes of data |
64 transferred 602 bytes in * seconds (*) (glob) |
64 transferred 602 bytes in * seconds (*) (glob) |
65 searching for changes |
65 searching for changes |
66 no changes found |
66 no changes found |
78 $ cd .. |
78 $ cd .. |
79 |
79 |
80 clone bookmarks via stream |
80 clone bookmarks via stream |
81 |
81 |
82 $ hg -R local-stream book mybook |
82 $ hg -R local-stream book mybook |
83 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2 |
83 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2 |
84 streaming all changes |
84 streaming all changes |
85 4 files to transfer, 602 bytes of data |
85 4 files to transfer, 602 bytes of data |
86 transferred 602 bytes in * seconds (*) (glob) |
86 transferred 602 bytes in * seconds (*) (glob) |
87 searching for changes |
87 searching for changes |
88 no changes found |
88 no changes found |
121 |
121 |
122 empty default pull |
122 empty default pull |
123 |
123 |
124 $ hg paths |
124 $ hg paths |
125 default = ssh://user@dummy/remote |
125 default = ssh://user@dummy/remote |
126 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" |
126 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
127 pulling from ssh://user@dummy/remote |
127 pulling from ssh://user@dummy/remote |
128 searching for changes |
128 searching for changes |
129 no changes found |
129 no changes found |
130 |
130 |
131 pull from wrong ssh URL |
131 pull from wrong ssh URL |
132 |
132 |
133 $ hg pull -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
133 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
134 pulling from ssh://user@dummy/doesnotexist |
134 pulling from ssh://user@dummy/doesnotexist |
135 remote: abort: repository doesnotexist not found! |
135 remote: abort: repository doesnotexist not found! |
136 abort: no suitable response from remote hg! |
136 abort: no suitable response from remote hg! |
137 [255] |
137 [255] |
138 |
138 |
143 |
143 |
144 updating rc |
144 updating rc |
145 |
145 |
146 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
146 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
147 $ echo "[ui]" >> .hg/hgrc |
147 $ echo "[ui]" >> .hg/hgrc |
148 $ echo "ssh = $PYTHON \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
148 $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
149 |
149 |
150 find outgoing |
150 find outgoing |
151 |
151 |
152 $ hg out ssh://user@dummy/remote |
152 $ hg out ssh://user@dummy/remote |
153 comparing with ssh://user@dummy/remote |
153 comparing with ssh://user@dummy/remote |
160 summary: add |
160 summary: add |
161 |
161 |
162 |
162 |
163 find incoming on the remote side |
163 find incoming on the remote side |
164 |
164 |
165 $ hg incoming -R ../remote -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
165 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
166 comparing with ssh://user@dummy/local |
166 comparing with ssh://user@dummy/local |
167 searching for changes |
167 searching for changes |
168 changeset: 3:a28a9d1a809c |
168 changeset: 3:a28a9d1a809c |
169 tag: tip |
169 tag: tip |
170 parent: 0:1160648e36ce |
170 parent: 0:1160648e36ce |
173 summary: add |
173 summary: add |
174 |
174 |
175 |
175 |
176 find incoming on the remote side (using absolute path) |
176 find incoming on the remote side (using absolute path) |
177 |
177 |
178 $ hg incoming -R ../remote -e "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
178 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
179 comparing with ssh://user@dummy/$TESTTMP/local |
179 comparing with ssh://user@dummy/$TESTTMP/local |
180 searching for changes |
180 searching for changes |
181 changeset: 3:a28a9d1a809c |
181 changeset: 3:a28a9d1a809c |
182 tag: tip |
182 tag: tip |
183 parent: 0:1160648e36ce |
183 parent: 0:1160648e36ce |
235 pushing to ssh://user@dummy/remote |
235 pushing to ssh://user@dummy/remote |
236 searching for changes |
236 searching for changes |
237 no changes found |
237 no changes found |
238 exporting bookmark foo |
238 exporting bookmark foo |
239 [1] |
239 [1] |
240 $ hg debugpushkey --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
240 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
241 foo 1160648e36cec0054048a7edc4110c6f84fde594 |
241 foo 1160648e36cec0054048a7edc4110c6f84fde594 |
242 $ hg book -f foo |
242 $ hg book -f foo |
243 $ hg push --traceback |
243 $ hg push --traceback |
244 pushing to ssh://user@dummy/remote |
244 pushing to ssh://user@dummy/remote |
245 searching for changes |
245 searching for changes |
305 clone bookmarks |
305 clone bookmarks |
306 |
306 |
307 $ hg -R ../remote bookmark test |
307 $ hg -R ../remote bookmark test |
308 $ hg -R ../remote bookmarks |
308 $ hg -R ../remote bookmarks |
309 * test 4:6c0482d977a3 |
309 * test 4:6c0482d977a3 |
310 $ hg clone -e "$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
310 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
311 requesting all changes |
311 requesting all changes |
312 adding changesets |
312 adding changesets |
313 adding manifests |
313 adding manifests |
314 adding file changes |
314 adding file changes |
315 added 6 changesets with 5 changes to 4 files (+1 heads) |
315 added 6 changesets with 5 changes to 4 files (+1 heads) |
332 hide outer repo |
332 hide outer repo |
333 $ hg init |
333 $ hg init |
334 |
334 |
335 Test remote paths with spaces (issue2983): |
335 Test remote paths with spaces (issue2983): |
336 |
336 |
337 $ hg init --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
337 $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
338 $ touch "$TESTTMP/a repo/test" |
338 $ touch "$TESTTMP/a repo/test" |
339 $ hg -R 'a repo' commit -A -m "test" |
339 $ hg -R 'a repo' commit -A -m "test" |
340 adding test |
340 adding test |
341 $ hg -R 'a repo' tag tag |
341 $ hg -R 'a repo' tag tag |
342 $ hg id --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
342 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
343 73649e48688a |
343 73649e48688a |
344 |
344 |
345 $ hg id --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
345 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
346 abort: unknown revision 'noNoNO'! |
346 abort: unknown revision 'noNoNO'! |
347 [255] |
347 [255] |
348 |
348 |
349 Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
349 Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
350 |
350 |
351 $ hg clone --ssh "$PYTHON \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
351 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
352 destination directory: a repo |
352 destination directory: a repo |
353 abort: destination 'a repo' is not empty |
353 abort: destination 'a repo' is not empty |
354 [255] |
354 [255] |
355 |
355 |
356 Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
356 Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
361 > userhost="\$1" |
361 > userhost="\$1" |
362 > SSH_ORIGINAL_COMMAND="\$2" |
362 > SSH_ORIGINAL_COMMAND="\$2" |
363 > export SSH_ORIGINAL_COMMAND |
363 > export SSH_ORIGINAL_COMMAND |
364 > PYTHONPATH="$PYTHONPATH" |
364 > PYTHONPATH="$PYTHONPATH" |
365 > export PYTHONPATH |
365 > export PYTHONPATH |
366 > $PYTHON "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
366 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
367 > EOF |
367 > EOF |
368 |
368 |
369 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
369 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
370 73649e48688a |
370 73649e48688a |
371 |
371 |
389 > userhost="\$1" |
389 > userhost="\$1" |
390 > SSH_ORIGINAL_COMMAND="\$2" |
390 > SSH_ORIGINAL_COMMAND="\$2" |
391 > export SSH_ORIGINAL_COMMAND |
391 > export SSH_ORIGINAL_COMMAND |
392 > PYTHONPATH="$PYTHONPATH" |
392 > PYTHONPATH="$PYTHONPATH" |
393 > export PYTHONPATH |
393 > export PYTHONPATH |
394 > $PYTHON "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
394 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
395 > EOF |
395 > EOF |
396 |
396 |
397 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
397 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
398 requesting all changes |
398 requesting all changes |
399 adding changesets |
399 adding changesets |
438 |
438 |
439 $ cat >> .hg/hgrc << EOF |
439 $ cat >> .hg/hgrc << EOF |
440 > [paths] |
440 > [paths] |
441 > default-push = ssh://user@dummy/remote |
441 > default-push = ssh://user@dummy/remote |
442 > [ui] |
442 > [ui] |
443 > ssh = $PYTHON "$TESTDIR/dummyssh" |
443 > ssh = "$PYTHON" "$TESTDIR/dummyssh" |
444 > [extensions] |
444 > [extensions] |
445 > localwrite = localwrite.py |
445 > localwrite = localwrite.py |
446 > EOF |
446 > EOF |
447 |
447 |
448 $ echo localwrite > foo |
448 $ echo localwrite > foo |
524 > return 1 |
524 > return 1 |
525 > EOF |
525 > EOF |
526 |
526 |
527 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
527 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
528 |
528 |
529 $ hg -q --config ui.ssh="$PYTHON $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
529 $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
530 $ cd hookout |
530 $ cd hookout |
531 $ touch hookfailure |
531 $ touch hookfailure |
532 $ hg -q commit -A -m 'remote hook failure' |
532 $ hg -q commit -A -m 'remote hook failure' |
533 $ hg --config ui.ssh="$PYTHON $TESTDIR/dummyssh" push |
533 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push |
534 pushing to ssh://user@dummy/remote |
534 pushing to ssh://user@dummy/remote |
535 searching for changes |
535 searching for changes |
536 remote: adding changesets |
536 remote: adding changesets |
537 remote: adding manifests |
537 remote: adding manifests |
538 remote: adding file changes |
538 remote: adding file changes |
549 $ hg -R ../remote commit --message "more foo to be pulled" |
549 $ hg -R ../remote commit --message "more foo to be pulled" |
550 $ cat >> ../remote/.hg/hgrc << EOF |
550 $ cat >> ../remote/.hg/hgrc << EOF |
551 > [extensions] |
551 > [extensions] |
552 > crash = ${TESTDIR}/crashgetbundler.py |
552 > crash = ${TESTDIR}/crashgetbundler.py |
553 > EOF |
553 > EOF |
554 $ hg --config ui.ssh="$PYTHON $TESTDIR/dummyssh" pull |
554 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull |
555 pulling from ssh://user@dummy/remote |
555 pulling from ssh://user@dummy/remote |
556 searching for changes |
556 searching for changes |
557 adding changesets |
557 adding changesets |
558 remote: abort: this is an exercise |
558 remote: abort: this is an exercise |
559 transaction abort! |
559 transaction abort! |