Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
47531:f5b8f0b9c129 | 47532:ccbabaee5c36 |
---|---|
150 return self._size | 150 return self._size |
151 | 151 |
152 def v1_mtime(self): | 152 def v1_mtime(self): |
153 """return a "mtime" suitable for v1 serialization""" | 153 """return a "mtime" suitable for v1 serialization""" |
154 return self._mtime | 154 return self._mtime |
155 | |
156 def need_delay(self, now): | |
157 """True if the stored mtime would be ambiguous with the current time""" | |
158 return self._state == b'n' and self._mtime == now | |
155 | 159 |
156 | 160 |
157 def gettype(q): | 161 def gettype(q): |
158 return int(q & 0xFFFF) | 162 return int(q & 0xFFFF) |
159 | 163 |