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) |