Show More
@@ -535,19 +535,30 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 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]} | |||
|
547 | parity = 1 - parity | |||
|
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] | |||
538 | if fnode: |
|
555 | if fnode: | |
539 | yield self.t("manifestfileentry", |
|
556 | continue | |
540 | file = full, |
|
557 | ||
541 | manifest = mnode, |
|
558 | yield {"parity": parity, | |
542 | filenode = hex(fnode), |
|
559 | "path": os.path.join(path, f), | |
543 | parity = parity, |
|
560 | "manifest": mnode, | |
544 | basename = f, |
|
561 | "basename": f[:-1]} | |
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]) |
|
|||
551 | parity = 1 - parity |
|
562 | parity = 1 - parity | |
552 |
|
563 | |||
553 | yield self.t("manifest", |
|
564 | yield self.t("manifest", | |
@@ -556,7 +567,8 class hgweb: | |||||
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 | |||||
15 | <tr class="parity1"> |
|
15 | <tr class="parity1"> | |
16 | <td><tt>drwxr-xr-x</tt> |
|
16 | <td><tt>drwxr-xr-x</tt> | |
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