debugwireargs: migrate `opts` to native kwargs
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 21 Aug 2023 17:54:01 -0400
changeset 50972 a4d21089bec7
parent 50971 e032f47f5166
child 50973 fd6c748eb8a6
debugwireargs: migrate `opts` to native kwargs
mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Mon Aug 21 17:49:57 2023 -0400
+++ b/mercurial/debugcommands.py	Mon Aug 21 17:54:01 2023 -0400
@@ -4219,16 +4219,15 @@
     norepo=True,
 )
 def debugwireargs(ui, repopath, *vals, **opts):
-    opts = pycompat.byteskwargs(opts)
-    repo = hg.peer(ui, opts, repopath)
+    repo = hg.peer(ui, pycompat.byteskwargs(opts), repopath)
     try:
         for opt in cmdutil.remoteopts:
-            del opts[opt[1]]
+            del opts[pycompat.sysstr(opt[1])]
         args = {}
         for k, v in opts.items():
             if v:
                 args[k] = v
-        args = pycompat.strkwargs(args)
+
         # run twice to check that we don't mess up the stream for the next command
         res1 = repo.debugwireargs(*vals, **args)
         res2 = repo.debugwireargs(*vals, **args)