changeset 34586:c364f3f73634

configitems: register the 'web.name' config
author Boris Feld <boris.feld@octobus.net>
date Wed, 11 Oct 2017 03:32:59 +0200
parents f28c85e29afc
children b50c036494dc
files mercurial/configitems.py mercurial/hgweb/hgweb_mod.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)