upgrade: more standard creation of the temporary repository
authorBoris Feld <boris.feld@octobus.net>
Thu, 07 Dec 2017 18:56:10 +0100
changeset 35352 06987c6971be
parent 35351 75520786ad2f
child 35353 8f3f8b8dbab7
upgrade: more standard creation of the temporary repository By using the standard path to create a repository we fill some hole in the current initialization process. The one who triggered this changeset was the lack of extensions initialization.
mercurial/upgrade.py
--- a/mercurial/upgrade.py	Thu Dec 07 18:55:35 2017 +0100
+++ b/mercurial/upgrade.py	Thu Dec 07 18:56:10 2017 +0100
@@ -14,6 +14,7 @@
 from . import (
     changelog,
     error,
+    hg,
     localrepo,
     manifest,
     revlog,
@@ -841,9 +842,7 @@
             oldcopy = repo.ui.copy
             try:
                 repo.ui.__dict__.pop('copy', None)
-                dstrepo = localrepo.localrepository(repo.ui,
-                                                    path=tmppath,
-                                                    create=True)
+                dstrepo = hg.repository(repo.ui, path=tmppath, create=True)
             finally:
                 repo.ui.copy = oldcopy