mercurial/commands.py
changeset 50845 e674941ad4eb
parent 50844 fb0f07c64304
child 50846 1d9ba5b40093
--- a/mercurial/commands.py	Sun Aug 20 01:49:48 2023 -0400
+++ b/mercurial/commands.py	Sun Aug 20 01:51:52 2023 -0400
@@ -5633,24 +5633,23 @@
     list of files that this program would delete, use the --print
     option.
     """
-    opts = pycompat.byteskwargs(opts)
-    cmdutil.check_at_most_one_arg(opts, b'all', b'ignored')
-
-    act = not opts.get(b'print')
+    cmdutil.check_at_most_one_arg(opts, 'all', 'ignored')
+
+    act = not opts.get('print')
     eol = b'\n'
-    if opts.get(b'print0'):
+    if opts.get('print0'):
         eol = b'\0'
         act = False  # --print0 implies --print
-    if opts.get(b'all', False):
+    if opts.get('all', False):
         ignored = True
         unknown = True
     else:
-        ignored = opts.get(b'ignored', False)
+        ignored = opts.get('ignored', False)
         unknown = not ignored
 
-    removefiles = opts.get(b'files')
-    removedirs = opts.get(b'dirs')
-    confirm = opts.get(b'confirm')
+    removefiles = opts.get('files')
+    removedirs = opts.get('dirs')
+    confirm = opts.get('confirm')
     if confirm is None:
         try:
             extensions.find(b'purge')
@@ -5662,7 +5661,7 @@
         removefiles = True
         removedirs = True
 
-    match = scmutil.match(repo[None], dirs, opts)
+    match = scmutil.match(repo[None], dirs, pycompat.byteskwargs(opts))
 
     paths = mergemod.purge(
         repo,
@@ -5671,7 +5670,7 @@
         ignored=ignored,
         removeemptydirs=removedirs,
         removefiles=removefiles,
-        abortonerror=opts.get(b'abort_on_err'),
+        abortonerror=opts.get('abort_on_err'),
         noop=not act,
         confirm=confirm,
     )