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