# HG changeset patch # User Thomas Arendsen Hein # Date 1188551909 -7200 # Node ID 6e0f05f6f68d2165069cd67bc558593a0dc61416 # Parent a0229e4e4b73e5f66f32c301f5893b0dbb903009 hgweb: Show date of last change for each file in manifest diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -482,10 +482,12 @@ class hgweb(object): if not fnode: continue + fctx = ctx.filectx(full) yield {"file": full, "parity": parity.next(), "basename": f, - "size": ctx.filectx(full).size(), + "date": fctx.changectx().date(), + "size": fctx.size(), "permissions": mf.flags(full)} def dirlist(**map): diff --git a/templates/gitweb/manifest.tmpl b/templates/gitweb/manifest.tmpl --- a/templates/gitweb/manifest.tmpl +++ b/templates/gitweb/manifest.tmpl @@ -25,6 +25,7 @@ manifest | drwxr-xr-x + [up]   diff --git a/templates/gitweb/map b/templates/gitweb/map --- a/templates/gitweb/map +++ b/templates/gitweb/map @@ -16,8 +16,8 @@ changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl changeset = changeset.tmpl manifest = manifest.tmpl -manifestdirentry = 'drwxr-xr-x#basename|escape#manifest' -manifestfileentry = '#permissions|permissions##size##basename|escape#file | revisions | annotate' +manifestdirentry = 'drwxr-xr-x#basename|escape#manifest' +manifestfileentry = '#permissions|permissions##date|isodate##size##basename|escape#file | revisions | annotate' filerevision = filerevision.tmpl fileannotate = fileannotate.tmpl filediff = filediff.tmpl diff --git a/templates/manifest.tmpl b/templates/manifest.tmpl --- a/templates/manifest.tmpl +++ b/templates/manifest.tmpl @@ -17,6 +17,7 @@ drwxr-xr-x    +   [up] #dentries%manifestdirentry# diff --git a/templates/map b/templates/map --- a/templates/map +++ b/templates/map @@ -15,8 +15,8 @@ changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl changeset = changeset.tmpl manifest = manifest.tmpl -manifestdirentry = 'drwxr-xr-x  #basename|escape#/' -manifestfileentry = '#permissions|permissions# #size# #basename|escape#' +manifestdirentry = 'drwxr-xr-x   #basename|escape#/' +manifestfileentry = '#permissions|permissions# #date|isodate# #size# #basename|escape#' filerevision = filerevision.tmpl fileannotate = fileannotate.tmpl filediff = filediff.tmpl diff --git a/templates/static/style.css b/templates/static/style.css --- a/templates/static/style.css +++ b/templates/static/style.css @@ -1,5 +1,6 @@ a { text-decoration:none; } .age { white-space:nowrap; } +.date { white-space:nowrap; } .indexlinks { white-space:nowrap; } .parity0 { background-color: #dddddd; } .parity1 { background-color: #eeeeee; }