Mercurial > hg
diff mercurial/pure/parsers.py @ 47531:f5b8f0b9c129
dirstate-entry: add a `tracked` property
This abstract the individual `state` value and has a clear semantic.
Differential Revision: https://phab.mercurial-scm.org/D10973
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 02:12:54 +0200 |
parents | 8bcae9bf9e8d |
children | ccbabaee5c36 |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Sun Jul 04 01:59:41 2021 +0200 +++ b/mercurial/pure/parsers.py Sun Jul 04 02:12:54 2021 +0200 @@ -87,6 +87,11 @@ return self._state @property + def tracked(self): + """True is the file is tracked in the working copy""" + return self._state in b"nma" + + @property def added(self): """True if the file has been added""" return self._state == b'a'