changeset 50846:1d9ba5b40093

remove: migrate `opts` to native kwargs
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 20 Aug 2023 01:53:47 -0400
parents e674941ad4eb
children 6720894996f2
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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