##// END OF EJS Templates
hgweb: Added archive download buttons to manifest page.
Thomas Arendsen Hein -
r1498:78590fb4 default
parent child Browse files
Show More
@@ -196,6 +196,11 b' class hgweb:'
196 196 self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10))
197 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 204 def listfiles(self, files, mf):
200 205 for f in files[:self.maxfiles]:
201 206 yield self.t("filenodelink", node=hex(mf[f]), file=f)
@@ -414,11 +419,6 b' class hgweb:'
414 419 def diff(**map):
415 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 422 yield self.t('changeset',
423 423 diff=diff,
424 424 rev=cl.rev(n),
@@ -430,7 +430,7 b' class hgweb:'
430 430 desc=changes[4],
431 431 date=changes[2],
432 432 files=files,
433 archives=archivelist())
433 archives=self.archivelist(nodeid))
434 434
435 435 def filelog(self, f, filenode):
436 436 cl = self.repo.changelog
@@ -618,7 +618,8 b' class hgweb:'
618 618 path=path,
619 619 up=up(path),
620 620 fentries=filelist,
621 dentries=dirlist)
621 dentries=dirlist,
622 archives=self.archivelist(hex(node)))
622 623
623 624 def tags(self):
624 625 cl = self.repo.changelog
@@ -7,6 +7,7 b''
7 7 <a href="?cl=#rev#">changelog</a>
8 8 <a href="?tags=">tags</a>
9 9 <a href="?cs=#node|short#">changeset</a>
10 #archives%archiveentry#
10 11 </div>
11 12
12 13 <h2>manifest for changeset #node|short#: #path#</h2>
General Comments 0
You need to be logged in to leave comments. Login now