# HG changeset patch # User Matt Harbison # Date 1692561968 14400 # Node ID 00081fa564ed9120699158a55514f02d790b9dd9 # Parent f12d53a6e8b89f4afe8114d1c8d66ef904569aa1 fastexport: migrate `opts` to native kwargs diff -r f12d53a6e8b8 -r 00081fa564ed 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)