# HG changeset patch # User Boris Feld # Date 2017-06-30 01:45:48 # Node ID e2d633f8ee659aa061726dd39db36e36b0113773 # Parent 98fa9183de547a7e030bc761d2842554d0bac1a2 configitems: register the 'web.port' config diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -628,6 +628,9 @@ coreconfigitem('web', 'errorlog', coreconfigitem('web', 'ipv6', default=False, ) +coreconfigitem('web', 'port', + default=8000, +) coreconfigitem('worker', 'backgroundclose', default=dynamicdefault, ) diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -327,7 +327,7 @@ def create_server(ui, app): 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: