fastexport: migrate `opts` to native kwargs
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 20 Aug 2023 16:06:08 -0400
changeset 50898 00081fa564ed
parent 50897 f12d53a6e8b8
child 50899 eeffc9687c9a
fastexport: migrate `opts` to native kwargs
hgext/fastexport.py
--- a/hgext/fastexport.py	Mon Aug 21 09:50:31 2023 -0400
+++ b/hgext/fastexport.py	Sun Aug 20 16:06:08 2023 -0400
@@ -15,7 +15,6 @@
 from mercurial import (
     error,
     logcmdutil,
-    pycompat,
     registrar,
     scmutil,
 )
@@ -176,22 +175,20 @@
     It can be piped into corresponding import routines like "git fast-import".
     Incremental dumps can be created by using marks files.
     """
-    opts = pycompat.byteskwargs(opts)
-
-    revs += tuple(opts.get(b"rev", []))
+    revs += tuple(opts.get("rev", []))
     if not revs:
         revs = scmutil.revrange(repo, [b":"])
     else:
         revs = logcmdutil.revrange(repo, revs)
     if not revs:
         raise error.Abort(_(b"no revisions matched"))
-    authorfile = opts.get(b"authormap")
+    authorfile = opts.get("authormap")
     if authorfile:
         authormap = convcmd.readauthormap(ui, authorfile)
     else:
         authormap = {}
 
-    import_marks = opts.get(b"import_marks")
+    import_marks = opts.get("import_marks")
     marks = {}
     if import_marks:
         with open(import_marks, "rb") as import_marks_file:
@@ -209,7 +206,7 @@
             export_commit(ui, repo, rev, marks, authormap)
             progress.increment()
 
-    export_marks = opts.get(b"export_marks")
+    export_marks = opts.get("export_marks")
     if export_marks:
         with open(export_marks, "wb") as export_marks_file:
             output_marks = [None] * len(marks)