Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 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 | 8a5ee6aa8870 |
children | 877185de62cf |
comparison
equal
deleted
inserted
replaced
37711:65a23cc8e75b | 37712:a728e3695325 |
---|---|
420 for virtualrepo in _virtualdirs(): | 420 for virtualrepo in _virtualdirs(): |
421 real = repos.get(virtualrepo) | 421 real = repos.get(virtualrepo) |
422 if real: | 422 if real: |
423 # Re-parse the WSGI environment to take into account our | 423 # Re-parse the WSGI environment to take into account our |
424 # repository path component. | 424 # repository path component. |
425 uenv = req.rawenv | |
426 if pycompat.ispy3: | |
427 uenv = {k.decode('latin1'): v for k, v in | |
428 uenv.iteritems()} | |
425 req = requestmod.parserequestfromenv( | 429 req = requestmod.parserequestfromenv( |
426 req.rawenv, reponame=virtualrepo, | 430 uenv, reponame=virtualrepo, |
427 altbaseurl=self.ui.config('web', 'baseurl')) | 431 altbaseurl=self.ui.config('web', 'baseurl')) |
428 try: | 432 try: |
429 # ensure caller gets private copy of ui | 433 # ensure caller gets private copy of ui |
430 repo = hg.repository(self.ui.copy(), real) | 434 repo = hg.repository(self.ui.copy(), real) |
431 return hgweb_mod.hgweb(repo).run_wsgi(req, res) | 435 return hgweb_mod.hgweb(repo).run_wsgi(req, res) |