changeset 34242:e2d633f8ee65

configitems: register the 'web.port' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:45:48 +0200
parents 98fa9183de54
children d24816dfdcff
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:47 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:45:48 2017 +0200
@@ -628,6 +628,9 @@
 coreconfigitem('web', 'ipv6',
     default=False,
 )
+coreconfigitem('web', 'port',
+    default=8000,
+)
 coreconfigitem('worker', 'backgroundclose',
     default=dynamicdefault,
 )
--- a/mercurial/hgweb/server.py	Fri Jun 30 03:45:47 2017 +0200
+++ b/mercurial/hgweb/server.py	Fri Jun 30 03:45:48 2017 +0200
@@ -327,7 +327,7 @@
         sys.setdefaultencoding(oldenc)
 
     address = ui.config('web', 'address')
-    port = util.getport(ui.config('web', 'port', 8000))
+    port = util.getport(ui.config('web', 'port'))
     try:
         return cls(ui, app, (address, port), handler)
     except socket.error as inst: