# HG changeset patch # User Yuya Nishihara # Date 1537686948 -32400 # Node ID 536f22d6c2c5b8bf00795592901ae58552433390 # Parent ff0060d2a0999b266a86d5a02cf3af55f824270c hgweb: register web.static to the config table Otherwise we would got a develwarn. diff -r ff0060d2a099 -r 536f22d6c2c5 mercurial/configitems.py --- a/mercurial/configitems.py Sun Sep 23 17:01:26 2018 +0900 +++ b/mercurial/configitems.py Sun Sep 23 16:15:48 2018 +0900 @@ -1352,6 +1352,9 @@ coreconfigitem('web', 'server-header', default=None, ) +coreconfigitem('web', 'static', + default=None, +) coreconfigitem('web', 'staticurl', default=None, ) diff -r ff0060d2a099 -r 536f22d6c2c5 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Sun Sep 23 17:01:26 2018 +0900 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun Sep 23 16:15:48 2018 +0900 @@ -383,8 +383,7 @@ fname = virtual[7:] else: fname = req.qsparams['static'] - static = self.ui.config("web", "static", None, - untrusted=False) + static = self.ui.config("web", "static", untrusted=False) if not static: tp = self.templatepath or templater.templatepaths() if isinstance(tp, str): diff -r ff0060d2a099 -r 536f22d6c2c5 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Sun Sep 23 17:01:26 2018 +0900 +++ b/mercurial/hgweb/webcommands.py Sun Sep 23 16:15:48 2018 +0900 @@ -1221,7 +1221,7 @@ fname = web.req.qsparams['file'] # a repo owner may set web.static in .hg/hgrc to get any file # readable by the user running the CGI script - static = web.config("web", "static", None, untrusted=False) + static = web.config("web", "static", untrusted=False) if not static: tp = web.templatepath or templater.templatepaths() if isinstance(tp, str):