changeset 50972:a4d21089bec7

debugwireargs: migrate `opts` to native kwargs
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 21 Aug 2023 17:54:01 -0400
parents e032f47f5166
children fd6c748eb8a6
files mercurial/debugcommands.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)