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

Boris Feld boris.feld at octobus.net
Sat Sep 16 14:28:24 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at 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

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:


More information about the Mercurial-devel mailing list