debugmergestate: migrate `opts` to native kwargs
authorMatt Harbison <matt_harbison@yahoo.com>
Mon, 21 Aug 2023 17:23:16 -0400
changeset 50957 81801dc55819
parent 50956 0cf89b099d42
child 50958 55c28ffadb14
debugmergestate: migrate `opts` to native kwargs
mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Mon Aug 21 17:20:14 2023 -0400
+++ b/mercurial/debugcommands.py	Mon Aug 21 17:23:16 2023 -0400
@@ -2490,9 +2490,8 @@
         else:
             ui.writenoi18n(b'v1 and v2 states mismatch: using v1\n')
 
-    opts = pycompat.byteskwargs(opts)
-    if not opts[b'template']:
-        opts[b'template'] = (
+    if not opts['template']:
+        opts['template'] = (
             b'{if(commits, "", "no merge state found\n")}'
             b'{commits % "{name}{if(label, " ({label})")}: {node}\n"}'
             b'{files % "file: {path} (state \\"{state}\\")\n'
@@ -2512,7 +2511,7 @@
 
     ms = mergestatemod.mergestate.read(repo)
 
-    fm = ui.formatter(b'debugmergestate', opts)
+    fm = ui.formatter(b'debugmergestate', pycompat.byteskwargs(opts))
     fm.startitem()
 
     fm_commits = fm.nested(b'commits')