comparison mercurial/commands.py @ 50033:7e71d878c708

dirstate: use `dirstate.change_files` to scope the change in `remove` This is the way.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 13 Dec 2022 16:29:30 +0100
parents 06619266679d
children 5c9462adc4b9
comparison
equal deleted inserted replaced
50032:06619266679d 50033:7e71d878c708
5945 after, force = opts.get(b'after'), opts.get(b'force') 5945 after, force = opts.get(b'after'), opts.get(b'force')
5946 dryrun = opts.get(b'dry_run') 5946 dryrun = opts.get(b'dry_run')
5947 if not pats and not after: 5947 if not pats and not after:
5948 raise error.InputError(_(b'no files specified')) 5948 raise error.InputError(_(b'no files specified'))
5949 5949
5950 with repo.wlock(): 5950 with repo.wlock(), repo.dirstate.changing_files(repo):
5951 m = scmutil.match(repo[None], pats, opts) 5951 m = scmutil.match(repo[None], pats, opts)
5952 subrepos = opts.get(b'subrepos') 5952 subrepos = opts.get(b'subrepos')
5953 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) 5953 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
5954 return cmdutil.remove( 5954 return cmdutil.remove(
5955 ui, repo, m, b"", uipathfn, after, force, subrepos, dryrun=dryrun 5955 ui, repo, m, b"", uipathfn, after, force, subrepos, dryrun=dryrun