Show More
@@ -196,6 +196,11 b' class hgweb:' | |||||
196 | self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10)) |
|
196 | self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10)) | |
197 | self.allowpull = self.repo.ui.configbool("web", "allowpull", True) |
|
197 | self.allowpull = self.repo.ui.configbool("web", "allowpull", True) | |
198 |
|
198 | |||
|
199 | def archivelist(self, nodeid): | |||
|
200 | for i in self.archives: | |||
|
201 | if self.repo.ui.configbool("web", "allow" + i, False): | |||
|
202 | yield {"type" : i, "node" : nodeid} | |||
|
203 | ||||
199 | def listfiles(self, files, mf): |
|
204 | def listfiles(self, files, mf): | |
200 | for f in files[:self.maxfiles]: |
|
205 | for f in files[:self.maxfiles]: | |
201 | yield self.t("filenodelink", node=hex(mf[f]), file=f) |
|
206 | yield self.t("filenodelink", node=hex(mf[f]), file=f) | |
@@ -414,11 +419,6 b' class hgweb:' | |||||
414 | def diff(**map): |
|
419 | def diff(**map): | |
415 | yield self.diff(p1, n, None) |
|
420 | yield self.diff(p1, n, None) | |
416 |
|
421 | |||
417 | def archivelist(): |
|
|||
418 | for i in self.archives: |
|
|||
419 | if self.repo.ui.configbool("web", "allow" + i, False): |
|
|||
420 | yield {"type" : i, "node" : nodeid} |
|
|||
421 |
|
||||
422 | yield self.t('changeset', |
|
422 | yield self.t('changeset', | |
423 | diff=diff, |
|
423 | diff=diff, | |
424 | rev=cl.rev(n), |
|
424 | rev=cl.rev(n), | |
@@ -430,7 +430,7 b' class hgweb:' | |||||
430 | desc=changes[4], |
|
430 | desc=changes[4], | |
431 | date=changes[2], |
|
431 | date=changes[2], | |
432 | files=files, |
|
432 | files=files, | |
433 | archives=archivelist()) |
|
433 | archives=self.archivelist(nodeid)) | |
434 |
|
434 | |||
435 | def filelog(self, f, filenode): |
|
435 | def filelog(self, f, filenode): | |
436 | cl = self.repo.changelog |
|
436 | cl = self.repo.changelog | |
@@ -618,7 +618,8 b' class hgweb:' | |||||
618 | path=path, |
|
618 | path=path, | |
619 | up=up(path), |
|
619 | up=up(path), | |
620 | fentries=filelist, |
|
620 | fentries=filelist, | |
621 |
dentries=dirlist |
|
621 | dentries=dirlist, | |
|
622 | archives=self.archivelist(hex(node))) | |||
622 |
|
623 | |||
623 | def tags(self): |
|
624 | def tags(self): | |
624 | cl = self.repo.changelog |
|
625 | cl = self.repo.changelog |
@@ -7,6 +7,7 b'' | |||||
7 | <a href="?cl=#rev#">changelog</a> |
|
7 | <a href="?cl=#rev#">changelog</a> | |
8 | <a href="?tags=">tags</a> |
|
8 | <a href="?tags=">tags</a> | |
9 | <a href="?cs=#node|short#">changeset</a> |
|
9 | <a href="?cs=#node|short#">changeset</a> | |
|
10 | #archives%archiveentry# | |||
10 | </div> |
|
11 | </div> | |
11 |
|
12 | |||
12 | <h2>manifest for changeset #node|short#: #path#</h2> |
|
13 | <h2>manifest for changeset #node|short#: #path#</h2> |
General Comments 0
You need to be logged in to leave comments.
Login now