Mercurial > hg-stable
changeset 16541:bb3334806ace stable
tests: quote dummyssh in a way that works on windows too
Don't depend on $environmentvariableexpansion and 'quote' handling in system()
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 28 Apr 2012 02:00:04 +0200 |
parents | 4fe8eb4a6e2c |
children | e596a631210e |
files | tests/test-init.t tests/test-largefiles.t tests/test-ssh-clone-r.t tests/test-ssh.t |
diffstat | 4 files changed, 25 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-init.t Sat Apr 28 01:55:39 2012 +0200 +++ b/tests/test-init.t Sat Apr 28 02:00:04 2012 +0200 @@ -61,7 +61,7 @@ init+push to remote2 - $ hg init -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote2 + $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2 $ hg incoming -R remote2 local comparing with local changeset: 0:08b9e9f63b32 @@ -71,7 +71,7 @@ summary: init - $ hg push -R local -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote2 + $ hg push -R local -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2 pushing to ssh://user@dummy/remote2 searching for changes remote: adding changesets @@ -81,7 +81,7 @@ clone to remote1 - $ hg clone -e 'python "$TESTDIR/dummyssh"' local ssh://user@dummy/remote1 + $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1 searching for changes remote: adding changesets remote: adding manifests @@ -90,14 +90,14 @@ init to existing repo - $ hg init -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote1 + $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote1 abort: repository remote1 already exists! abort: could not create remote repo! [255] clone to existing repo - $ hg clone -e 'python "$TESTDIR/dummyssh"' local ssh://user@dummy/remote1 + $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1 abort: repository remote1 already exists! abort: could not create remote repo! [255] @@ -186,7 +186,7 @@ $ hg -R local bookmark test $ hg -R local bookmarks * test 0:08b9e9f63b32 - $ hg clone -e 'python "$TESTDIR/dummyssh"' local ssh://user@dummy/remote-bookmarks + $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks searching for changes remote: adding changesets remote: adding manifests
--- a/tests/test-largefiles.t Sat Apr 28 01:55:39 2012 +0200 +++ b/tests/test-largefiles.t Sat Apr 28 02:00:04 2012 +0200 @@ -881,7 +881,7 @@ $ "$TESTDIR/killdaemons.py" vanilla clients locked out from largefiles ssh repos - $ hg --config extensions.largefiles=! clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/r4 r5 + $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5 abort: remote error: This repository uses the largefiles extension.
--- a/tests/test-ssh-clone-r.t Sat Apr 28 01:55:39 2012 +0200 +++ b/tests/test-ssh-clone-r.t Sat Apr 28 02:00:04 2012 +0200 @@ -17,7 +17,7 @@ clone remote via stream $ for i in 0 1 2 3 4 5 6 7 8; do - > hg clone -e 'python "$TESTDIR/dummyssh"' --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" + > hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" > if cd test-"$i"; then > hg verify > cd .. @@ -139,7 +139,7 @@ 4 files, 9 changesets, 7 total revisions $ cd .. $ cd test-1 - $ hg pull -e 'python "$TESTDIR/dummyssh"' -r 4 ssh://user@dummy/remote + $ hg pull -e "python \"$TESTDIR/dummyssh\"" -r 4 ssh://user@dummy/remote pulling from ssh://user@dummy/remote searching for changes adding changesets @@ -153,7 +153,7 @@ crosschecking files in changesets and manifests checking files 1 files, 3 changesets, 2 total revisions - $ hg pull -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote + $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote pulling from ssh://user@dummy/remote searching for changes adding changesets @@ -163,7 +163,7 @@ (run 'hg update' to get a working copy) $ cd .. $ cd test-2 - $ hg pull -e 'python "$TESTDIR/dummyssh"' -r 5 ssh://user@dummy/remote + $ hg pull -e "python \"$TESTDIR/dummyssh\"" -r 5 ssh://user@dummy/remote pulling from ssh://user@dummy/remote searching for changes adding changesets @@ -177,7 +177,7 @@ crosschecking files in changesets and manifests checking files 1 files, 5 changesets, 3 total revisions - $ hg pull -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote + $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote pulling from ssh://user@dummy/remote searching for changes adding changesets
--- a/tests/test-ssh.t Sat Apr 28 01:55:39 2012 +0200 +++ b/tests/test-ssh.t Sat Apr 28 02:00:04 2012 +0200 @@ -20,21 +20,21 @@ repo not found error - $ hg clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/nonexistent local + $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local remote: abort: There is no Mercurial repository here (.hg 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 -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local remote: abort: There is no Mercurial repository here (.hg not found)! abort: no suitable response from remote hg! [255] clone remote via stream - $ hg clone -e 'python "$TESTDIR/dummyssh"' --uncompressed ssh://user@dummy/remote local-stream + $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream streaming all changes 4 files to transfer, 392 bytes of data transferred 392 bytes in * seconds (*/sec) (glob) @@ -51,7 +51,7 @@ clone remote via pull - $ hg clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote local + $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local requesting all changes adding changesets adding manifests @@ -76,7 +76,7 @@ $ hg paths default = ssh://user@dummy/remote - $ hg pull -e 'python "$TESTDIR/dummyssh"' + $ hg pull -e "python \"$TESTDIR/dummyssh\"" pulling from ssh://user@dummy/remote searching for changes no changes found @@ -90,7 +90,7 @@ $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc $ echo "[ui]" >> .hg/hgrc - $ echo 'ssh = python "$TESTDIR/dummyssh"' >> .hg/hgrc + $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc find outgoing @@ -106,7 +106,7 @@ find incoming on the remote side - $ hg incoming -R ../remote -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/local + $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local comparing with ssh://user@dummy/local searching for changes changeset: 1:a28a9d1a809c @@ -118,7 +118,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 -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" comparing with ssh://user@dummy/$TESTTMP/local searching for changes changeset: 1:a28a9d1a809c @@ -163,7 +163,7 @@ test pushkeys and bookmarks $ cd ../local - $ hg debugpushkey --config ui.ssh='python "$TESTDIR/dummyssh"' ssh://user@dummy/remote namespaces + $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces bookmarks phases namespaces @@ -178,7 +178,7 @@ no changes found exporting bookmark foo [1] - $ hg debugpushkey --config ui.ssh='python "$TESTDIR/dummyssh"' ssh://user@dummy/remote bookmarks + $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks foo 1160648e36cec0054048a7edc4110c6f84fde594 $ hg book -f foo $ hg push --traceback @@ -249,7 +249,7 @@ $ hg -R ../remote bookmark test $ hg -R ../remote bookmarks * test 2:6c0482d977a3 - $ hg clone -e 'python "$TESTDIR/dummyssh"' ssh://user@dummy/remote local-bookmarks + $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks requesting all changes adding changesets adding manifests @@ -273,9 +273,9 @@ Test remote paths with spaces (issue2983): - $ hg init --ssh 'python "$TESTDIR/dummyssh"' "ssh://user@dummy/a repo" + $ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" $ hg -R 'a repo' tag tag - $ hg id --ssh 'python "$TESTDIR/dummyssh"' "ssh://user@dummy/a repo" + $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" 3fb238f49e8c Test hg-ssh: