diff -r 87b3010c08e0 -r 0d2a404f1932 mercurial/pure/parsers.py --- 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