Mercurial > public > mercurial-scm > hg
diff mercurial/pure/parsers.py @ 48261:9205d9be8b41
dirstate-v2: add a new MTIME_SECOND_AMBIGUOUS flags
This flag will let us use more `mtime` value in the future. For now we have a
minimal handling of the flag at read time, but we will never put ourself in a
situation where we will needs to writes it.
See the flag documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11700
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 19 Oct 2021 22:04:14 +0200 |
parents | 269ff8978086 |
children | 68bb472aee9c |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Mon Oct 18 11:23:07 2021 +0200 +++ b/mercurial/pure/parsers.py Tue Oct 19 22:04:14 2021 +0200 @@ -60,6 +60,7 @@ DIRSTATE_V2_FALLBACK_EXEC = 1 << 12 DIRSTATE_V2_HAS_FALLBACK_SYMLINK = 1 << 13 DIRSTATE_V2_FALLBACK_SYMLINK = 1 << 14 +DIRSTATE_V2_MTIME_SECOND_AMBIGUOUS = 1 << 15 @attr.s(slots=True, init=False) @@ -140,6 +141,10 @@ """Build a new DirstateItem object from V2 data""" has_mode_size = bool(flags & DIRSTATE_V2_HAS_MODE_AND_SIZE) has_meaningful_mtime = bool(flags & DIRSTATE_V2_HAS_FILE_MTIME) + if flags & DIRSTATE_V2_MTIME_SECOND_AMBIGUOUS: + # The current code is not able to do the more subtle comparison that the + # MTIME_SECOND_AMBIGUOUS requires. So we ignore the mtime + has_meaningful_mtime = False mode = None if flags & +DIRSTATE_V2_EXPECTED_STATE_IS_MODIFIED: