diff mercurial/hgweb/hgweb_mod.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 aac97d043e6d
children b29f490eb904
line wrap: on
line diff
--- 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