Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 50860:f7cfac1260be
forget: migrate `opts` to native kwargs
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 20 Aug 2023 01:17:45 -0400 |
parents | 04a4f10089f1 |
children | 07c6a085fad7 |
comparison
equal
deleted
inserted
replaced
50859:04a4f10089f1 | 50860:f7cfac1260be |
---|---|
2971 hg forget "set:hgignore()" | 2971 hg forget "set:hgignore()" |
2972 | 2972 |
2973 Returns 0 on success. | 2973 Returns 0 on success. |
2974 """ | 2974 """ |
2975 | 2975 |
2976 opts = pycompat.byteskwargs(opts) | |
2977 if not pats: | 2976 if not pats: |
2978 raise error.InputError(_(b'no files specified')) | 2977 raise error.InputError(_(b'no files specified')) |
2979 | 2978 |
2980 with repo.wlock(), repo.dirstate.changing_files(repo): | 2979 with repo.wlock(), repo.dirstate.changing_files(repo): |
2981 m = scmutil.match(repo[None], pats, opts) | 2980 m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts)) |
2982 dryrun, interactive = opts.get(b'dry_run'), opts.get(b'interactive') | 2981 dryrun, interactive = opts.get('dry_run'), opts.get('interactive') |
2983 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | 2982 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) |
2984 rejected = cmdutil.forget( | 2983 rejected = cmdutil.forget( |
2985 ui, | 2984 ui, |
2986 repo, | 2985 repo, |
2987 m, | 2986 m, |