##// END OF EJS Templates
hgweb: drop tmpl argument from webutil.showtag() and showbookmark()...
Yuya Nishihara -
r37931:16c7a6ac default
parent child Browse files
Show More
@@ -295,7 +295,7 b' def _search(web):'
295 for ctx in searchfunc[0](funcarg):
295 for ctx in searchfunc[0](funcarg):
296 count += 1
296 count += 1
297 n = ctx.node()
297 n = ctx.node()
298 showtags = webutil.showtag(web.repo, web.tmpl, 'changelogtag', n)
298 showtags = webutil.showtag(web.repo, 'changelogtag', n)
299 files = webutil.listfilediffs(web.tmpl, ctx.files(), n,
299 files = webutil.listfilediffs(web.tmpl, ctx.files(), n,
300 web.maxfiles)
300 web.maxfiles)
301
301
@@ -278,11 +278,11 b' def _nodenamesgen(context, f, node, name'
278 for t in f(node):
278 for t in f(node):
279 yield {name: t}
279 yield {name: t}
280
280
281 def showtag(repo, tmpl, t1, node=nullid):
281 def showtag(repo, t1, node=nullid):
282 args = (repo.nodetags, node, 'tag')
282 args = (repo.nodetags, node, 'tag')
283 return templateutil.mappinggenerator(_nodenamesgen, args=args, name=t1)
283 return templateutil.mappinggenerator(_nodenamesgen, args=args, name=t1)
284
284
285 def showbookmark(repo, tmpl, t1, node=nullid):
285 def showbookmark(repo, t1, node=nullid):
286 args = (repo.nodebookmarks, node, 'bookmark')
286 args = (repo.nodebookmarks, node, 'bookmark')
287 return templateutil.mappinggenerator(_nodenamesgen, args=args, name=t1)
287 return templateutil.mappinggenerator(_nodenamesgen, args=args, name=t1)
288
288
@@ -437,7 +437,7 b' def changelistentry(web, ctx):'
437 repo = web.repo
437 repo = web.repo
438 rev = ctx.rev()
438 rev = ctx.rev()
439 n = ctx.node()
439 n = ctx.node()
440 showtags = showtag(repo, web.tmpl, 'changelogtag', n)
440 showtags = showtag(repo, 'changelogtag', n)
441 files = listfilediffs(web.tmpl, ctx.files(), n, web.maxfiles)
441 files = listfilediffs(web.tmpl, ctx.files(), n, web.maxfiles)
442
442
443 entry = commonentry(repo, ctx)
443 entry = commonentry(repo, ctx)
@@ -459,9 +459,8 b' def symrevorshortnode(req, ctx):'
459 def changesetentry(web, ctx):
459 def changesetentry(web, ctx):
460 '''Obtain a dictionary to be used to render the "changeset" template.'''
460 '''Obtain a dictionary to be used to render the "changeset" template.'''
461
461
462 showtags = showtag(web.repo, web.tmpl, 'changesettag', ctx.node())
462 showtags = showtag(web.repo, 'changesettag', ctx.node())
463 showbookmarks = showbookmark(web.repo, web.tmpl, 'changesetbookmark',
463 showbookmarks = showbookmark(web.repo, 'changesetbookmark', ctx.node())
464 ctx.node())
465 showbranch = nodebranchnodefault(ctx)
464 showbranch = nodebranchnodefault(ctx)
466
465
467 files = []
466 files = []
General Comments 0
You need to be logged in to leave comments. Login now