2749 repo.updatecaches(full=True) |
2749 repo.updatecaches(full=True) |
2750 |
2750 |
2751 @command('debugupgraderepo', [ |
2751 @command('debugupgraderepo', [ |
2752 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), |
2752 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), |
2753 ('', 'run', False, _('performs an upgrade')), |
2753 ('', 'run', False, _('performs an upgrade')), |
|
2754 ('', 'backup', True, _('keep the old repository content around')), |
2754 ]) |
2755 ]) |
2755 def debugupgraderepo(ui, repo, run=False, optimize=None): |
2756 def debugupgraderepo(ui, repo, run=False, optimize=None, backup=True): |
2756 """upgrade a repository to use different features |
2757 """upgrade a repository to use different features |
2757 |
2758 |
2758 If no arguments are specified, the repository is evaluated for upgrade |
2759 If no arguments are specified, the repository is evaluated for upgrade |
2759 and a list of problems and potential optimizations is printed. |
2760 and a list of problems and potential optimizations is printed. |
2760 |
2761 |
2769 repository data is swapped in. This window will be as long as it takes to |
2770 repository data is swapped in. This window will be as long as it takes to |
2770 rename some directories inside the ``.hg`` directory. On most machines, this |
2771 rename some directories inside the ``.hg`` directory. On most machines, this |
2771 should complete almost instantaneously and the chances of a consumer being |
2772 should complete almost instantaneously and the chances of a consumer being |
2772 unable to access the repository should be low. |
2773 unable to access the repository should be low. |
2773 """ |
2774 """ |
2774 return upgrade.upgraderepo(ui, repo, run=run, optimize=optimize) |
2775 return upgrade.upgraderepo(ui, repo, run=run, optimize=optimize, |
|
2776 backup=backup) |
2775 |
2777 |
2776 @command('debugwalk', cmdutil.walkopts, _('[OPTION]... [FILE]...'), |
2778 @command('debugwalk', cmdutil.walkopts, _('[OPTION]... [FILE]...'), |
2777 inferrepo=True) |
2779 inferrepo=True) |
2778 def debugwalk(ui, repo, *pats, **opts): |
2780 def debugwalk(ui, repo, *pats, **opts): |
2779 """show how files match on given patterns""" |
2781 """show how files match on given patterns""" |