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

Yuya Nishihara yuya at tcha.org
Wed May 9 09:33:02 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at 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.

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):


More information about the Mercurial-devel mailing list