diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -85,7 +85,7 @@ def _filerevision(web, tmpl, fctx): 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 @@ def changelog(web, req, tmpl, shortlog = 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 @@ def filediff(web, req, tmpl): 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 @@ def annotate(web, req, tmpl): 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 @@ def filelog(web, req, tmpl): "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()}) diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -70,8 +70,8 @@ def siblings(siblings=[], hiderev=None, d.update(args) yield d -def renamelink(fl, node): - r = fl.renamed(node) +def renamelink(fctx): + r = fctx.renamed(node) if r: return [dict(file=r[0], node=hex(r[1]))] return [] diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -114,7 +114,7 @@ class templater(object): v = v(**map) if format: if not hasattr(v, '__iter__'): - raise SyntaxError(_("Error expanding '%s%s'") + raise SyntaxError(_("Error expanding '%s%%%s'") % (key, format)) lm = map.copy() for i in v: