Mercurial > hg-stable
changeset 49165:4d3f6767319f
rhg: use the new `set_clean` API
Differential Revision: https://phab.mercurial-scm.org/D12508
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 28 Mar 2022 18:26:24 +0200 |
parents | 953b08a2d983 |
children | 8a17fc501eda |
files | rust/rhg/src/commands/status.rs |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/rhg/src/commands/status.rs Mon Mar 28 18:15:11 2022 +0200 +++ b/rust/rhg/src/commands/status.rs Mon Mar 28 18:26:24 2022 +0200 @@ -15,7 +15,6 @@ use hg::dirstate::has_exec_bit; use hg::dirstate::status::StatusPath; use hg::dirstate::TruncatedTimestamp; -use hg::dirstate::RANGE_MASK_31BIT; use hg::errors::{HgError, IoResultExt}; use hg::lock::LockError; use hg::manifest::Manifest; @@ -390,12 +389,8 @@ .when_reading_file(&fs_path)? { let mode = fs_metadata.mode(); - let size = fs_metadata.len() as u32 & RANGE_MASK_31BIT; - let mut entry = dmap - .get(&hg_path)? - .expect("ambiguous file not in dirstate"); - entry.set_clean(mode, size, mtime); - dmap.add_file(&hg_path, entry)?; + let size = fs_metadata.len(); + dmap.set_clean(&hg_path, mode, size as u32, mtime)?; dirstate_write_needed = true } }