Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/pure/parsers.py @ 47515:c94d3ff46fd5
dirstate-entry: add a `removed` property
Lets start to define and use more semantic property.
Differential Revision: https://phab.mercurial-scm.org/D10957
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 03 Jul 2021 04:18:54 +0200 |
parents | 559aee84b889 |
children | b8ffe85e399b |
comparison
equal
deleted
inserted
replaced
47514:559aee84b889 | 47515:c94d3ff46fd5 |
---|---|
96 """True if the file have been fetched from p2 during the current merge | 96 """True if the file have been fetched from p2 during the current merge |
97 | 97 |
98 Should only be set if a merge is in progress in the dirstate | 98 Should only be set if a merge is in progress in the dirstate |
99 """ | 99 """ |
100 return self._size == FROM_P2 | 100 return self._size == FROM_P2 |
101 | |
102 @property | |
103 def removed(self): | |
104 """True if the file has been removed""" | |
105 return self._state == b'r' | |
101 | 106 |
102 def v1_state(self): | 107 def v1_state(self): |
103 """return a "state" suitable for v1 serialization""" | 108 """return a "state" suitable for v1 serialization""" |
104 return self._state | 109 return self._state |
105 | 110 |