comparison rust/rhg/src/commands/status.rs @ 48260:269ff8978086

dirstate: store mtimes with nanosecond precision in memory Keep integer seconds since the Unix epoch, together with integer nanoseconds in the `0 <= n < 1e9` range. For now, nanoseconds are still always zero. This commit is about data structure changes. Differential Revision: https://phab.mercurial-scm.org/D11684
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 18 Oct 2021 11:23:07 +0200
parents 38deb65d4441
children 594cf89047c8
comparison
equal deleted inserted replaced
48259:84f6b0c41b90 48260:269ff8978086
9 use crate::ui::{Ui, UiError}; 9 use crate::ui::{Ui, UiError};
10 use crate::utils::path_utils::relativize_paths; 10 use crate::utils::path_utils::relativize_paths;
11 use clap::{Arg, SubCommand}; 11 use clap::{Arg, SubCommand};
12 use hg; 12 use hg;
13 use hg::config::Config; 13 use hg::config::Config;
14 use hg::dirstate::TruncatedTimestamp;
14 use hg::errors::HgError; 15 use hg::errors::HgError;
15 use hg::manifest::Manifest; 16 use hg::manifest::Manifest;
16 use hg::matchers::AlwaysMatcher; 17 use hg::matchers::AlwaysMatcher;
17 use hg::repo::Repo; 18 use hg::repo::Repo;
18 use hg::utils::hg_path::{hg_path_to_os_string, HgPath}; 19 use hg::utils::hg_path::{hg_path_to_os_string, HgPath};
178 let options = StatusOptions { 179 let options = StatusOptions {
179 // TODO should be provided by the dirstate parsing and 180 // TODO should be provided by the dirstate parsing and
180 // hence be stored on dmap. Using a value that assumes we aren't 181 // hence be stored on dmap. Using a value that assumes we aren't
181 // below the time resolution granularity of the FS and the 182 // below the time resolution granularity of the FS and the
182 // dirstate. 183 // dirstate.
183 last_normal_time: 0, 184 last_normal_time: TruncatedTimestamp::new_truncate(0, 0),
184 // we're currently supporting file systems with exec flags only 185 // we're currently supporting file systems with exec flags only
185 // anyway 186 // anyway
186 check_exec: true, 187 check_exec: true,
187 list_clean: display_states.clean, 188 list_clean: display_states.clean,
188 list_unknown: display_states.unknown, 189 list_unknown: display_states.unknown,