Mercurial > hg
comparison mercurial/hgweb/hgweb_mod.py @ 32004:bd3cb917761a
hgwebdir: allow a repository to be hosted at "/"
This can be useful in general, but will also be useful for hosting subrepos,
with the main repo at /.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 31 Mar 2017 23:00:41 -0400 |
parents | d7bf7d2bd5ab |
children | eede022fc142 |
comparison
equal
deleted
inserted
replaced
32003:84569d2b3fb7 | 32004:bd3cb917761a |
---|---|
333 # use SCRIPT_NAME, PATH_INFO and QUERY_STRING as well as our REPO_NAME | 333 # use SCRIPT_NAME, PATH_INFO and QUERY_STRING as well as our REPO_NAME |
334 | 334 |
335 req.url = req.env['SCRIPT_NAME'] | 335 req.url = req.env['SCRIPT_NAME'] |
336 if not req.url.endswith('/'): | 336 if not req.url.endswith('/'): |
337 req.url += '/' | 337 req.url += '/' |
338 if 'REPO_NAME' in req.env: | 338 if req.env.get('REPO_NAME'): |
339 req.url += req.env['REPO_NAME'] + '/' | 339 req.url += req.env['REPO_NAME'] + '/' |
340 | 340 |
341 if 'PATH_INFO' in req.env: | 341 if 'PATH_INFO' in req.env: |
342 parts = req.env['PATH_INFO'].strip('/').split('/') | 342 parts = req.env['PATH_INFO'].strip('/').split('/') |
343 repo_parts = req.env.get('REPO_NAME', '').split('/') | 343 repo_parts = req.env.get('REPO_NAME', '').split('/') |