Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cext/parsers.c @ 48272: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/cext/parsers.c Mon Oct 18 11:23:07 2021 +0200 +++ b/mercurial/cext/parsers.c Tue Oct 19 22:04:14 2021 +0200 @@ -420,6 +420,14 @@ dirstate_flag_has_meaningful_data | dirstate_flag_has_file_mtime); } + if (t->flags & dirstate_flag_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 */ + t->flags &= ~(dirstate_flag_mtime_second_ambiguous | + dirstate_flag_has_meaningful_data | + dirstate_flag_has_file_mtime); + } t->mode = 0; if (t->flags & dirstate_flag_has_meaningful_data) { if (t->flags & dirstate_flag_mode_exec_perm) {