configitems: register the 'web.name' config
authorBoris Feld <boris.feld@octobus.net>
Wed, 11 Oct 2017 03:32:59 +0200
changeset 34586 c364f3f73634
parent 34585 f28c85e29afc
child 34587 b50c036494dc
configitems: register the 'web.name' config
mercurial/configitems.py
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/configitems.py	Wed Oct 11 03:29:09 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 11 03:32:59 2017 +0200
@@ -730,6 +730,9 @@
 coreconfigitem('web', 'ipv6',
     default=False,
 )
+coreconfigitem('web', 'name',
+    default=dynamicdefault,
+)
 coreconfigitem('web', 'port',
     default=8000,
 )
--- a/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 03:29:09 2017 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 03:32:59 2017 +0200
@@ -191,7 +191,7 @@
         sessionvars = webutil.sessionvars(vars, start)
 
         if not self.reponame:
-            self.reponame = (self.config('web', 'name')
+            self.reponame = (self.config('web', 'name', '')
                              or req.env.get('REPO_NAME')
                              or req.url.strip('/') or self.repo.root)