diff mercurial/hgweb/hgwebdir_mod.py @ 2359:a392eaa81f29

Allow comma to separate types in allow_archive, too. Use longer variable name.
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 01 Jun 2006 17:51:40 +0200
parents 8819fc1dcf4b
children 25ec4981883e
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -58,9 +58,10 @@ class hgwebdir(object):
                                              "footer": footer})
 
         def archivelist(ui, nodeid, url):
-            al = ui.config("web", "allow_archive", "").split()
+            allowed = (ui.config("web", "allow_archive", "")
+                       .replace(",", " ").split())
             for i in ['zip', 'gz', 'bz2']:
-                if i in al or ui.configbool("web", "allow" + i, False):
+                if i in allowed or ui.configbool("web", "allow" + i):
                     yield {"type" : i, "node": nodeid, "url": url}
 
         def entries(sortcolumn="", descending=False, **map):