Mercurial > hg
changeset 47600:f636dfe83554
context: use `dirstate.set_untracked` in `context.forget`
This is the new shiny API.
Differential Revision: https://phab.mercurial-scm.org/D11020
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Jul 2021 01:06:46 +0200 |
parents | cce51119bfe6 |
children | 4dca29b00405 |
files | mercurial/context.py |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Jul 08 00:54:40 2021 +0200 +++ b/mercurial/context.py Thu Jul 08 01:06:46 2021 +0200 @@ -1711,13 +1711,9 @@ uipath = lambda f: ds.pathto(pathutil.join(prefix, f)) rejected = [] for f in files: - if f not in ds: + if not ds.set_untracked(f): self._repo.ui.warn(_(b"%s not tracked!\n") % uipath(f)) rejected.append(f) - elif ds[f] != b'a': - ds.remove(f) - else: - ds.drop(f) return rejected def copy(self, source, dest):