Mercurial > hg
comparison tests/test-ssh-bundle1.t @ 33262:8e6f4939a69a
tests: replace yet more calls to `python` with $PYTHON
These are some simple cases. More to come in a future change.
Reviewers: krbullock
Reviewed By: krbullock
Differential Revision: https://phab.mercurial-scm.org/D4
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 05 Jul 2017 11:10:11 -0500 |
parents | aff7b32b3c05 |
children | 2428e8ec0793 |
comparison
equal
deleted
inserted
replaced
33261:be49f3fdcd10 | 33262:8e6f4939a69a |
---|---|
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 |
270 > import sys | 270 > import sys |
271 > sys.stdout.write("KABOOM\n") | 271 > sys.stdout.write("KABOOM\n") |
272 > EOF | 272 > EOF |
273 | 273 |
274 $ echo '[hooks]' >> ../remote/.hg/hgrc | 274 $ echo '[hooks]' >> ../remote/.hg/hgrc |
275 $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | 275 $ echo "changegroup.stdout = $PYTHON $TESTTMP/badhook" >> ../remote/.hg/hgrc |
276 $ echo r > r | 276 $ echo r > r |
277 $ hg ci -A -m z r | 277 $ hg ci -A -m z r |
278 | 278 |
279 push should succeed even though it has an unexpected response | 279 push should succeed even though it has an unexpected response |
280 | 280 |
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 |
377 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | 377 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
378 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | 378 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
379 abort: no suitable response from remote hg! | 379 abort: no suitable response from remote hg! |
380 [255] | 380 [255] |
381 | 381 |
382 $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" python "$TESTDIR/../contrib/hg-ssh" | 382 $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh" |
383 Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation | 383 Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation |
384 [255] | 384 [255] |
385 | 385 |
386 Test hg-ssh in read-only mode: | 386 Test hg-ssh in read-only mode: |
387 | 387 |
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 |
459 | 459 |
460 debug output | 460 debug output |
461 | 461 |
462 $ hg pull --debug ssh://user@dummy/remote | 462 $ hg pull --debug ssh://user@dummy/remote |
463 pulling from ssh://user@dummy/remote | 463 pulling from ssh://user@dummy/remote |
464 running python ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) | 464 running .* ".*/dummyssh" user@dummy ('|")hg -R remote serve --stdio('|") (re) |
465 sending hello command | 465 sending hello command |
466 sending between command | 466 sending between command |
467 remote: 355 | 467 remote: 355 |
468 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN | 468 remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN |
469 remote: 1 | 469 remote: 1 |