Mercurial > hg
changeset 979:87d40e085e08
hgweb: Changed manifest page to list format syntax
author | Josef "Jeff" Sipek <jeffpc@optonline.net> |
---|---|
date | Wed, 17 Aug 2005 22:32:47 -0500 |
parents | ea67e5b37043 |
children | 5197fb9d65d5 |
files | mercurial/hgweb.py templates/manifest.tmpl |
diffstat | 2 files changed, 28 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb.py Wed Aug 17 22:08:15 2005 -0500 +++ b/mercurial/hgweb.py Wed Aug 17 22:32:47 2005 -0500 @@ -535,28 +535,40 @@ fl.sort() for f in fl: full, fnode = files[f] - if fnode: - yield self.t("manifestfileentry", - file = full, - manifest = mnode, - filenode = hex(fnode), - parity = parity, - basename = f, - permissions = mff[full]) - else: - yield self.t("manifestdirentry", - parity = parity, - path = os.path.join(path, f), - manifest = mnode, basename = f[:-1]) + if not fnode: + continue + + yield {"file": full, + "manifest": mnode, + "filenode": hex(fnode), + "parity": parity, + "basename": f, + "permissions": mff[full]} parity = 1 - parity + def dirlist(**map): + parity = 0 + fl = files.keys() + fl.sort() + for f in fl: + full, fnode = files[f] + if fnode: + continue + + yield {"parity": parity, + "path": os.path.join(path, f), + "manifest": mnode, + "basename": f[:-1]} + parity = 1 - parity + yield self.t("manifest", manifest = mnode, rev = rev, node = hex(node), path = path, up = up(path), - entries = filelist) + fentries = filelist, + dentries = dirlist) def tags(self): cl = self.repo.changelog
--- a/templates/manifest.tmpl Wed Aug 17 22:08:15 2005 -0500 +++ b/templates/manifest.tmpl Wed Aug 17 22:32:47 2005 -0500 @@ -15,6 +15,7 @@ <tr class="parity1"> <td><tt>drwxr-xr-x</tt> <td><a href="?cmd=manifest;manifest=#manifest#;path=#up#">[up]</a> -#entries# +#dentries%manifestdirentry# +#fentries%manifestfileentry# </table> #footer#