hgwebdir: un-bytes the env dict before re-parsing env
Not the most elegant, but it restores
test-subrepo-deep-nested-change.t to passing on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D3367
--- a/contrib/python3-whitelist Sat Apr 14 16:36:15 2018 -0700
+++ b/contrib/python3-whitelist Sat Apr 14 01:12:55 2018 -0400
@@ -151,6 +151,7 @@
test-glog-topological.t
test-gpg.t
test-graft.t
+test-hg-parseurl.py
test-hghave.t
test-hgignore.t
test-hgk.t
--- a/mercurial/hgweb/hgwebdir_mod.py Sat Apr 14 16:36:15 2018 -0700
+++ b/mercurial/hgweb/hgwebdir_mod.py Sat Apr 14 01:12:55 2018 -0400
@@ -422,8 +422,12 @@
if real:
# Re-parse the WSGI environment to take into account our
# repository path component.
+ uenv = req.rawenv
+ if pycompat.ispy3:
+ uenv = {k.decode('latin1'): v for k, v in
+ uenv.iteritems()}
req = requestmod.parserequestfromenv(
- req.rawenv, reponame=virtualrepo,
+ uenv, reponame=virtualrepo,
altbaseurl=self.ui.config('web', 'baseurl'))
try:
# ensure caller gets private copy of ui