Mercurial > hg
comparison tests/test-ssh-bundle1.t @ 47920:9c4204b7f3e4
tests: rely on dummyssh being the default
This commit is exactly the result of running this command:
sed -i -e 's! *\(-e \|--ssh \|--config ui.ssh=\)[ \"]*$PYTHON[ \"]*$\(RUN\|\)TESTDIR/dummyssh[\"]* *! !g' -e '/^[ >]*ssh *=[ "]*$PYTHON[ "]*$\(RUN\|\)TESTDIR\/dummyssh[ "]*$/d' -e 's/^\( [$] .*[^ ]\) *$/\1/' *.t *.sh
Sometimes the tests can be simplified further, but I think it's
preferable to do the simplification separately.
Differential Revision: https://phab.mercurial-scm.org/D11245
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Mon, 02 Aug 2021 21:25:01 -0400 |
parents | a28a7dcb9158 |
children | 0c92cd9286ee |
comparison
equal
deleted
inserted
replaced
47919:a28a7dcb9158 | 47920:9c4204b7f3e4 |
---|---|
50 > EOF | 50 > EOF |
51 $ cd $TESTTMP | 51 $ cd $TESTTMP |
52 | 52 |
53 repo not found error | 53 repo not found error |
54 | 54 |
55 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | 55 $ hg clone ssh://user@dummy/nonexistent local |
56 remote: abort: repository nonexistent not found | 56 remote: abort: repository nonexistent not found |
57 abort: no suitable response from remote hg | 57 abort: no suitable response from remote hg |
58 [255] | 58 [255] |
59 | 59 |
60 non-existent absolute path | 60 non-existent absolute path |
61 | 61 |
62 #if no-msys | 62 #if no-msys |
63 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local | 63 $ hg clone ssh://user@dummy//`pwd`/nonexistent local |
64 remote: abort: repository /$TESTTMP/nonexistent not found | 64 remote: abort: repository /$TESTTMP/nonexistent not found |
65 abort: no suitable response from remote hg | 65 abort: no suitable response from remote hg |
66 [255] | 66 [255] |
67 #endif | 67 #endif |
68 | 68 |
69 clone remote via stream | 69 clone remote via stream |
70 | 70 |
71 #if no-reposimplestore | 71 #if no-reposimplestore |
72 | 72 |
73 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream | 73 $ hg clone --stream ssh://user@dummy/remote local-stream |
74 streaming all changes | 74 streaming all changes |
75 4 files to transfer, 602 bytes of data (no-zstd !) | 75 4 files to transfer, 602 bytes of data (no-zstd !) |
76 transferred 602 bytes in * seconds (*) (glob) (no-zstd !) | 76 transferred 602 bytes in * seconds (*) (glob) (no-zstd !) |
77 4 files to transfer, 621 bytes of data (zstd !) | 77 4 files to transfer, 621 bytes of data (zstd !) |
78 transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) | 78 transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) |
92 $ cd $TESTTMP | 92 $ cd $TESTTMP |
93 | 93 |
94 clone bookmarks via stream | 94 clone bookmarks via stream |
95 | 95 |
96 $ hg -R local-stream book mybook | 96 $ hg -R local-stream book mybook |
97 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 | 97 $ hg clone --stream ssh://user@dummy/local-stream stream2 |
98 streaming all changes | 98 streaming all changes |
99 4 files to transfer, 602 bytes of data (no-zstd !) | 99 4 files to transfer, 602 bytes of data (no-zstd !) |
100 transferred 602 bytes in * seconds (*) (glob) (no-zstd !) | 100 transferred 602 bytes in * seconds (*) (glob) (no-zstd !) |
101 4 files to transfer, 621 bytes of data (zstd !) | 101 4 files to transfer, 621 bytes of data (zstd !) |
102 transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) | 102 transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) |
112 | 112 |
113 #endif | 113 #endif |
114 | 114 |
115 clone remote via pull | 115 clone remote via pull |
116 | 116 |
117 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | 117 $ hg clone ssh://user@dummy/remote local |
118 requesting all changes | 118 requesting all changes |
119 adding changesets | 119 adding changesets |
120 adding manifests | 120 adding manifests |
121 adding file changes | 121 adding file changes |
122 added 3 changesets with 2 changes to 2 files | 122 added 3 changesets with 2 changes to 2 files |
140 | 140 |
141 empty default pull | 141 empty default pull |
142 | 142 |
143 $ hg paths | 143 $ hg paths |
144 default = ssh://user@dummy/remote | 144 default = ssh://user@dummy/remote |
145 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | 145 $ hg pull |
146 pulling from ssh://user@dummy/remote | 146 pulling from ssh://user@dummy/remote |
147 searching for changes | 147 searching for changes |
148 no changes found | 148 no changes found |
149 | 149 |
150 pull from wrong ssh URL | 150 pull from wrong ssh URL |
151 | 151 |
152 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | 152 $ hg pull ssh://user@dummy/doesnotexist |
153 pulling from ssh://user@dummy/doesnotexist | 153 pulling from ssh://user@dummy/doesnotexist |
154 remote: abort: repository doesnotexist not found | 154 remote: abort: repository doesnotexist not found |
155 abort: no suitable response from remote hg | 155 abort: no suitable response from remote hg |
156 [255] | 156 [255] |
157 | 157 |
179 summary: add | 179 summary: add |
180 | 180 |
181 | 181 |
182 find incoming on the remote side | 182 find incoming on the remote side |
183 | 183 |
184 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | 184 $ hg incoming -R ../remote ssh://user@dummy/local |
185 comparing with ssh://user@dummy/local | 185 comparing with ssh://user@dummy/local |
186 searching for changes | 186 searching for changes |
187 changeset: 3:a28a9d1a809c | 187 changeset: 3:a28a9d1a809c |
188 tag: tip | 188 tag: tip |
189 parent: 0:1160648e36ce | 189 parent: 0:1160648e36ce |
192 summary: add | 192 summary: add |
193 | 193 |
194 | 194 |
195 find incoming on the remote side (using absolute path) | 195 find incoming on the remote side (using absolute path) |
196 | 196 |
197 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | 197 $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" |
198 comparing with ssh://user@dummy/$TESTTMP/local | 198 comparing with ssh://user@dummy/$TESTTMP/local |
199 searching for changes | 199 searching for changes |
200 changeset: 3:a28a9d1a809c | 200 changeset: 3:a28a9d1a809c |
201 tag: tip | 201 tag: tip |
202 parent: 0:1160648e36ce | 202 parent: 0:1160648e36ce |
239 created new head | 239 created new head |
240 | 240 |
241 test pushkeys and bookmarks | 241 test pushkeys and bookmarks |
242 | 242 |
243 $ cd $TESTTMP/local | 243 $ cd $TESTTMP/local |
244 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | 244 $ hg debugpushkey ssh://user@dummy/remote namespaces |
245 bookmarks | 245 bookmarks |
246 namespaces | 246 namespaces |
247 phases | 247 phases |
248 $ hg book foo -r 0 | 248 $ hg book foo -r 0 |
249 $ hg out -B | 249 $ hg out -B |
254 pushing to ssh://user@dummy/remote | 254 pushing to ssh://user@dummy/remote |
255 searching for changes | 255 searching for changes |
256 no changes found | 256 no changes found |
257 exporting bookmark foo | 257 exporting bookmark foo |
258 [1] | 258 [1] |
259 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | 259 $ hg debugpushkey ssh://user@dummy/remote bookmarks |
260 foo 1160648e36cec0054048a7edc4110c6f84fde594 | 260 foo 1160648e36cec0054048a7edc4110c6f84fde594 |
261 $ hg book -f foo | 261 $ hg book -f foo |
262 $ hg push --traceback | 262 $ hg push --traceback |
263 pushing to ssh://user@dummy/remote | 263 pushing to ssh://user@dummy/remote |
264 searching for changes | 264 searching for changes |
326 clone bookmarks | 326 clone bookmarks |
327 | 327 |
328 $ hg -R ../remote bookmark test | 328 $ hg -R ../remote bookmark test |
329 $ hg -R ../remote bookmarks | 329 $ hg -R ../remote bookmarks |
330 * test 4:6c0482d977a3 | 330 * test 4:6c0482d977a3 |
331 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | 331 $ hg clone ssh://user@dummy/remote local-bookmarks |
332 requesting all changes | 332 requesting all changes |
333 adding changesets | 333 adding changesets |
334 adding manifests | 334 adding manifests |
335 adding file changes | 335 adding file changes |
336 added 6 changesets with 5 changes to 4 files (+1 heads) | 336 added 6 changesets with 5 changes to 4 files (+1 heads) |
354 hide outer repo | 354 hide outer repo |
355 $ hg init | 355 $ hg init |
356 | 356 |
357 Test remote paths with spaces (issue2983): | 357 Test remote paths with spaces (issue2983): |
358 | 358 |
359 $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | 359 $ hg init "ssh://user@dummy/a repo" |
360 $ touch "$TESTTMP/a repo/test" | 360 $ touch "$TESTTMP/a repo/test" |
361 $ hg -R 'a repo' commit -A -m "test" | 361 $ hg -R 'a repo' commit -A -m "test" |
362 adding test | 362 adding test |
363 $ hg -R 'a repo' tag tag | 363 $ hg -R 'a repo' tag tag |
364 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | 364 $ hg id "ssh://user@dummy/a repo" |
365 73649e48688a | 365 73649e48688a |
366 | 366 |
367 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | 367 $ hg id "ssh://user@dummy/a repo#noNoNO" |
368 abort: unknown revision 'noNoNO' | 368 abort: unknown revision 'noNoNO' |
369 [255] | 369 [255] |
370 | 370 |
371 Test (non-)escaping of remote paths with spaces when cloning (issue3145): | 371 Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
372 | 372 |
373 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | 373 $ hg clone "ssh://user@dummy/a repo" |
374 destination directory: a repo | 374 destination directory: a repo |
375 abort: destination 'a repo' is not empty | 375 abort: destination 'a repo' is not empty |
376 [10] | 376 [10] |
377 | 377 |
378 Test hg-ssh using a helper script that will restore PYTHONPATH (which might | 378 Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
461 | 461 |
462 $ cat >> .hg/hgrc << EOF | 462 $ cat >> .hg/hgrc << EOF |
463 > [paths] | 463 > [paths] |
464 > default-push = ssh://user@dummy/remote | 464 > default-push = ssh://user@dummy/remote |
465 > [ui] | 465 > [ui] |
466 > ssh = "$PYTHON" "$TESTDIR/dummyssh" | |
467 > [extensions] | 466 > [extensions] |
468 > localwrite = localwrite.py | 467 > localwrite = localwrite.py |
469 > EOF | 468 > EOF |
470 | 469 |
471 $ echo localwrite > foo | 470 $ echo localwrite > foo |
581 > return 1 | 580 > return 1 |
582 > EOF | 581 > EOF |
583 | 582 |
584 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | 583 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
585 | 584 |
586 $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | 585 $ hg -q clone ssh://user@dummy/remote hookout |
587 $ cd hookout | 586 $ cd hookout |
588 $ touch hookfailure | 587 $ touch hookfailure |
589 $ hg -q commit -A -m 'remote hook failure' | 588 $ hg -q commit -A -m 'remote hook failure' |
590 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push | 589 $ hg push |
591 pushing to ssh://user@dummy/remote | 590 pushing to ssh://user@dummy/remote |
592 searching for changes | 591 searching for changes |
593 remote: adding changesets | 592 remote: adding changesets |
594 remote: adding manifests | 593 remote: adding manifests |
595 remote: adding file changes | 594 remote: adding file changes |
605 $ hg -R ../remote commit --message "more foo to be pulled" | 604 $ hg -R ../remote commit --message "more foo to be pulled" |
606 $ cat >> ../remote/.hg/hgrc << EOF | 605 $ cat >> ../remote/.hg/hgrc << EOF |
607 > [extensions] | 606 > [extensions] |
608 > crash = ${TESTDIR}/crashgetbundler.py | 607 > crash = ${TESTDIR}/crashgetbundler.py |
609 > EOF | 608 > EOF |
610 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull | 609 $ hg pull |
611 pulling from ssh://user@dummy/remote | 610 pulling from ssh://user@dummy/remote |
612 searching for changes | 611 searching for changes |
613 adding changesets | 612 adding changesets |
614 remote: abort: this is an exercise | 613 remote: abort: this is an exercise |
615 transaction abort! | 614 transaction abort! |