equal
deleted
inserted
replaced
450 yield '' |
450 yield '' |
451 |
451 |
452 for virtualrepo in _virtualdirs(): |
452 for virtualrepo in _virtualdirs(): |
453 real = repos.get(virtualrepo) |
453 real = repos.get(virtualrepo) |
454 if real: |
454 if real: |
455 wsgireq.env['REPO_NAME'] = virtualrepo |
455 # Re-parse the WSGI environment to take into account our |
456 # We have to re-parse because of updated environment |
456 # repository path component. |
457 # variable. |
|
458 # TODO this is kind of hacky and we should have a better |
|
459 # way of doing this than with REPO_NAME side-effects. |
|
460 wsgireq.req = requestmod.parserequestfromenv( |
457 wsgireq.req = requestmod.parserequestfromenv( |
461 wsgireq.env, wsgireq.req.bodyfh) |
458 wsgireq.env, wsgireq.req.bodyfh, reponame=virtualrepo) |
462 try: |
459 try: |
463 # ensure caller gets private copy of ui |
460 # ensure caller gets private copy of ui |
464 repo = hg.repository(self.ui.copy(), real) |
461 repo = hg.repository(self.ui.copy(), real) |
465 return hgweb_mod.hgweb(repo).run_wsgi(wsgireq) |
462 return hgweb_mod.hgweb(repo).run_wsgi(wsgireq) |
466 except IOError as inst: |
463 except IOError as inst: |