Show More
@@ -85,7 +85,7 b' def _filerevision(web, tmpl, fctx):' | |||||
85 | branch=webutil.nodebranchnodefault(fctx), |
|
85 | branch=webutil.nodebranchnodefault(fctx), | |
86 | parent=webutil.siblings(fctx.parents()), |
|
86 | parent=webutil.siblings(fctx.parents()), | |
87 | child=webutil.siblings(fctx.children()), |
|
87 | child=webutil.siblings(fctx.children()), | |
88 |
rename=webutil.renamelink(f |
|
88 | rename=webutil.renamelink(fctx), | |
89 | permissions=fctx.manifest().flags(f)) |
|
89 | permissions=fctx.manifest().flags(f)) | |
90 |
|
90 | |||
91 | def file(web, req, tmpl): |
|
91 | def file(web, req, tmpl): | |
@@ -215,7 +215,7 b' def changelog(web, req, tmpl, shortlog =' | |||||
215 |
|
215 | |||
216 | return tmpl(shortlog and 'shortlog' or 'changelog', |
|
216 | return tmpl(shortlog and 'shortlog' or 'changelog', | |
217 | changenav=changenav, |
|
217 | changenav=changenav, | |
218 |
node=hex(c |
|
218 | node=hex(ctx.node()), | |
219 | rev=pos, changesets=count, |
|
219 | rev=pos, changesets=count, | |
220 | entries=lambda **x: changelist(limit=0,**x), |
|
220 | entries=lambda **x: changelist(limit=0,**x), | |
221 | latestentry=lambda **x: changelist(limit=1,**x), |
|
221 | latestentry=lambda **x: changelist(limit=1,**x), | |
@@ -435,6 +435,10 b' def filediff(web, req, tmpl):' | |||||
435 | file=path, |
|
435 | file=path, | |
436 | node=hex(n), |
|
436 | node=hex(n), | |
437 | rev=fctx.rev(), |
|
437 | rev=fctx.rev(), | |
|
438 | date=fctx.date(), | |||
|
439 | desc=fctx.description(), | |||
|
440 | author=fctx.user(), | |||
|
441 | rename=self.renamelink(fctx), | |||
438 | branch=webutil.nodebranchnodefault(fctx), |
|
442 | branch=webutil.nodebranchnodefault(fctx), | |
439 | parent=webutil.siblings(parents), |
|
443 | parent=webutil.siblings(parents), | |
440 | child=webutil.siblings(fctx.children()), |
|
444 | child=webutil.siblings(fctx.children()), | |
@@ -484,7 +488,7 b' def annotate(web, req, tmpl):' | |||||
484 | author=fctx.user(), |
|
488 | author=fctx.user(), | |
485 | date=fctx.date(), |
|
489 | date=fctx.date(), | |
486 | desc=fctx.description(), |
|
490 | desc=fctx.description(), | |
487 |
rename=webutil.renamelink(f |
|
491 | rename=webutil.renamelink(fctx), | |
488 | branch=webutil.nodebranchnodefault(fctx), |
|
492 | branch=webutil.nodebranchnodefault(fctx), | |
489 | parent=webutil.siblings(fctx.parents()), |
|
493 | parent=webutil.siblings(fctx.parents()), | |
490 | child=webutil.siblings(fctx.children()), |
|
494 | child=webutil.siblings(fctx.children()), | |
@@ -515,7 +519,7 b' def filelog(web, req, tmpl):' | |||||
515 | "node": hex(ctx.node()), |
|
519 | "node": hex(ctx.node()), | |
516 | "author": ctx.user(), |
|
520 | "author": ctx.user(), | |
517 | "date": ctx.date(), |
|
521 | "date": ctx.date(), | |
518 |
"rename": webutil.renamelink(f |
|
522 | "rename": webutil.renamelink(fctx), | |
519 | "parent": webutil.siblings(fctx.parents()), |
|
523 | "parent": webutil.siblings(fctx.parents()), | |
520 | "child": webutil.siblings(fctx.children()), |
|
524 | "child": webutil.siblings(fctx.children()), | |
521 | "desc": ctx.description()}) |
|
525 | "desc": ctx.description()}) |
@@ -70,8 +70,8 b' def siblings(siblings=[], hiderev=None, ' | |||||
70 | d.update(args) |
|
70 | d.update(args) | |
71 | yield d |
|
71 | yield d | |
72 |
|
72 | |||
73 |
def renamelink(f |
|
73 | def renamelink(fctx): | |
74 |
r = f |
|
74 | r = fctx.renamed(node) | |
75 | if r: |
|
75 | if r: | |
76 | return [dict(file=r[0], node=hex(r[1]))] |
|
76 | return [dict(file=r[0], node=hex(r[1]))] | |
77 | return [] |
|
77 | return [] |
@@ -114,7 +114,7 b' class templater(object):' | |||||
114 | v = v(**map) |
|
114 | v = v(**map) | |
115 | if format: |
|
115 | if format: | |
116 | if not hasattr(v, '__iter__'): |
|
116 | if not hasattr(v, '__iter__'): | |
117 | raise SyntaxError(_("Error expanding '%s%s'") |
|
117 | raise SyntaxError(_("Error expanding '%s%%%s'") | |
118 | % (key, format)) |
|
118 | % (key, format)) | |
119 | lm = map.copy() |
|
119 | lm = map.copy() | |
120 | for i in v: |
|
120 | for i in v: |
General Comments 0
You need to be logged in to leave comments.
Login now