diff tests/test-ssh.t @ 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 19379226dc67
line wrap: on
line diff
--- 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: