diff mercurial/hgweb/hgwebdir_mod.py @ 2358:8819fc1dcf4b

hgweb: add allow_archive support to [web] section of hgrc
author TK Soh <teekaysoh@yahoo.com>
date Thu, 01 Jun 2006 10:02:24 -0500
parents 2db831b33e8f
children a392eaa81f29
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -58,8 +58,9 @@ class hgwebdir(object):
                                              "footer": footer})
 
         def archivelist(ui, nodeid, url):
+            al = ui.config("web", "allow_archive", "").split()
             for i in ['zip', 'gz', 'bz2']:
-                if ui.configbool("web", "allow" + i, False):
+                if i in al or ui.configbool("web", "allow" + i, False):
                     yield {"type" : i, "node": nodeid, "url": url}
 
         def entries(sortcolumn="", descending=False, **map):