context: use `dirstate.set_untracked` in `context.forget`
This is the new shiny API.
Differential Revision: https://phab.mercurial-scm.org/D11020
--- 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):