Patchwork bundlerepo: remove unused 'repo' parameter

login
register
mail settings
Submitter Martin von Zweigbergk
Date May 4, 2015, 6:36 p.m.
Message ID <7c3331ff3474aa99d0ad.1430764619@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8870/
State Accepted
Headers show

Comments

Martin von Zweigbergk - May 4, 2015, 6:36 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1430687912 25200
#      Sun May 03 14:18:32 2015 -0700
# Node ID 7c3331ff3474aa99d0ad295d2d5f23a3afa0ed2d
# Parent  e5b507efb36e2b9ad8edb1a38459d26c934d74dd
bundlerepo: remove unused 'repo' parameter

Revision 7c231754a621 (filelog: add file function to open other
filelogs, 2011-05-10) added a _file() method to revlog, which also
required a 'repo' parameter to be added to bundlefilelog's
constructor. The _file() method was then removed in b95a5bb58653
(filelog: remove unused _file method, 2015-01-22), which made the
constructor parameter unused, so let's remove that too.
Matt Mackall - May 4, 2015, 8:34 p.m.
On Mon, 2015-05-04 at 11:36 -0700, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1430687912 25200
> #      Sun May 03 14:18:32 2015 -0700
> # Node ID 7c3331ff3474aa99d0ad295d2d5f23a3afa0ed2d
> # Parent  e5b507efb36e2b9ad8edb1a38459d26c934d74dd
> bundlerepo: remove unused 'repo' parameter

Queued for default, thanks.

Patch

diff -r e5b507efb36e -r 7c3331ff3474 mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Mon May 04 13:15:15 2015 -0500
+++ b/mercurial/bundlerepo.py	Sun May 03 14:18:32 2015 -0700
@@ -177,11 +177,10 @@ 
         return manifest.manifest.revision(self, nodeorrev)
 
 class bundlefilelog(bundlerevlog, filelog.filelog):
-    def __init__(self, opener, path, bundle, linkmapper, repo):
+    def __init__(self, opener, path, bundle, linkmapper):
         filelog.filelog.__init__(self, opener, path)
         bundlerevlog.__init__(self, opener, self.indexfile, bundle,
                               linkmapper)
-        self._repo = repo
 
     def baserevision(self, nodeorrev):
         return filelog.filelog.revision(self, nodeorrev)
@@ -322,8 +321,7 @@ 
 
         if f in self.bundlefilespos:
             self.bundle.seek(self.bundlefilespos[f])
-            return bundlefilelog(self.svfs, f, self.bundle,
-                                 self.changelog.rev, self)
+            return bundlefilelog(self.svfs, f, self.bundle, self.changelog.rev)
         else:
             return filelog.filelog(self.svfs, f)