Mercurial > hg
changeset 50030:5deac4eaa7d1
dirstate: use `dirstate.change_files` to scope the change in `add`
This is the way.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 13 Dec 2022 12:57:38 +0100 |
parents | 28dfb2df4ab9 |
children | b979cdde99e6 |
files | mercurial/commands.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Feb 15 11:51:58 2023 +0100 +++ b/mercurial/commands.py Tue Dec 13 12:57:38 2022 +0100 @@ -252,7 +252,7 @@ Returns 0 if all files are successfully added. """ - with repo.wlock(): + with repo.wlock(), repo.dirstate.changing_files(repo): m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts)) uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) rejected = cmdutil.add(ui, repo, m, b"", uipathfn, False, **opts)