Patchwork D3322: py3: use urllib.parse.unquote_plus instead of urllib.unquote_plus

login
register
mail settings
Submitter phabricator
Date April 13, 2018, 10:22 p.m.
Message ID <0ec4b7ba830f306cf959e0bacd749cc3@localhost.localdomain>
Download mbox | patch
Permalink /patch/30944/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2018, 10:22 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGafe624d78d43: py3: use urllib.parse.unquote_plus instead of urllib.unquote_plus (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3322?vs=8142&id=8197

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

AFFECTED FILES
  tests/test-narrow-clone-non-narrow-server.t

CHANGE DETAILS




To: pulkit, durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-narrow-clone-non-narrow-server.t b/tests/test-narrow-clone-non-narrow-server.t
--- a/tests/test-narrow-clone-non-narrow-server.t
+++ b/tests/test-narrow-clone-non-narrow-server.t
@@ -18,8 +18,20 @@ 
   $ cat hg.pid >> "$DAEMON_PIDS"
 
 Verify that narrow is advertised in the bundle2 capabilities:
+
+  $ cat >> unquote.py <<EOF
+  > from __future__ import print_function
+  > import sys
+  > if sys.version[0] == '3':
+  >     import urllib.parse as up
+  >     unquote = up.unquote_plus
+  > else:
+  >     import urllib
+  >     unquote = urllib.unquote_plus
+  > print(unquote(list(sys.stdin)[1]))
+  > EOF
   $ echo hello | hg -R . serve --stdio | \
-  >   $PYTHON -c "from __future__ import print_function; import sys, urllib; print(urllib.unquote_plus(list(sys.stdin)[1]))" | grep narrow
+  >   $PYTHON unquote.py | grep narrow
   narrow=v0
 
   $ cd ..