mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
configitems: register the 'web.prefix' config
This commit is contained in:
parent
88f87cb825
commit
dd08c3c7c0
@ -631,6 +631,9 @@ coreconfigitem('web', 'ipv6',
|
||||
coreconfigitem('web', 'port',
|
||||
default=8000,
|
||||
)
|
||||
coreconfigitem('web', 'prefix',
|
||||
default='',
|
||||
)
|
||||
coreconfigitem('worker', 'backgroundclose',
|
||||
default=dynamicdefault,
|
||||
)
|
||||
|
@ -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('/'):
|
||||
|
@ -277,7 +277,7 @@ class MercurialHTTPServer(_mixin, httpservermod.httpserver, object):
|
||||
|
||||
handler.preparehttpserver(self, ui)
|
||||
|
||||
prefix = ui.config('web', 'prefix', '')
|
||||
prefix = ui.config('web', 'prefix')
|
||||
if prefix:
|
||||
prefix = '/' + prefix.strip('/')
|
||||
self.prefix = prefix
|
||||
|
Loading…
Reference in New Issue
Block a user