[PATCH V4] hgwebdir: allow a repository to be hosted at "/"
Kevin Bullock
kbullock+mercurial at ringworld.org
Mon Apr 17 16:27:43 EDT 2017
> On Apr 15, 2017, at 14:34, Matt Harbison <mharbison72 at gmail.com> wrote:
>
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1491015641 14400
> # Fri Mar 31 23:00:41 2017 -0400
> # Node ID 3fd50d5f9314a96f43eb73480763f224c4d05831
> # Parent 4c2c30bc38b4f84ce8f215146bbf158e299065b3
> 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 /.
>
> diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
> --- a/mercurial/hgweb/hgweb_mod.py
> +++ b/mercurial/hgweb/hgweb_mod.py
> @@ -335,7 +335,7 @@
> req.url = req.env['SCRIPT_NAME']
> if not req.url.endswith('/'):
> req.url += '/'
> - if 'REPO_NAME' in req.env:
> + if req.env.get('REPO_NAME'):
Since we don't need the value returned from .get(), is there some other reason for this change that I'm not seeing?
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel
mailing list