Mercurial > public > mercurial-scm > hg-stable
diff mercurial/pure/parsers.py @ 47532:ccbabaee5c36
dirstate-entry: add a `need_delay` method
This abstract the internal processing need for entry that would have an
ambiguous mtime (If I understand things correctly).
Differential Revision: https://phab.mercurial-scm.org/D10974
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 02:13:53 +0200 |
parents | f5b8f0b9c129 |
children | 8e4b9fe31334 |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Sun Jul 04 02:12:54 2021 +0200 +++ b/mercurial/pure/parsers.py Sun Jul 04 02:13:53 2021 +0200 @@ -153,6 +153,10 @@ """return a "mtime" suitable for v1 serialization""" return self._mtime + def need_delay(self, now): + """True if the stored mtime would be ambiguous with the current time""" + return self._state == b'n' and self._mtime == now + def gettype(q): return int(q & 0xFFFF)