mercurial/hgweb/hgwebdir_mod.py
changeset 30749 e38e7ea21987
parent 30636 f1c9fafcbf46
child 30766 d7bf7d2bd5ab
equal deleted inserted replaced
30748:319914d57b9e 30749:e38e7ea21987
   295     def makeindex(self, req, tmpl, subdir=""):
   295     def makeindex(self, req, tmpl, subdir=""):
   296 
   296 
   297         def archivelist(ui, nodeid, url):
   297         def archivelist(ui, nodeid, url):
   298             allowed = ui.configlist("web", "allow_archive", untrusted=True)
   298             allowed = ui.configlist("web", "allow_archive", untrusted=True)
   299             archives = []
   299             archives = []
   300             for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]:
   300             for typ, spec in hgweb_mod.archivespecs.iteritems():
   301                 if i[0] in allowed or ui.configbool("web", "allow" + i[0],
   301                 if typ in allowed or ui.configbool("web", "allow" + typ,
   302                                                     untrusted=True):
   302                                                     untrusted=True):
   303                     archives.append({"type" : i[0], "extension": i[1],
   303                     archives.append({"type" : typ, "extension": spec[2],
   304                                      "node": nodeid, "url": url})
   304                                      "node": nodeid, "url": url})
   305             return archives
   305             return archives
   306 
   306 
   307         def rawentries(subdir="", **map):
   307         def rawentries(subdir="", **map):
   308 
   308