Patchwork [1,of,6] changegroup: removed unused 'source' parameter from prune()

login
register
mail settings
Submitter Martin von Zweigbergk
Date May 1, 2015, 10:50 p.m.
Message ID <667a008d51ba2429f9b1.1430520639@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8827/
State Accepted
Headers show

Comments

Martin von Zweigbergk - May 1, 2015, 10:50 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1430253600 25200
#      Tue Apr 28 13:40:00 2015 -0700
# Node ID 667a008d51ba2429f9b14618887ffe9e8cce6376
# Parent  7e67ddd08a2ed8a4f00f24cc56fd66749cc157a5
changegroup: removed unused 'source' parameter from prune()

The parameter has been unused since it was introduced in 6ea1f858efd9
(bundle: refactor changegroup prune to be its own function,
2013-05-30), and Durham says it is not used by his extension either.

Patch

diff -r 7e67ddd08a2e -r 667a008d51ba mercurial/changegroup.py
--- a/mercurial/changegroup.py	Fri May 01 17:21:10 2015 -0500
+++ b/mercurial/changegroup.py	Tue Apr 28 13:40:00 2015 -0700
@@ -350,7 +350,7 @@ 
         yield self.close()
 
     # filter any nodes that claim to be part of the known set
-    def prune(self, revlog, missing, commonrevs, source):
+    def prune(self, revlog, missing, commonrevs):
         rr, rl = revlog.rev, revlog.linkrev
         return [n for n in missing if rl(rr(n)) not in commonrevs]
 
@@ -407,7 +407,7 @@ 
                             fclnodes[n] = clnode
             return clnode
 
-        mfnodes = self.prune(mf, mfs, commonrevs, source)
+        mfnodes = self.prune(mf, mfs, commonrevs)
         size = 0
         for chunk in self.group(mfnodes, mf, lookupmf, units=_('manifests'),
                                 reorder=reorder):
@@ -460,7 +460,7 @@ 
             def lookupfilelog(x):
                 return linkrevnodes[x]
 
-            filenodes = self.prune(filerevlog, linkrevnodes, commonrevs, source)
+            filenodes = self.prune(filerevlog, linkrevnodes, commonrevs)
             if filenodes:
                 progress(msgbundling, i + 1, item=fname, unit=msgfiles,
                          total=total)