Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
2358:8819fc1dcf4b | 2359:a392eaa81f29 |
---|---|
56 tmpl = templater.templater(m, templater.common_filters, | 56 tmpl = templater.templater(m, templater.common_filters, |
57 defaults={"header": header, | 57 defaults={"header": header, |
58 "footer": footer}) | 58 "footer": footer}) |
59 | 59 |
60 def archivelist(ui, nodeid, url): | 60 def archivelist(ui, nodeid, url): |
61 al = ui.config("web", "allow_archive", "").split() | 61 allowed = (ui.config("web", "allow_archive", "") |
62 .replace(",", " ").split()) | |
62 for i in ['zip', 'gz', 'bz2']: | 63 for i in ['zip', 'gz', 'bz2']: |
63 if i in al or ui.configbool("web", "allow" + i, False): | 64 if i in allowed or ui.configbool("web", "allow" + i): |
64 yield {"type" : i, "node": nodeid, "url": url} | 65 yield {"type" : i, "node": nodeid, "url": url} |
65 | 66 |
66 def entries(sortcolumn="", descending=False, **map): | 67 def entries(sortcolumn="", descending=False, **map): |
67 rows = [] | 68 rows = [] |
68 parity = 0 | 69 parity = 0 |