# HG changeset patch # User Matt Harbison # Date 1692559498 14400 # Node ID 47af00b2217fbed471ce5a7ca4d3ae5f6cc60c76 # Parent e0cae2b441910021619d33a039b58721c42b7160 automv: migrate `opts` to native kwargs diff -r e0cae2b44191 -r 47af00b2217f hgext/automv.py --- a/hgext/automv.py Sun Aug 20 15:16:18 2023 -0400 +++ b/hgext/automv.py Sun Aug 20 15:24:58 2023 -0400 @@ -56,9 +56,8 @@ def mvcheck(orig, ui, repo, *pats, **opts): """Hook to check for moves at commit time""" - opts = pycompat.byteskwargs(opts) renames = None - disabled = opts.pop(b'no_automv', False) + disabled = opts.pop('no_automv', False) with repo.wlock(): if not disabled: threshold = ui.configint(b'automv', b'similarity') @@ -67,7 +66,9 @@ _(b'automv.similarity must be between 0 and 100') ) if threshold > 0: - match = scmutil.match(repo[None], pats, opts) + match = scmutil.match( + repo[None], pats, pycompat.byteskwargs(opts) + ) added, removed = _interestingfiles(repo, match) uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) renames = _findrenames( @@ -82,7 +83,7 @@ # current extension structure, and this is not worse than what # happened before. scmutil._markchanges(repo, (), (), renames) - return orig(ui, repo, *pats, **pycompat.strkwargs(opts)) + return orig(ui, repo, *pats, **opts) def _interestingfiles(repo, matcher):