Mercurial > hg
diff mercurial/pure/parsers.py @ 47685:265cdfaad372
dirstate-item: introduce a `dm_nonnormal` property
See inline documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11123
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Jul 2021 21:59:18 +0200 |
parents | d06ced90c80f |
children | e43128ee436f |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Fri Jul 16 16:19:31 2021 +0200 +++ b/mercurial/pure/parsers.py Wed Jul 14 21:59:18 2021 +0200 @@ -187,6 +187,14 @@ """ return self._state == b'r' and self._size == NONNORMAL + @property + def dm_nonnormal(self): + """True is the entry is non-normal in the dirstatemap sense + + There is no reason for any code, but the dirstatemap one to use this. + """ + return self.state != b'n' or self.mtime == AMBIGUOUS_TIME + def v1_state(self): """return a "state" suitable for v1 serialization""" return self._state