Patchwork [1,of,7] hgweb: drop useless **args from webutil.showtag() and showbookmark()

login
register
mail settings
Submitter Yuya Nishihara
Date May 9, 2018, 1:33 p.m.
Message ID <7476d31f604a6ffa9867.1525872782@mimosa>
Download mbox | patch
Permalink /patch/31427/
State Accepted
Headers show

Comments

Yuya Nishihara - May 9, 2018, 1:33 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1522596571 -32400
#      Mon Apr 02 00:29:31 2018 +0900
# Node ID 7476d31f604a6ffa986725960bb34a85f1158f82
# Parent  7fae76c2c564d0dd969195b0bfa5d96d44f10907
hgweb: drop useless **args from webutil.showtag() and showbookmark()

Callers never pass excessive arguments to these functions.

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -274,18 +274,14 @@  def nodebranchnodefault(ctx):
         branches.append(branch)
     return templateutil.hybridlist(branches, name='name')
 
-def showtag(repo, tmpl, t1, node=nullid, **args):
-    args = pycompat.byteskwargs(args)
+def showtag(repo, tmpl, t1, node=nullid):
     for t in repo.nodetags(node):
-        lm = args.copy()
-        lm['tag'] = t
+        lm = {'tag': t}
         yield tmpl.generate(t1, lm)
 
-def showbookmark(repo, tmpl, t1, node=nullid, **args):
-    args = pycompat.byteskwargs(args)
+def showbookmark(repo, tmpl, t1, node=nullid):
     for t in repo.nodebookmarks(node):
-        lm = args.copy()
-        lm['bookmark'] = t
+        lm = {'bookmark': t}
         yield tmpl.generate(t1, lm)
 
 def branchentries(repo, stripecount, limit=0):