debugsidedata: migrate `opts` to native kwargs
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 21 Aug 2023 17:43:52 -0400
changeset 50968 e6ae6573b400
parent 50967 36f116820853
child 50969 b28f794fe10a
debugsidedata: migrate `opts` to native kwargs
mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Mon Aug 21 17:41:01 2023 -0400
+++ b/mercurial/debugcommands.py	Mon Aug 21 17:43:52 2023 -0400
@@ -3551,8 +3551,7 @@
     """dump the side data for a cl/manifest/file revision
 
     Use --verbose to dump the sidedata content."""
-    opts = pycompat.byteskwargs(opts)
-    if opts.get(b'changelog') or opts.get(b'manifest') or opts.get(b'dir'):
+    if opts.get('changelog') or opts.get('manifest') or opts.get('dir'):
         if rev is not None:
             raise error.InputError(
                 _(b'cannot specify a revision with other arguments')
@@ -3560,7 +3559,9 @@
         file_, rev = None, file_
     elif rev is None:
         raise error.InputError(_(b'please specify a revision'))
-    r = cmdutil.openstorage(repo, b'debugdata', file_, opts)
+    r = cmdutil.openstorage(
+        repo, b'debugdata', file_, pycompat.byteskwargs(opts)
+    )
     r = getattr(r, '_revlog', r)
     try:
         sidedata = r.sidedata(r.lookup(rev))