##// END OF EJS Templates
debugdata: migrate `opts` to native kwargs
Matt Harbison -
r51839:4135e727 default
parent child Browse files
Show More
@@ -709,8 +709,7 b' def debugdag(ui, repo, file_=None, *revs'
709 @command(b'debugdata', cmdutil.debugrevlogopts, _(b'-c|-m|FILE REV'))
709 @command(b'debugdata', cmdutil.debugrevlogopts, _(b'-c|-m|FILE REV'))
710 def debugdata(ui, repo, file_, rev=None, **opts):
710 def debugdata(ui, repo, file_, rev=None, **opts):
711 """dump the contents of a data file revision"""
711 """dump the contents of a data file revision"""
712 opts = pycompat.byteskwargs(opts)
712 if opts.get('changelog') or opts.get('manifest') or opts.get('dir'):
713 if opts.get(b'changelog') or opts.get(b'manifest') or opts.get(b'dir'):
714 if rev is not None:
713 if rev is not None:
715 raise error.InputError(
714 raise error.InputError(
716 _(b'cannot specify a revision with other arguments')
715 _(b'cannot specify a revision with other arguments')
@@ -718,7 +717,9 b' def debugdata(ui, repo, file_, rev=None,'
718 file_, rev = None, file_
717 file_, rev = None, file_
719 elif rev is None:
718 elif rev is None:
720 raise error.InputError(_(b'please specify a revision'))
719 raise error.InputError(_(b'please specify a revision'))
721 r = cmdutil.openstorage(repo, b'debugdata', file_, opts)
720 r = cmdutil.openstorage(
721 repo, b'debugdata', file_, pycompat.byteskwargs(opts)
722 )
722 try:
723 try:
723 ui.write(r.rawdata(r.lookup(rev)))
724 ui.write(r.rawdata(r.lookup(rev)))
724 except KeyError:
725 except KeyError:
General Comments 0
You need to be logged in to leave comments. Login now