Mercurial > hg-stable
changeset 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 |
files | mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Thu Jun 01 10:02:24 2006 -0500 +++ b/mercurial/hgweb/hgweb_mod.py Thu Jun 01 17:51:40 2006 +0200 @@ -48,9 +48,10 @@ self.allowpull = self.repo.ui.configbool("web", "allowpull", True) def archivelist(self, nodeid): - al = self.repo.ui.config("web", "allow_archive", "").split() + allowed = (self.repo.ui.config("web", "allow_archive", "") + .replace(",", " ").split()) for i in self.archives: - if i in al or self.repo.ui.configbool("web", "allow" + i, False): + if i in allowed or self.repo.ui.configbool("web", "allow" + i): yield {"type" : i, "node" : nodeid, "url": ""} def listfiles(self, files, mf):
--- a/mercurial/hgweb/hgwebdir_mod.py Thu Jun 01 10:02:24 2006 -0500 +++ b/mercurial/hgweb/hgwebdir_mod.py Thu Jun 01 17:51:40 2006 +0200 @@ -58,9 +58,10 @@ "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):