Mercurial > hg-stable
changeset 37712:a728e3695325
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
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 14 Apr 2018 01:12:55 -0400 |
parents | 65a23cc8e75b |
children | 11d128a14ec0 |
files | contrib/python3-whitelist mercurial/hgweb/hgwebdir_mod.py |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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