debuggetbundle: migrate `opts` to native kwargs
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 21 Aug 2023 17:15:30 -0400
changeset 50953 7825175d5ad5
parent 50952 45381a1dd367
child 50954 1cfc49e342c3
debuggetbundle: migrate `opts` to native kwargs
mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Mon Aug 21 17:14:18 2023 -0400
+++ b/mercurial/debugcommands.py	Mon Aug 21 17:15:30 2023 -0400
@@ -1820,8 +1820,7 @@
     Every ID must be a full-length hex node id string. Saves the bundle to the
     given file.
     """
-    opts = pycompat.byteskwargs(opts)
-    repo = hg.peer(ui, opts, repopath)
+    repo = hg.peer(ui, pycompat.byteskwargs(opts), repopath)
     if not repo.capable(b'getbundle'):
         raise error.Abort(b"getbundle() not supported by target repository")
     args = {}
@@ -1833,7 +1832,7 @@
     args['bundlecaps'] = None
     bundle = repo.getbundle(b'debug', **args)
 
-    bundletype = opts.get(b'type', b'bzip2').lower()
+    bundletype = opts.get('type', b'bzip2').lower()
     btypes = {
         b'none': b'HG10UN',
         b'bzip2': b'HG10BZ',