# HG changeset patch # User Yuya Nishihara # Date 1522590015 -32400 # Node ID 034a422aeaff721ae81f7a973ef2e8afe2b0e2a2 # Parent 40a7c1dd2df950062924d95699f3e09ab2d3e024 hgweb: forward archivelist() of hgweb to webutil self.configlist() is ui.configlist(untrusted=True), and url=None in templater effectively means 'url' is undefined. diff -r 40a7c1dd2df9 -r 034a422aeaff mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sun Apr 01 22:37:03 2018 +0900 +++ b/mercurial/hgweb/hgweb_mod.py Sun Apr 01 22:40:15 2018 +0900 @@ -128,10 +128,7 @@ untrusted=untrusted) def archivelist(self, nodeid): - allowed = self.configlist('web', 'allow_archive') - for typ, spec in webutil.archivespecs.iteritems(): - if typ in allowed or self.configbool('web', 'allow%s' % typ): - yield {'type': typ, 'extension': spec[2], 'node': nodeid} + return webutil.archivelist(self.repo.ui, nodeid) def templater(self, req): # determine scheme, port and server name diff -r 40a7c1dd2df9 -r 034a422aeaff mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py Sun Apr 01 22:37:03 2018 +0900 +++ b/mercurial/hgweb/webutil.py Sun Apr 01 22:40:15 2018 +0900 @@ -49,7 +49,7 @@ ('bz2', ('application/x-bzip2', 'tbz2', '.tar.bz2', None)), )) -def archivelist(ui, nodeid, url): +def archivelist(ui, nodeid, url=None): allowed = ui.configlist('web', 'allow_archive', untrusted=True) archives = []