mercurial/bundlerepo.py
changeset 39944 75b53b809e87
parent 39818 24e493ec2229
child 40052 55db747a21ad
--- 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)