Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
2357:4a7bdb1e8dc1 | 2358:8819fc1dcf4b |
---|---|
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 for i in ['zip', 'gz', 'bz2']: | 62 for i in ['zip', 'gz', 'bz2']: |
62 if ui.configbool("web", "allow" + i, False): | 63 if i in al or ui.configbool("web", "allow" + i, False): |
63 yield {"type" : i, "node": nodeid, "url": url} | 64 yield {"type" : i, "node": nodeid, "url": url} |
64 | 65 |
65 def entries(sortcolumn="", descending=False, **map): | 66 def entries(sortcolumn="", descending=False, **map): |
66 rows = [] | 67 rows = [] |
67 parity = 0 | 68 parity = 0 |