Mercurial > public > mercurial-scm > hg-stable
diff rust/rhg/src/commands/status.rs @ 48538:4afb9627dc77
dirstate-v2: Apply SECOND_AMBIGUOUS to directory mtimes too
This would only be relevant in contrived scenarios such as a dirstate file
being written with a libc that supports sub-second precision in mtimes,
then transfered (at the filesystem level, not `hg clone`) to another
system where libc *doesn?t* have sub-second precision and truncates the stored
mtime of a directory to integer seconds.
Differential Revision: https://phab.mercurial-scm.org/D11939
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Fri, 17 Dec 2021 14:15:08 +0100 |
parents | e293ff808a05 |
children | c9abfb80b4e3 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/status.rs Wed Dec 15 15:28:41 2021 +0100 +++ b/rust/rhg/src/commands/status.rs Fri Dec 17 14:15:08 2021 +0100 @@ -315,9 +315,8 @@ } let mut dirstate_write_needed = ds_status.dirty; - let filesystem_time_at_status_start = ds_status - .filesystem_time_at_status_start - .map(TruncatedTimestamp::from); + let filesystem_time_at_status_start = + ds_status.filesystem_time_at_status_start; if (fixup.is_empty() || filesystem_time_at_status_start.is_none()) && !dirstate_write_needed