Patchwork [3,of,7] hgweb: drop unused argument 'tmpl' from webutil.diffstat()

login
register
mail settings
Submitter Yuya Nishihara
Date May 13, 2018, 3:20 a.m.
Message ID <94e0c9ba279d1269f9ed.1526181600@mimosa>
Download mbox | patch
Permalink /patch/31571/
State Accepted
Headers show

Comments

Yuya Nishihara - May 13, 2018, 3:20 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1522768912 -32400
#      Wed Apr 04 00:21:52 2018 +0900
# Node ID 94e0c9ba279d1269f9ed8c602a0e20d44dd59321
# Parent  672d62e1224e0bd7350a917d45e6a38e82adfc29
hgweb: drop unused argument 'tmpl' from webutil.diffstat()

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -493,7 +493,7 @@  def changesetentry(web, ctx):
 
     parity = paritygen(web.stripecount)
     diffstatsgen = diffstatgen(ctx, basectx)
-    diffstats = diffstat(web.tmpl, ctx, diffstatsgen, parity)
+    diffstats = diffstat(ctx, diffstatsgen, parity)
 
     return dict(
         diff=diff,
@@ -678,7 +678,7 @@  def _diffstattmplgen(context, ctx, statg
             'parity': next(parity),
         })
 
-def diffstat(tmpl, ctx, statgen, parity):
+def diffstat(ctx, statgen, parity):
     '''Return a diffstat template for each file in the diff.'''
     args = (ctx, statgen, parity)
     return templateutil.mappedgenerator(_diffstattmplgen, args=args)