From patchwork Thu May 10 14:16:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [6,of,6] hgweb: remove unused argument 'tmpl' from listfilediffs() From: Yuya Nishihara X-Patchwork-Id: 31463 Message-Id: <743ff7bdbb3c9c7279ee.1525961771@mimosa> To: mercurial-devel@mercurial-scm.org Date: Thu, 10 May 2018 23:16:11 +0900 # HG changeset patch # User Yuya Nishihara # Date 1522766095 -32400 # Tue Apr 03 23:34:55 2018 +0900 # Node ID 743ff7bdbb3c9c7279ee6eb379107757cff48b72 # Parent 9c179b856572b90bb7f6db3131ba1b1f607c2f68 hgweb: remove unused argument 'tmpl' from listfilediffs() diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -296,8 +296,7 @@ def _search(web): count += 1 n = ctx.node() showtags = webutil.showtag(web.repo, 'changelogtag', n) - files = webutil.listfilediffs(web.tmpl, ctx.files(), n, - web.maxfiles) + files = webutil.listfilediffs(ctx.files(), n, web.maxfiles) lm = webutil.commonentry(web.repo, ctx) lm.update({ diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -445,7 +445,7 @@ def changelistentry(web, ctx): rev = ctx.rev() n = ctx.node() showtags = showtag(repo, 'changelogtag', n) - files = listfilediffs(web.tmpl, ctx.files(), n, web.maxfiles) + files = listfilediffs(ctx.files(), n, web.maxfiles) entry = commonentry(repo, ctx) entry.update( @@ -515,7 +515,7 @@ def _listfilediffsgen(context, files, no if len(files) > max: yield context.process('fileellipses', {}) -def listfilediffs(tmpl, files, node, max): +def listfilediffs(files, node, max): return templateutil.mappedgenerator(_listfilediffsgen, args=(files, node, max))