# HG changeset patch # User Boris Feld # Date 2017-06-30 01:45:49 # Node ID d24816dfdcffd78ac066008108841c62aca04fe1 # Parent e2d633f8ee659aa061726dd39db36e36b0113773 configitems: register the 'web.prefix' config diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -631,6 +631,9 @@ coreconfigitem('web', 'ipv6', coreconfigitem('web', 'port', default=8000, ) +coreconfigitem('web', 'prefix', + default='', +) coreconfigitem('worker', 'backgroundclose', default=dynamicdefault, ) diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -177,7 +177,7 @@ class hgwebdir(object): if self.stripecount: self.stripecount = int(self.stripecount) self._baseurl = self.ui.config('web', 'baseurl') - prefix = self.ui.config('web', 'prefix', '') + prefix = self.ui.config('web', 'prefix') if prefix.startswith('/'): prefix = prefix[1:] if prefix.endswith('/'): diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -277,7 +277,7 @@ class MercurialHTTPServer(_mixin, httpse handler.preparehttpserver(self, ui) - prefix = ui.config('web', 'prefix', '') + prefix = ui.config('web', 'prefix') if prefix: prefix = '/' + prefix.strip('/') self.prefix = prefix