comparison mercurial/debugcommands.py @ 50965:56a966bc6b1a

debugrevlogindex: migrate `opts` to native kwargs
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 21 Aug 2023 17:36:36 -0400
parents 8f25df137282
children 98d1117dc904
comparison
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