Mercurial > hg
changeset 31893:165428b05fca
upgrade: import 'localrepo' globally
The in-function imports mention a cycle that seems to no longer be relevant. As
a result, we just import it globally.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 11 Apr 2017 22:01:13 +0200 |
parents | 9e67ce5c4fd0 |
children | 9379689b6c10 |
files | mercurial/upgrade.py |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/upgrade.py Tue Apr 11 20:54:50 2017 -0400 +++ b/mercurial/upgrade.py Tue Apr 11 22:01:13 2017 +0200 @@ -15,6 +15,7 @@ from . import ( changelog, error, + localrepo, manifest, revlog, scmutil, @@ -144,9 +145,6 @@ Returns a list of ``upgradeimprovement`` describing repository deficiencies and optimizations. """ - # Avoid cycle: cmdutil -> repair -> localrepo -> cmdutil - from . import localrepo - newreporeqs = localrepo.newreporequirements(repo) improvements = [] @@ -585,9 +583,6 @@ def upgraderepo(ui, repo, run=False, optimize=None): """Upgrade a repository in place.""" - # Avoid cycle: cmdutil -> repair -> localrepo -> cmdutil - from . import localrepo - optimize = set(optimize or []) repo = repo.unfiltered()