mercurial/debugcommands.py
changeset 50965 56a966bc6b1a
parent 50964 8f25df137282
child 50966 98d1117dc904
equal deleted inserted replaced
50964:8f25df137282 50965:56a966bc6b1a
  3228     _(b'[-f FORMAT] -c|-m|FILE'),
  3228     _(b'[-f FORMAT] -c|-m|FILE'),
  3229     optionalrepo=True,
  3229     optionalrepo=True,
  3230 )
  3230 )
  3231 def debugrevlogindex(ui, repo, file_=None, **opts):
  3231 def debugrevlogindex(ui, repo, file_=None, **opts):
  3232     """dump the contents of a revlog index"""
  3232     """dump the contents of a revlog index"""
  3233     opts = pycompat.byteskwargs(opts)
  3233     r = cmdutil.openrevlog(
  3234     r = cmdutil.openrevlog(repo, b'debugrevlogindex', file_, opts)
  3234         repo, b'debugrevlogindex', file_, pycompat.byteskwargs(opts)
  3235     format = opts.get(b'format', 0)
  3235     )
       
  3236     format = opts.get('format', 0)
  3236     if format not in (0, 1):
  3237     if format not in (0, 1):
  3237         raise error.Abort(_(b"unknown format %d") % format)
  3238         raise error.Abort(_(b"unknown format %d") % format)
  3238 
  3239 
  3239     if ui.debugflag:
  3240     if ui.debugflag:
  3240         shortfn = hex
  3241         shortfn = hex