comparison mercurial/debugcommands.py @ 46012:7c539f0febbe

upgrade: add an explicite --filelogs arguments This make it possible to select no revlog for upgrade, which is useful for some upgrade target or in some specific cases (eg: persistent-nodemap or share-safe update). Differential Revision: https://phab.mercurial-scm.org/D9468
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 30 Nov 2020 14:06:45 +0100
parents 89a2afe31e82
children 2cf61e66c6d0
comparison
equal deleted inserted replaced
46011:904647f7d983 46012:7c539f0febbe
3836 ), 3836 ),
3837 (b'', b'run', False, _(b'performs an upgrade')), 3837 (b'', b'run', False, _(b'performs an upgrade')),
3838 (b'', b'backup', True, _(b'keep the old repository content around')), 3838 (b'', b'backup', True, _(b'keep the old repository content around')),
3839 (b'', b'changelog', None, _(b'select the changelog for upgrade')), 3839 (b'', b'changelog', None, _(b'select the changelog for upgrade')),
3840 (b'', b'manifest', None, _(b'select the manifest for upgrade')), 3840 (b'', b'manifest', None, _(b'select the manifest for upgrade')),
3841 (b'', b'filelogs', None, _(b'select all filelogs for upgrade')),
3841 ], 3842 ],
3842 ) 3843 )
3843 def debugupgraderepo(ui, repo, run=False, optimize=None, backup=True, **opts): 3844 def debugupgraderepo(ui, repo, run=False, optimize=None, backup=True, **opts):
3844 """upgrade a repository to use different features 3845 """upgrade a repository to use different features
3845 3846
3864 3865
3865 * `--manifest`: only optimize the manifest 3866 * `--manifest`: only optimize the manifest
3866 * `--no-manifest`: optimize all revlog but the manifest 3867 * `--no-manifest`: optimize all revlog but the manifest
3867 * `--changelog`: optimize the changelog only 3868 * `--changelog`: optimize the changelog only
3868 * `--no-changelog --no-manifest`: optimize filelogs only 3869 * `--no-changelog --no-manifest`: optimize filelogs only
3870 * `--filelogs`: optimize the filelogs only
3871 * `--no-changelog --no-manifest --no-filelogs`: skip all filelog optimisation
3869 """ 3872 """
3870 return upgrade.upgraderepo( 3873 return upgrade.upgraderepo(
3871 ui, repo, run=run, optimize=optimize, backup=backup, **opts 3874 ui, repo, run=run, optimize=optimize, backup=backup, **opts
3872 ) 3875 )
3873 3876