comparison mercurial/pure/parsers.py @ 47990: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
comparison
equal deleted inserted replaced
47989:87b3010c08e0 47990:0d2a404f1932
238 self._possibly_dirty = False 238 self._possibly_dirty = False
239 self._mode = mode 239 self._mode = mode
240 self._size = size 240 self._size = size
241 self._mtime = mtime 241 self._mtime = mtime
242 242
243 def set_tracked(self):
244 """mark a file as tracked in the working copy
245
246 This will ultimately be called by command like `hg add`.
247 """
248 self._wc_tracked = True
249 # `set_tracked` is replacing various `normallookup` call. So we set
250 # "possibly dirty" to stay on the safe side.
251 #
252 # Consider dropping this in the future in favor of something less broad.
253 self._possibly_dirty = True
254
243 def set_untracked(self): 255 def set_untracked(self):
244 """mark a file as untracked in the working copy 256 """mark a file as untracked in the working copy
245 257
246 This will ultimately be called by command like `hg remove`. 258 This will ultimately be called by command like `hg remove`.
247 """ 259 """