configitems: register the 'web.port' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 30 Jun 2017 03:45:48 +0200
changeset 34242 e2d633f8ee65
parent 34241 98fa9183de54
child 34243 d24816dfdcff
configitems: register the 'web.port' config
mercurial/configitems.py
mercurial/hgweb/server.py
--- 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: