configitems: register the 'web.logoimg' config
authorBoris Feld <boris.feld@octobus.net>
Wed, 11 Oct 2017 04:16:05 +0200
changeset 34611 c879fc7bd71f
parent 34610 f3e090d0c6d6
child 34612 c2cb6be4212f
configitems: register the 'web.logoimg' config
mercurial/configitems.py
mercurial/hgweb/hgweb_mod.py
mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/configitems.py	Wed Oct 11 04:15:48 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 11 04:16:05 2017 +0200
@@ -745,6 +745,9 @@
 coreconfigitem('web', 'labels',
     default=list,
 )
+coreconfigitem('web', 'logoimg',
+    default='hglogo.png',
+)
 coreconfigitem('web', 'accesslog',
     default='-',
 )
--- a/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 04:15:48 2017 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Oct 11 04:16:05 2017 +0200
@@ -169,7 +169,7 @@
         port = port != default_port and (':' + port) or ''
         urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port)
         logourl = self.config('web', 'logourl', 'https://mercurial-scm.org/')
-        logoimg = self.config('web', 'logoimg', 'hglogo.png')
+        logoimg = self.config('web', 'logoimg')
         staticurl = self.config('web', 'staticurl') or req.url + 'static/'
         if not staticurl.endswith('/'):
             staticurl += '/'
--- a/mercurial/hgweb/hgwebdir_mod.py	Wed Oct 11 04:15:48 2017 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Wed Oct 11 04:16:05 2017 +0200
@@ -511,7 +511,7 @@
         start = url[-1] == '?' and '&' or '?'
         sessionvars = webutil.sessionvars(vars, start)
         logourl = config('web', 'logourl', 'https://mercurial-scm.org/')
-        logoimg = config('web', 'logoimg', 'hglogo.png')
+        logoimg = config('web', 'logoimg')
         staticurl = config('web', 'staticurl') or url + 'static/'
         if not staticurl.endswith('/'):
             staticurl += '/'