# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-04-13 19:26:44 # Node ID afe624d78d4363c17592298674e81e745213abdc # Parent 9dfa4e9ed45db85fac98cda2cbb202c40aac1080 py3: use urllib.parse.unquote_plus instead of urllib.unquote_plus The later is not present in Python 3. Differential Revision: https://phab.mercurial-scm.org/D3322 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 @@ Test attempting a narrow clone against a $ cat hg.pid >> "$DAEMON_PIDS" Verify that narrow is advertised in the bundle2 capabilities: + + $ cat >> unquote.py < 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 ..