Patchwork [10,of,10] hgweb: drop unused argument 'tmpl' from webutil.compare()

login
register
mail settings
Submitter Yuya Nishihara
Date May 12, 2018, 3:35 a.m.
Message ID <d41d6392f2312cdfb720.1526096117@mimosa>
Download mbox | patch
Permalink /patch/31540/
State Accepted
Headers show

Comments

Yuya Nishihara - May 12, 2018, 3:35 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1522844275 -32400
#      Wed Apr 04 21:17:55 2018 +0900
# Node ID d41d6392f2312cdfb72085f312f4c39826741851
# Parent  c0f7a01a162982f383e69a69ecd2fd89b031d2cb
hgweb: drop unused argument 'tmpl' from webutil.compare()

Patch

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -886,7 +886,7 @@  def comparison(web):
         pfctx = ctx.parents()[0][path]
         leftlines = filelines(pfctx)
 
-    comparison = webutil.compare(web.tmpl, context, leftlines, rightlines)
+    comparison = webutil.compare(context, leftlines, rightlines)
     if fctx is not None:
         rename = webutil.renamelink(fctx)
         ctx = fctx
diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -633,7 +633,7 @@  def _comparegen(context, contextnum, lef
             l = _getcompblock(leftlines, rightlines, oc)
             yield {'lines': l}
 
-def compare(tmpl, contextnum, leftlines, rightlines):
+def compare(contextnum, leftlines, rightlines):
     args = (contextnum, leftlines, rightlines)
     return templateutil.mappinggenerator(_comparegen, args=args,
                                          name='comparisonblock')