diff mercurial/debugcommands.py @ 41089:a59a74721c76

debugupgraderepo: add a --no-backup mode The process has been around for a while and is pretty safe now. Having an automated way to clean up the old data is useful when running many different conversion to compare delta algorithm.
author Boris Feld <boris.feld@octobus.net>
date Fri, 21 Dec 2018 13:17:58 +0100
parents 24cb8a6d4c20
children 876494fd967d
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Fri Jul 13 03:05:30 2018 +0200
+++ b/mercurial/debugcommands.py	Fri Dec 21 13:17:58 2018 +0100
@@ -2751,8 +2751,9 @@
 @command('debugupgraderepo', [
     ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')),
     ('', 'run', False, _('performs an upgrade')),
+    ('', 'backup', True, _('keep the old repository content around')),
 ])
-def debugupgraderepo(ui, repo, run=False, optimize=None):
+def debugupgraderepo(ui, repo, run=False, optimize=None, backup=True):
     """upgrade a repository to use different features
 
     If no arguments are specified, the repository is evaluated for upgrade
@@ -2771,7 +2772,8 @@
     should complete almost instantaneously and the chances of a consumer being
     unable to access the repository should be low.
     """
-    return upgrade.upgraderepo(ui, repo, run=run, optimize=optimize)
+    return upgrade.upgraderepo(ui, repo, run=run, optimize=optimize,
+                               backup=backup)
 
 @command('debugwalk', cmdutil.walkopts, _('[OPTION]... [FILE]...'),
          inferrepo=True)