Mercurial > hg
diff mercurial/pure/parsers.py @ 47526:8bcae9bf9e8d
dirstate-entry: add a `added` property
Lets use more semantic property instead of the `state` implementation details.
Differential Revision: https://phab.mercurial-scm.org/D10968
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 01:44:43 +0200 |
parents | 28632eb3ca3e |
children | f5b8f0b9c129 |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Sun Jul 04 01:42:10 2021 +0200 +++ b/mercurial/pure/parsers.py Sun Jul 04 01:44:43 2021 +0200 @@ -87,6 +87,11 @@ return self._state @property + def added(self): + """True if the file has been added""" + return self._state == b'a' + + @property def merged(self): """True if the file has been merged