dirstate: replace `_add` call in `setparent`
Same logic as the previous changeset, it get us closer to removed older API on
the dirstate.
Differential Revision: https://phab.mercurial-scm.org/D11425
--- a/mercurial/dirstate.py Wed Sep 15 09:41:02 2021 +0200
+++ b/mercurial/dirstate.py Wed Sep 15 18:18:16 2021 +0200
@@ -409,7 +409,13 @@
source = self._map.copymap.get(f)
if source:
copies[f] = source
- self._add(f)
+ self._check_new_tracked_filename(f)
+ self._updatedfiles.add(f)
+ self._map.reset_state(
+ f,
+ p1_tracked=False,
+ wc_tracked=True,
+ )
return copies
def setbranch(self, branch):