comparison mercurial/hgweb/webutil.py @ 37514:034a422aeaff

hgweb: forward archivelist() of hgweb to webutil self.configlist() is ui.configlist(untrusted=True), and url=None in templater effectively means 'url' is undefined.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 01 Apr 2018 22:40:15 +0900
parents 40a7c1dd2df9
children 8a5ee6aa8870
comparison
equal deleted inserted replaced
37513:40a7c1dd2df9 37514:034a422aeaff
47 ('zip', ('application/zip', 'zip', '.zip', None)), 47 ('zip', ('application/zip', 'zip', '.zip', None)),
48 ('gz', ('application/x-gzip', 'tgz', '.tar.gz', None)), 48 ('gz', ('application/x-gzip', 'tgz', '.tar.gz', None)),
49 ('bz2', ('application/x-bzip2', 'tbz2', '.tar.bz2', None)), 49 ('bz2', ('application/x-bzip2', 'tbz2', '.tar.bz2', None)),
50 )) 50 ))
51 51
52 def archivelist(ui, nodeid, url): 52 def archivelist(ui, nodeid, url=None):
53 allowed = ui.configlist('web', 'allow_archive', untrusted=True) 53 allowed = ui.configlist('web', 'allow_archive', untrusted=True)
54 archives = [] 54 archives = []
55 55
56 for typ, spec in archivespecs.iteritems(): 56 for typ, spec in archivespecs.iteritems():
57 if typ in allowed or ui.configbool('web', 'allow' + typ, 57 if typ in allowed or ui.configbool('web', 'allow' + typ,