diff mercurial/hgweb/webcommands.py @ 6434:62e0bb41e682

hgweb: minor improvements for new web style - make renamelink take a context - pass current node to shortlog page rather than tip - pass user/desc/date/rename to filediff - improve template error reporting for foo%bar
author Matt Mackall <mpm@selenic.com>
date Mon, 31 Mar 2008 21:49:33 -0500
parents 644a56c7ae79
children 101526031d06
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Mon Mar 31 21:49:32 2008 -0500
+++ b/mercurial/hgweb/webcommands.py	Mon Mar 31 21:49:33 2008 -0500
@@ -85,7 +85,7 @@
                 branch=webutil.nodebranchnodefault(fctx),
                 parent=webutil.siblings(fctx.parents()),
                 child=webutil.siblings(fctx.children()),
-                rename=webutil.renamelink(fl, n),
+                rename=webutil.renamelink(fctx),
                 permissions=fctx.manifest().flags(f))
 
 def file(web, req, tmpl):
@@ -215,7 +215,7 @@
 
     return tmpl(shortlog and 'shortlog' or 'changelog',
                 changenav=changenav,
-                node=hex(cl.tip()),
+                node=hex(ctx.node()),
                 rev=pos, changesets=count,
                 entries=lambda **x: changelist(limit=0,**x),
                 latestentry=lambda **x: changelist(limit=1,**x),
@@ -435,6 +435,10 @@
                 file=path,
                 node=hex(n),
                 rev=fctx.rev(),
+                date=fctx.date(),
+                desc=fctx.description(),
+                author=fctx.user(),
+                rename=self.renamelink(fctx),
                 branch=webutil.nodebranchnodefault(fctx),
                 parent=webutil.siblings(parents),
                 child=webutil.siblings(fctx.children()),
@@ -484,7 +488,7 @@
                 author=fctx.user(),
                 date=fctx.date(),
                 desc=fctx.description(),
-                rename=webutil.renamelink(fl, n),
+                rename=webutil.renamelink(fctx),
                 branch=webutil.nodebranchnodefault(fctx),
                 parent=webutil.siblings(fctx.parents()),
                 child=webutil.siblings(fctx.children()),
@@ -515,7 +519,7 @@
                          "node": hex(ctx.node()),
                          "author": ctx.user(),
                          "date": ctx.date(),
-                         "rename": webutil.renamelink(fl, n),
+                         "rename": webutil.renamelink(fctx),
                          "parent": webutil.siblings(fctx.parents()),
                          "child": webutil.siblings(fctx.children()),
                          "desc": ctx.description()})