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,8 +48,9 @@ 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() for i in self.archives: - if self.repo.ui.configbool("web", "allow" + i, False): + if i in al or self.repo.ui.configbool("web", "allow" + i, False): yield {"type" : i, "node" : nodeid, "url": ""} def listfiles(self, files, mf): @@ -803,8 +804,9 @@ class hgweb(object): elif cmd == 'archive': changeset = self.repo.lookup(req.form['node'][0]) type = req.form['type'][0] - if (type in self.archives and - self.repo.ui.configbool("web", "allow" + type, False)): + allowed = self.repo.ui.config("web", "allow_archive", "").split() + if (type in self.archives and (type in allowed or + self.repo.ui.configbool("web", "allow" + type, False))): self.archive(req, changeset, type) return