Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 42840:cf2b765cecd7
upgrade: add an argument to control manifest upgrade
The argument can be used to only "clone" manifest revlog or clone all of them
but this one. The selection will make more sense once we have a `--changelog`
flag in the next changesets.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 30 Jul 2019 00:35:52 +0200 |
parents | 127d57e950e0 |
children | 908ff446590e |
comparison
equal
deleted
inserted
replaced
42839:853f70137437 | 42840:cf2b765cecd7 |
---|---|
2846 | 2846 |
2847 @command('debugupgraderepo', [ | 2847 @command('debugupgraderepo', [ |
2848 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), | 2848 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), |
2849 ('', 'run', False, _('performs an upgrade')), | 2849 ('', 'run', False, _('performs an upgrade')), |
2850 ('', 'backup', True, _('keep the old repository content around')), | 2850 ('', 'backup', True, _('keep the old repository content around')), |
2851 ('', 'manifest', None, _('select the manifest for upgrade')), | |
2851 ]) | 2852 ]) |
2852 def debugupgraderepo(ui, repo, run=False, optimize=None, backup=True): | 2853 def debugupgraderepo(ui, repo, run=False, optimize=None, backup=True, **opts): |
2853 """upgrade a repository to use different features | 2854 """upgrade a repository to use different features |
2854 | 2855 |
2855 If no arguments are specified, the repository is evaluated for upgrade | 2856 If no arguments are specified, the repository is evaluated for upgrade |
2856 and a list of problems and potential optimizations is printed. | 2857 and a list of problems and potential optimizations is printed. |
2857 | 2858 |
2865 At the end of the upgrade, the repository may not be readable while new | 2866 At the end of the upgrade, the repository may not be readable while new |
2866 repository data is swapped in. This window will be as long as it takes to | 2867 repository data is swapped in. This window will be as long as it takes to |
2867 rename some directories inside the ``.hg`` directory. On most machines, this | 2868 rename some directories inside the ``.hg`` directory. On most machines, this |
2868 should complete almost instantaneously and the chances of a consumer being | 2869 should complete almost instantaneously and the chances of a consumer being |
2869 unable to access the repository should be low. | 2870 unable to access the repository should be low. |
2871 | |
2872 By default, all revlog will be upgraded. You can restrict this using flag | |
2873 such as `--manifest`: | |
2874 | |
2875 * `--manifest`: only optimize the manifest | |
2876 * `--no-manifest`: optimize all revlog but the manifest | |
2870 """ | 2877 """ |
2871 return upgrade.upgraderepo(ui, repo, run=run, optimize=optimize, | 2878 return upgrade.upgraderepo(ui, repo, run=run, optimize=optimize, |
2872 backup=backup) | 2879 backup=backup, **opts) |
2873 | 2880 |
2874 @command('debugwalk', cmdutil.walkopts, _('[OPTION]... [FILE]...'), | 2881 @command('debugwalk', cmdutil.walkopts, _('[OPTION]... [FILE]...'), |
2875 inferrepo=True) | 2882 inferrepo=True) |
2876 def debugwalk(ui, repo, *pats, **opts): | 2883 def debugwalk(ui, repo, *pats, **opts): |
2877 """show how files match on given patterns""" | 2884 """show how files match on given patterns""" |