Mercurial > hg
diff mercurial/dirstate.py @ 47972:5a6c1ef4bcac
dirstate: make dirstatemap.set_untracked deal with added file
This merge dropfile in set_untracked.
Differential Revision: https://phab.mercurial-scm.org/D11419
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 02 Sep 2021 02:53:47 +0200 |
parents | c0157aca5bf5 |
children | 2e0ff3947b05 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Thu Sep 02 02:48:56 2021 +0200 +++ b/mercurial/dirstate.py Thu Sep 02 02:53:47 2021 +0200 @@ -493,17 +493,11 @@ return True the file was previously tracked, False otherwise. """ - entry = self._map.get(filename) - if entry is None: - return False - else: + ret = self._map.set_untracked(filename) + if ret: self._dirty = True self._updatedfiles.add(filename) - if entry.added: - self._map.dropfile(filename) - else: - self._map.set_untracked(filename) - return True + return ret @requires_no_parents_change def set_clean(self, filename, parentfiledata=None):