Mercurial > hg-stable
comparison mercurial/commands.py @ 50870:1d9ba5b40093
remove: migrate `opts` to native kwargs
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 20 Aug 2023 01:53:47 -0400 |
parents | e674941ad4eb |
children | 6720894996f2 |
comparison
equal
deleted
inserted
replaced
50869:e674941ad4eb | 50870:1d9ba5b40093 |
---|---|
5971 working directory, not even if ``--force`` is specified. | 5971 working directory, not even if ``--force`` is specified. |
5972 | 5972 |
5973 Returns 0 on success, 1 if any warnings encountered. | 5973 Returns 0 on success, 1 if any warnings encountered. |
5974 """ | 5974 """ |
5975 | 5975 |
5976 opts = pycompat.byteskwargs(opts) | 5976 after, force = opts.get('after'), opts.get('force') |
5977 after, force = opts.get(b'after'), opts.get(b'force') | 5977 dryrun = opts.get('dry_run') |
5978 dryrun = opts.get(b'dry_run') | |
5979 if not pats and not after: | 5978 if not pats and not after: |
5980 raise error.InputError(_(b'no files specified')) | 5979 raise error.InputError(_(b'no files specified')) |
5981 | 5980 |
5982 with repo.wlock(), repo.dirstate.changing_files(repo): | 5981 with repo.wlock(), repo.dirstate.changing_files(repo): |
5983 m = scmutil.match(repo[None], pats, opts) | 5982 m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts)) |
5984 subrepos = opts.get(b'subrepos') | 5983 subrepos = opts.get('subrepos') |
5985 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | 5984 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) |
5986 return cmdutil.remove( | 5985 return cmdutil.remove( |
5987 ui, repo, m, b"", uipathfn, after, force, subrepos, dryrun=dryrun | 5986 ui, repo, m, b"", uipathfn, after, force, subrepos, dryrun=dryrun |
5988 ) | 5987 ) |
5989 | 5988 |