Mercurial > hg
changeset 42156:496ac8a02380
verify: introduce an experimental --full flag
The flag currently has no effect, see next changeset for details. We introduce
the flag as experimental to keep the freedom of changing our mind on the final
UI.
Note: this patch highlight a small but in `hg help`. An option section is
generated even if no option are visible.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 17 Apr 2019 01:11:09 +0200 |
parents | 57539e5ea2e0 |
children | 7755b89cadaf |
files | mercurial/commands.py mercurial/verify.py tests/test-completion.t tests/test-help.t |
diffstat | 4 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Apr 17 01:12:21 2019 +0200 +++ b/mercurial/commands.py Wed Apr 17 01:11:09 2019 +0200 @@ -63,6 +63,7 @@ tags as tagsmod, ui as uimod, util, + verify as verifymod, wireprotoserver, ) from .utils import ( @@ -6147,8 +6148,10 @@ ui.warn("(%s)\n" % obsfatemsg) return ret -@command('verify', [], helpcategory=command.CATEGORY_MAINTENANCE) -def verify(ui, repo): +@command('verify', + [('', 'full', False, 'perform more checks (EXPERIMENTAL)')], + helpcategory=command.CATEGORY_MAINTENANCE) +def verify(ui, repo, **opts): """verify the integrity of the repository Verify the integrity of the current repository. @@ -6164,7 +6167,10 @@ Returns 0 on success, 1 if errors are encountered. """ - return hg.verify(repo) + level = None + if opts['full']: + level = verifymod.VERIFY_FULL + return hg.verify(repo, level) @command( 'version', [] + formatteropts, helpcategory=command.CATEGORY_HELP,
--- a/mercurial/verify.py Wed Apr 17 01:12:21 2019 +0200 +++ b/mercurial/verify.py Wed Apr 17 01:11:09 2019 +0200 @@ -23,6 +23,7 @@ ) VERIFY_DEFAULT = 0 +VERIFY_FULL = 1 def verify(repo, level=None): with repo.lock():