Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/hgweb_mod.py @ 2500:76ff5efe8181
Fixed [web] allow_archive for comma separated parameters by using ui.configlist.
Changed tests/test-archive to use allow_archive instead of the deprecated
allowzip, allowgz and allowbz2.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 26 Jun 2006 14:56:14 +0200 |
parents | e10665147d26 |
children | b73552a00b20 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Mon Jun 26 14:52:26 2006 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Mon Jun 26 14:56:14 2006 +0200 @@ -50,8 +50,7 @@ self.allowpull = self.repo.ui.configbool("web", "allowpull", True) def archivelist(self, nodeid): - allowed = (self.repo.ui.config("web", "allow_archive", "") - .replace(",", " ").split()) + allowed = self.repo.ui.configlist("web", "allow_archive") for i in self.archives: if i in allowed or self.repo.ui.configbool("web", "allow" + i): yield {"type" : i, "node" : nodeid, "url": ""} @@ -818,7 +817,7 @@ def do_archive(self, req): changeset = self.repo.lookup(req.form['node'][0]) type_ = req.form['type'][0] - allowed = self.repo.ui.config("web", "allow_archive", "").split() + allowed = self.repo.ui.configlist("web", "allow_archive") if (type_ in self.archives and (type_ in allowed or self.repo.ui.configbool("web", "allow" + type_, False))): self.archive(req, changeset, type_)