dirstate: use `tracked` property in `_addpath`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 15 Sep 2021 09:28:17 +0200
changeset 47982 36c0d738c330
parent 47981 d1d9510f73f0
child 47983 ffde999a3ea9
dirstate: use `tracked` property in `_addpath` It is semantically better. Differential Revision: https://phab.mercurial-scm.org/D11422
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Fri Sep 17 08:57:12 2021 +0200
+++ b/mercurial/dirstate.py	Wed Sep 15 09:28:17 2021 +0200
@@ -674,7 +674,7 @@
         possibly_dirty=False,
     ):
         entry = self._map.get(f)
-        if added or entry is not None and entry.removed:
+        if added or entry is not None and not entry.tracked:
             self._check_new_tracked_filename(f)
         self._dirty = True
         self._updatedfiles.add(f)