Patchwork [17,of,23] configitems: register the 'web.port' config

login
register
mail settings
Submitter Boris Feld
Date Sept. 16, 2017, 6:28 p.m.
Message ID <71bc12dbd2bf981202a3.1505586504@FB>
Download mbox | patch
Permalink /patch/23969/
State Accepted
Headers show

Comments

Boris Feld - Sept. 16, 2017, 6:28 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498787148 -7200
#      ven. juin 30 03:45:48 2017 +0200
# Node ID 71bc12dbd2bf981202a34f64f941949a4b3c1860
# Parent  a37307dde4e5c3d4a418b3d4c61a5bb5d3ce467c
# EXP-Topic config.register.web
configitems: register the 'web.port' config

Patch

diff -r a37307dde4e5 -r 71bc12dbd2bf mercurial/configitems.py
--- a/mercurial/configitems.py	ven. juin 30 03:45:47 2017 +0200
+++ b/mercurial/configitems.py	ven. juin 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,
 )
diff -r a37307dde4e5 -r 71bc12dbd2bf mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py	ven. juin 30 03:45:47 2017 +0200
+++ b/mercurial/hgweb/server.py	ven. juin 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: