##// END OF EJS Templates
hgweb: Changed manifest page to list format syntax
Josef "Jeff" Sipek -
r979:87d40e08 default
parent child Browse files
Show More
@@ -535,28 +535,40 b' class hgweb:'
535 535 fl.sort()
536 536 for f in fl:
537 537 full, fnode = files[f]
538 if fnode:
539 yield self.t("manifestfileentry",
540 file = full,
541 manifest = mnode,
542 filenode = hex(fnode),
543 parity = parity,
544 basename = f,
545 permissions = mff[full])
546 else:
547 yield self.t("manifestdirentry",
548 parity = parity,
549 path = os.path.join(path, f),
550 manifest = mnode, basename = f[:-1])
538 if not fnode:
539 continue
540
541 yield {"file": full,
542 "manifest": mnode,
543 "filenode": hex(fnode),
544 "parity": parity,
545 "basename": f,
546 "permissions": mff[full]}
551 547 parity = 1 - parity
552 548
549 def dirlist(**map):
550 parity = 0
551 fl = files.keys()
552 fl.sort()
553 for f in fl:
554 full, fnode = files[f]
555 if fnode:
556 continue
557
558 yield {"parity": parity,
559 "path": os.path.join(path, f),
560 "manifest": mnode,
561 "basename": f[:-1]}
562 parity = 1 - parity
563
553 564 yield self.t("manifest",
554 565 manifest = mnode,
555 566 rev = rev,
556 567 node = hex(node),
557 568 path = path,
558 569 up = up(path),
559 entries = filelist)
570 fentries = filelist,
571 dentries = dirlist)
560 572
561 573 def tags(self):
562 574 cl = self.repo.changelog
@@ -15,6 +15,7 b''
15 15 <tr class="parity1">
16 16 <td><tt>drwxr-xr-x</tt>&nbsp;
17 17 <td><a href="?cmd=manifest;manifest=#manifest#;path=#up#">[up]</a>
18 #entries#
18 #dentries%manifestdirentry#
19 #fentries%manifestfileentry#
19 20 </table>
20 21 #footer#
General Comments 0
You need to be logged in to leave comments. Login now