bundlerepo: remove a variable alias
authorMartin von Zweigbergk <martinvonz@google.com>
Sat, 15 Sep 2018 22:56:57 -0700
changeset 39944 75b53b809e87
parent 39943 a6f8ab537908
child 39945 85c8ff26d698
bundlerepo: remove a variable alias "parentrepo" and "repo" were the same thing and I don't see much reason for it (unionrepo has similar structure and a similar alias but there are two repos there so at least it makes a little more sense there). Differential Revision: https://phab.mercurial-scm.org/D4830
mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Mon Oct 01 16:11:48 2018 -0400
+++ b/mercurial/bundlerepo.py	Sat Sep 15 22:56:57 2018 -0700
@@ -498,20 +498,19 @@
     # to this new type and initialize the bundle-specific bits of it.
 
     try:
-        parentrepo = localrepo.instance(ui, repopath, create=False)
+        repo = localrepo.instance(ui, repopath, create=False)
         tempparent = None
     except error.RepoError:
         tempparent = pycompat.mkdtemp()
         try:
-            parentrepo = localrepo.instance(ui, tempparent, create=True)
+            repo = localrepo.instance(ui, tempparent, create=True)
         except Exception:
             shutil.rmtree(tempparent)
             raise
 
-    class derivedbundlerepository(bundlerepository, parentrepo.__class__):
+    class derivedbundlerepository(bundlerepository, repo.__class__):
         pass
 
-    repo = parentrepo
     repo.__class__ = derivedbundlerepository
     bundlerepository.__init__(repo, bundlepath, url, tempparent)