Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/webutil.py @ 37910:ec03f3aa2d14
hgweb: drop useless **args from webutil.showtag() and showbookmark()
Callers never pass excessive arguments to these functions.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 02 Apr 2018 00:29:31 +0900 |
parents | 7fae76c2c564 |
children | 26aed0d561e8 |
comparison
equal
deleted
inserted
replaced
37909:7fae76c2c564 | 37910:ec03f3aa2d14 |
---|---|
272 branch = ctx.branch() | 272 branch = ctx.branch() |
273 if branch != 'default': | 273 if branch != 'default': |
274 branches.append(branch) | 274 branches.append(branch) |
275 return templateutil.hybridlist(branches, name='name') | 275 return templateutil.hybridlist(branches, name='name') |
276 | 276 |
277 def showtag(repo, tmpl, t1, node=nullid, **args): | 277 def showtag(repo, tmpl, t1, node=nullid): |
278 args = pycompat.byteskwargs(args) | |
279 for t in repo.nodetags(node): | 278 for t in repo.nodetags(node): |
280 lm = args.copy() | 279 lm = {'tag': t} |
281 lm['tag'] = t | |
282 yield tmpl.generate(t1, lm) | 280 yield tmpl.generate(t1, lm) |
283 | 281 |
284 def showbookmark(repo, tmpl, t1, node=nullid, **args): | 282 def showbookmark(repo, tmpl, t1, node=nullid): |
285 args = pycompat.byteskwargs(args) | |
286 for t in repo.nodebookmarks(node): | 283 for t in repo.nodebookmarks(node): |
287 lm = args.copy() | 284 lm = {'bookmark': t} |
288 lm['bookmark'] = t | |
289 yield tmpl.generate(t1, lm) | 285 yield tmpl.generate(t1, lm) |
290 | 286 |
291 def branchentries(repo, stripecount, limit=0): | 287 def branchentries(repo, stripecount, limit=0): |
292 tips = [] | 288 tips = [] |
293 heads = repo.heads() | 289 heads = repo.heads() |