# HG changeset patch # User Matt Mackall # Date 1350676075 18000 # Node ID b32e55e6c3c729c1eb0658a0c3bc109259bfdae6 # Parent 66a613b592213820a22c2a5f93f90c55c3405a73 clone: don't %-escape the default destination (issue3145) diff -r 66a613b59221 -r b32e55e6c3c7 mercurial/hg.py --- a/mercurial/hg.py Fri Oct 19 15:45:16 2012 +0200 +++ b/mercurial/hg.py Fri Oct 19 14:47:55 2012 -0500 @@ -115,7 +115,7 @@ def defaultdest(source): '''return default destination of clone if none is given''' - return os.path.basename(os.path.normpath(source)) + return os.path.basename(os.path.normpath(util.url(source).path)) def share(ui, source, dest=None, update=True): '''create a shared repository''' diff -r 66a613b59221 -r b32e55e6c3c7 tests/test-ssh.t --- a/tests/test-ssh.t Fri Oct 19 15:45:16 2012 +0200 +++ b/tests/test-ssh.t Fri Oct 19 14:47:55 2012 -0500 @@ -284,6 +284,13 @@ $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" 73649e48688a +Test (non-)escaping of remote paths with spaces when cloning (issue3145): + + $ hg clone --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" + destination directory: a repo + abort: destination 'a repo' is not empty + [255] + Test hg-ssh using a helper script that will restore PYTHONPATH (which might have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right parameters: @@ -374,3 +381,4 @@ Got arguments 1:user@dummy 2:hg init 'a repo' Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio + Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio