comparison mercurial/hgweb/hgweb_mod.py @ 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 d3adb454c5a9
comparison
equal deleted inserted replaced
2358:8819fc1dcf4b 2359:a392eaa81f29
46 self.maxchanges = int(self.repo.ui.config("web", "maxchanges", 10)) 46 self.maxchanges = int(self.repo.ui.config("web", "maxchanges", 10))
47 self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10)) 47 self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10))
48 self.allowpull = self.repo.ui.configbool("web", "allowpull", True) 48 self.allowpull = self.repo.ui.configbool("web", "allowpull", True)
49 49
50 def archivelist(self, nodeid): 50 def archivelist(self, nodeid):
51 al = self.repo.ui.config("web", "allow_archive", "").split() 51 allowed = (self.repo.ui.config("web", "allow_archive", "")
52 .replace(",", " ").split())
52 for i in self.archives: 53 for i in self.archives:
53 if i in al or self.repo.ui.configbool("web", "allow" + i, False): 54 if i in allowed or self.repo.ui.configbool("web", "allow" + i):
54 yield {"type" : i, "node" : nodeid, "url": ""} 55 yield {"type" : i, "node" : nodeid, "url": ""}
55 56
56 def listfiles(self, files, mf): 57 def listfiles(self, files, mf):
57 for f in files[:self.maxfiles]: 58 for f in files[:self.maxfiles]:
58 yield self.t("filenodelink", node=hex(mf[f]), file=f) 59 yield self.t("filenodelink", node=hex(mf[f]), file=f)