Mercurial > public > mercurial-scm > hg
diff tests/test-ssh.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 |
line wrap: on
line diff
--- a/tests/test-ssh.t Mon Aug 02 21:10:42 2021 -0400 +++ b/tests/test-ssh.t Mon Aug 02 21:25:01 2021 -0400 @@ -42,18 +42,18 @@ repo not found error - $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local + $ hg clone ssh://user@dummy/nonexistent local remote: abort: repository nonexistent not found abort: no suitable response from remote hg [255] - $ hg clone -q -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local + $ hg clone -q ssh://user@dummy/nonexistent local remote: abort: repository nonexistent not found abort: no suitable response from remote hg [255] non-existent absolute path - $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local + $ hg clone ssh://user@dummy/`pwd`/nonexistent local remote: abort: repository $TESTTMP/nonexistent not found abort: no suitable response from remote hg [255] @@ -62,7 +62,7 @@ #if no-reposimplestore - $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream + $ hg clone --stream ssh://user@dummy/remote local-stream streaming all changes 8 files to transfer, 827 bytes of data (no-zstd !) transferred 827 bytes in * seconds (*) (glob) (no-zstd !) @@ -84,7 +84,7 @@ clone bookmarks via stream $ hg -R local-stream book mybook - $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 + $ hg clone --stream ssh://user@dummy/local-stream stream2 streaming all changes 15 files to transfer, * of data (glob) transferred * in * seconds (*) (glob) @@ -100,7 +100,7 @@ clone remote via pull - $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local + $ hg clone ssh://user@dummy/remote local requesting all changes adding changesets adding manifests @@ -128,14 +128,14 @@ $ hg paths default = ssh://user@dummy/remote - $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" + $ hg pull pulling from ssh://user@dummy/remote searching for changes no changes found pull from wrong ssh URL - $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist + $ hg pull ssh://user@dummy/doesnotexist pulling from ssh://user@dummy/doesnotexist remote: abort: repository doesnotexist not found abort: no suitable response from remote hg @@ -167,7 +167,7 @@ find incoming on the remote side - $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local + $ hg incoming -R ../remote ssh://user@dummy/local comparing with ssh://user@dummy/local searching for changes changeset: 3:a28a9d1a809c @@ -180,7 +180,7 @@ find incoming on the remote side (using absolute path) - $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" + $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" comparing with ssh://user@dummy/$TESTTMP/local searching for changes changeset: 3:a28a9d1a809c @@ -227,7 +227,7 @@ test pushkeys and bookmarks $ cd $TESTTMP/local - $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces + $ hg debugpushkey ssh://user@dummy/remote namespaces bookmarks namespaces phases @@ -242,7 +242,7 @@ no changes found exporting bookmark foo [1] - $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks + $ hg debugpushkey ssh://user@dummy/remote bookmarks foo 1160648e36cec0054048a7edc4110c6f84fde594 $ hg book -f foo $ hg push --traceback @@ -347,7 +347,7 @@ $ hg -R ../remote bookmark test $ hg -R ../remote bookmarks * test 4:6c0482d977a3 - $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks + $ hg clone ssh://user@dummy/remote local-bookmarks requesting all changes adding changesets adding manifests @@ -375,21 +375,21 @@ Test remote paths with spaces (issue2983): - $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" + $ hg init "ssh://user@dummy/a repo" $ touch "$TESTTMP/a repo/test" $ hg -R 'a repo' commit -A -m "test" adding test $ hg -R 'a repo' tag tag - $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" + $ hg id "ssh://user@dummy/a repo" 73649e48688a - $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" + $ hg id "ssh://user@dummy/a repo#noNoNO" abort: unknown revision 'noNoNO' [255] Test (non-)escaping of remote paths with spaces when cloning (issue3145): - $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" + $ hg clone "ssh://user@dummy/a repo" destination directory: a repo abort: destination 'a repo' is not empty [10] @@ -516,7 +516,6 @@ > [paths] > default-push = ssh://user@dummy/remote > [ui] - > ssh = "$PYTHON" "$TESTDIR/dummyssh" > [extensions] > localwrite = localwrite.py > EOF @@ -670,11 +669,11 @@ $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc - $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout + $ hg -q clone ssh://user@dummy/remote hookout $ cd hookout $ touch hookfailure $ hg -q commit -A -m 'remote hook failure' - $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push + $ hg push pushing to ssh://user@dummy/remote searching for changes remote: adding changesets @@ -695,7 +694,7 @@ > [extensions] > crash = ${TESTDIR}/crashgetbundler.py > EOF - $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull + $ hg pull pulling from ssh://user@dummy/remote searching for changes remote: abort: this is an exercise @@ -704,14 +703,14 @@ abort with no error hint when there is a ssh problem when pulling - $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" + $ hg pull ssh://brokenrepository pulling from ssh://brokenrepository/ abort: no suitable response from remote hg [255] abort with configured error hint when there is a ssh problem when pulling - $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ + $ hg pull ssh://brokenrepository \ > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" pulling from ssh://brokenrepository/ abort: no suitable response from remote hg