##// END OF EJS Templates
hgweb: use template context to render {files} of changelist entries...
Yuya Nishihara -
r37972:4237d07f default
parent child Browse files
Show More
@@ -509,15 +509,15 b' def changesetentry(web, ctx):'
509 archives=web.archivelist(ctx.hex()),
509 archives=web.archivelist(ctx.hex()),
510 **pycompat.strkwargs(commonentry(web.repo, ctx)))
510 **pycompat.strkwargs(commonentry(web.repo, ctx)))
511
511
512 def _listfilediffsgen(context, tmpl, files, node, max):
512 def _listfilediffsgen(context, files, node, max):
513 for f in files[:max]:
513 for f in files[:max]:
514 yield tmpl.generate('filedifflink', {'node': hex(node), 'file': f})
514 yield context.process('filedifflink', {'node': hex(node), 'file': f})
515 if len(files) > max:
515 if len(files) > max:
516 yield tmpl.generate('fileellipses', {})
516 yield context.process('fileellipses', {})
517
517
518 def listfilediffs(tmpl, files, node, max):
518 def listfilediffs(tmpl, files, node, max):
519 return templateutil.mappedgenerator(_listfilediffsgen,
519 return templateutil.mappedgenerator(_listfilediffsgen,
520 args=(tmpl, files, node, max))
520 args=(files, node, max))
521
521
522 def diffs(web, ctx, basectx, files, style, linerange=None,
522 def diffs(web, ctx, basectx, files, style, linerange=None,
523 lineidprefix=''):
523 lineidprefix=''):
General Comments 0
You need to be logged in to leave comments. Login now