Mercurial > public > mercurial-scm > hg-stable
diff mercurial/pure/parsers.py @ 48014:0d2a404f1932
dirstate: introduce a set_tracked method on "map" and "item"
This move more implementation details withing the DirstateItem itself, which is
what we have been doing for a while.
Differential Revision: https://phab.mercurial-scm.org/D11430
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 15 Sep 2021 18:05:39 +0200 |
parents | 4e6f27230aee |
children | a660d8a53267 |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Wed Sep 15 11:13:46 2021 +0200 +++ b/mercurial/pure/parsers.py Wed Sep 15 18:05:39 2021 +0200 @@ -240,6 +240,18 @@ self._size = size self._mtime = mtime + def set_tracked(self): + """mark a file as tracked in the working copy + + This will ultimately be called by command like `hg add`. + """ + self._wc_tracked = True + # `set_tracked` is replacing various `normallookup` call. So we set + # "possibly dirty" to stay on the safe side. + # + # Consider dropping this in the future in favor of something less broad. + self._possibly_dirty = True + def set_untracked(self): """mark a file as untracked in the working copy