Patchwork D5669: tests: support URL quoting on Python 3

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2019, 2:27 a.m.
Message ID <a500c2ee9a6a10e71878ac9f09f26dbe@localhost.localdomain>
Download mbox | patch
Permalink /patch/37950/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2019, 2:27 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd5c58d679ed9: tests: support URL quoting on Python 3 (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5669?vs=13381&id=13387

REVISION DETAIL
  https://phab.mercurial-scm.org/D5669

AFFECTED FILES
  tests/test-mq-subrepo-svn.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mjpieters, mercurial-devel

Patch

diff --git a/tests/test-mq-subrepo-svn.t b/tests/test-mq-subrepo-svn.t
--- a/tests/test-mq-subrepo-svn.t
+++ b/tests/test-mq-subrepo-svn.t
@@ -23,10 +23,17 @@ 
   $ svnadmin create svn-repo-2499
 
   $ SVNREPOPATH=`pwd`/svn-repo-2499/project
+
+#if py3
+  $ pathquoted=`"$PYTHON" -c "import sys, urllib.parse; sys.stdout.write(urllib.parse.quote(sys.argv[1]))" "$SVNREPOPATH"`
+#else
+  $ pathquoted=`"$PYTHON" -c "import sys, urllib; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
+#endif
+
 #if windows
-  $ SVNREPOURL=file:///`"$PYTHON" -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
+  $ SVNREPOURL=file:///$pathquoted
 #else
-  $ SVNREPOURL=file://`"$PYTHON" -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
+  $ SVNREPOURL=file://$pathquoted
 #endif
 
   $ mkdir -p svn-project-2499/trunk