mercurial/commands.py
changeset 42156 496ac8a02380
parent 42144 013de80bf90e
child 42187 90d48c1c6224
equal deleted inserted replaced
42155:57539e5ea2e0 42156:496ac8a02380
    61     state as statemod,
    61     state as statemod,
    62     streamclone,
    62     streamclone,
    63     tags as tagsmod,
    63     tags as tagsmod,
    64     ui as uimod,
    64     ui as uimod,
    65     util,
    65     util,
       
    66     verify as verifymod,
    66     wireprotoserver,
    67     wireprotoserver,
    67 )
    68 )
    68 from .utils import (
    69 from .utils import (
    69     dateutil,
    70     dateutil,
    70     stringutil,
    71     stringutil,
  6145             if ctx.obsolete():
  6146             if ctx.obsolete():
  6146                 obsfatemsg = obsutil._getfilteredreason(repo, ctxstr, ctx)
  6147                 obsfatemsg = obsutil._getfilteredreason(repo, ctxstr, ctx)
  6147                 ui.warn("(%s)\n" % obsfatemsg)
  6148                 ui.warn("(%s)\n" % obsfatemsg)
  6148         return ret
  6149         return ret
  6149 
  6150 
  6150 @command('verify', [], helpcategory=command.CATEGORY_MAINTENANCE)
  6151 @command('verify',
  6151 def verify(ui, repo):
  6152          [('', 'full', False, 'perform more checks (EXPERIMENTAL)')],
       
  6153          helpcategory=command.CATEGORY_MAINTENANCE)
       
  6154 def verify(ui, repo, **opts):
  6152     """verify the integrity of the repository
  6155     """verify the integrity of the repository
  6153 
  6156 
  6154     Verify the integrity of the current repository.
  6157     Verify the integrity of the current repository.
  6155 
  6158 
  6156     This will perform an extensive check of the repository's
  6159     This will perform an extensive check of the repository's
  6162     for more information about recovery from corruption of the
  6165     for more information about recovery from corruption of the
  6163     repository.
  6166     repository.
  6164 
  6167 
  6165     Returns 0 on success, 1 if errors are encountered.
  6168     Returns 0 on success, 1 if errors are encountered.
  6166     """
  6169     """
  6167     return hg.verify(repo)
  6170     level = None
       
  6171     if opts['full']:
       
  6172         level = verifymod.VERIFY_FULL
       
  6173     return hg.verify(repo, level)
  6168 
  6174 
  6169 @command(
  6175 @command(
  6170     'version', [] + formatteropts, helpcategory=command.CATEGORY_HELP,
  6176     'version', [] + formatteropts, helpcategory=command.CATEGORY_HELP,
  6171     norepo=True, intents={INTENT_READONLY})
  6177     norepo=True, intents={INTENT_READONLY})
  6172 def version_(ui, **opts):
  6178 def version_(ui, **opts):