diff -r 269ff8978086 -r 9205d9be8b41 rust/hg-core/src/dirstate_tree/on_disk.rs --- a/rust/hg-core/src/dirstate_tree/on_disk.rs Mon Oct 18 11:23:07 2021 +0200 +++ b/rust/hg-core/src/dirstate_tree/on_disk.rs Tue Oct 19 22:04:14 2021 +0200 @@ -117,6 +117,7 @@ const FALLBACK_EXEC = 1 << 12; const HAS_FALLBACK_SYMLINK = 1 << 13; const FALLBACK_SYMLINK = 1 << 14; + const MTIME_SECOND_AMBIGUOUS = 1 << 15; } } @@ -371,6 +372,9 @@ }; let mtime = if self.flags().contains(Flags::HAS_FILE_MTIME) && !self.flags().contains(Flags::EXPECTED_STATE_IS_MODIFIED) + // The current code is not able to do the more subtle comparison that the + // MTIME_SECOND_AMBIGUOUS requires. So we ignore the mtime + && !self.flags().contains(Flags::MTIME_SECOND_AMBIGUOUS) { // TODO: replace this by `self.mtime.try_into()?` to use // sub-second precision from the file.