changeset 50875:00081fa564ed

fastexport: migrate `opts` to native kwargs
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 20 Aug 2023 16:06:08 -0400
parents f12d53a6e8b8
children eeffc9687c9a
files hgext/fastexport.py
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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)