remove: migrate `opts` to native kwargs
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 20 Aug 2023 01:53:47 -0400
changeset 50846 1d9ba5b40093
parent 50845 e674941ad4eb
child 50847 6720894996f2
remove: migrate `opts` to native kwargs
mercurial/commands.py
--- a/mercurial/commands.py	Sun Aug 20 01:51:52 2023 -0400
+++ b/mercurial/commands.py	Sun Aug 20 01:53:47 2023 -0400
@@ -5973,15 +5973,14 @@
     Returns 0 on success, 1 if any warnings encountered.
     """
 
-    opts = pycompat.byteskwargs(opts)
-    after, force = opts.get(b'after'), opts.get(b'force')
-    dryrun = opts.get(b'dry_run')
+    after, force = opts.get('after'), opts.get('force')
+    dryrun = opts.get('dry_run')
     if not pats and not after:
         raise error.InputError(_(b'no files specified'))
 
     with repo.wlock(), repo.dirstate.changing_files(repo):
-        m = scmutil.match(repo[None], pats, opts)
-        subrepos = opts.get(b'subrepos')
+        m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts))
+        subrepos = opts.get('subrepos')
         uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
         return cmdutil.remove(
             ui, repo, m, b"", uipathfn, after, force, subrepos, dryrun=dryrun