# HG changeset patch # User Thomas Arendsen Hein # Date 1149177100 -7200 # Node ID a392eaa81f29d790f11bb5bb94ee18f89927a9e2 # Parent 8819fc1dcf4bca186d4440fb5b402e243f94333f Allow comma to separate types in allow_archive, too. Use longer variable name. diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -48,9 +48,10 @@ class hgweb(object): 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): diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- 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):