changeset 34228:af4f0c74f8b5

configitems: register the 'web.address' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:45:32 +0200
parents ac96ff471c9a
children 6742e18e41f0
files mercurial/configitems.py mercurial/hgweb/server.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/configitems.py	Fri Jun 30 03:45:31 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:45:32 2017 +0200
@@ -585,6 +585,9 @@
 coreconfigitem('web', 'accesslog',
     default='-',
 )
+coreconfigitem('web', 'address',
+    default='',
+)
 coreconfigitem('worker', 'backgroundclose',
     default=dynamicdefault,
 )
--- a/mercurial/hgweb/server.py	Fri Jun 30 03:45:31 2017 +0200
+++ b/mercurial/hgweb/server.py	Fri Jun 30 03:45:32 2017 +0200
@@ -326,7 +326,7 @@
         mimetypes.init()
         sys.setdefaultencoding(oldenc)
 
-    address = ui.config('web', 'address', '')
+    address = ui.config('web', 'address')
     port = util.getport(ui.config('web', 'port', 8000))
     try:
         return cls(ui, app, (address, port), handler)