diff mercurial/debugcommands.py @ 31864:70d163b86316

upgrade: extract code in its own module Given about 2/3 or 'mercurial.repair' is now about repository upgrade, I think it is fair to move it into its own module. An expected benefit is the ability to drop the 'upgrade' prefix of many functions. This will be done in coming changesets.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 07 Apr 2017 18:53:17 +0200
parents 57a22f699179
children 85dc5a25f1fc
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Sun Apr 09 19:08:24 2017 +0200
+++ b/mercurial/debugcommands.py	Fri Apr 07 18:53:17 2017 +0200
@@ -62,6 +62,7 @@
     streamclone,
     templater,
     treediscovery,
+    upgrade,
     util,
     vfs as vfsmod,
 )
@@ -2072,7 +2073,7 @@
     should complete almost instantaneously and the chances of a consumer being
     unable to access the repository should be low.
     """
-    return repair.upgraderepo(ui, repo, run=run, optimize=optimize)
+    return upgrade.upgraderepo(ui, repo, run=run, optimize=optimize)
 
 @command('debugwalk', commands.walkopts, _('[OPTION]... [FILE]...'),
          inferrepo=True)