dirstate: directly call the right function in `set_tracked`
This get use closer to removing some older API on the dirstate.
Differential Revision: https://phab.mercurial-scm.org/D11424
--- a/mercurial/dirstate.py Wed Sep 15 10:05:25 2021 +0200
+++ b/mercurial/dirstate.py Wed Sep 15 09:41:02 2021 +0200
@@ -471,9 +471,12 @@
return True the file was previously untracked, False otherwise.
"""
+ self._dirty = True
+ self._updatedfiles.add(filename)
entry = self._map.get(filename)
if entry is None:
- self._add(filename)
+ self._check_new_tracked_filename(filename)
+ self._map.addfile(filename, added=True)
return True
elif not entry.tracked:
self._normallookup(filename)