changeset 50968:81801dc55819

debugmergestate: migrate `opts` to native kwargs
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 21 Aug 2023 17:23:16 -0400
parents 0cf89b099d42
children 55c28ffadb14
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: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')