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.
--- 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