bundlerepo: rename arguments to bundlerepository.__init__
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 11 Nov 2017 18:05:02 -0800
changeset 35049 4696938d40f9
parent 35048 80e9b85d96e5
child 35050 d2458ba810c5
bundlerepo: rename arguments to bundlerepository.__init__ To reflect what they actually are. Differential Revision: https://phab.mercurial-scm.org/D1374
mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Sat Nov 11 17:07:33 2017 -0800
+++ b/mercurial/bundlerepo.py	Sat Nov 11 18:05:02 2017 -0800
@@ -256,24 +256,24 @@
     return bundlefilespos
 
 class bundlerepository(localrepo.localrepository):
-    def __init__(self, ui, path, bundlename):
+    def __init__(self, ui, repopath, bundlepath):
         self._tempparent = None
         try:
-            localrepo.localrepository.__init__(self, ui, path)
+            localrepo.localrepository.__init__(self, ui, repopath)
         except error.RepoError:
             self._tempparent = tempfile.mkdtemp()
             localrepo.instance(ui, self._tempparent, 1)
             localrepo.localrepository.__init__(self, ui, self._tempparent)
         self.ui.setconfig('phases', 'publish', False, 'bundlerepo')
 
-        if path:
-            self._url = 'bundle:' + util.expandpath(path) + '+' + bundlename
+        if repopath:
+            self._url = 'bundle:' + util.expandpath(repopath) + '+' + bundlepath
         else:
-            self._url = 'bundle:' + bundlename
+            self._url = 'bundle:' + bundlepath
 
         self.tempfile = None
-        f = util.posixfile(bundlename, "rb")
-        self.bundlefile = self.bundle = exchange.readbundle(ui, f, bundlename)
+        f = util.posixfile(bundlepath, "rb")
+        self.bundlefile = self.bundle = exchange.readbundle(ui, f, bundlepath)
 
         if isinstance(self.bundle, bundle2.unbundle20):
             hadchangegroup = False
@@ -293,7 +293,7 @@
             f = self._writetempbundle(self.bundle.read, '.hg10un',
                                       header='HG10UN')
             self.bundlefile = self.bundle = exchange.readbundle(ui, f,
-                                                                bundlename,
+                                                                bundlepath,
                                                                 self.vfs)
 
         # dict with the mapping 'filename' -> position in the bundle