[Commented On] D12462: rhg: use the new `set_clean` API
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Tue Apr 12 14:58:17 UTC 2022
baymax added a comment.
baymax updated this revision to Diff 33036.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12462?vs=32934&id=33036
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12462/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12462
AFFECTED FILES
rust/rhg/src/commands/status.rs
CHANGE DETAILS
diff --git a/rust/rhg/src/commands/status.rs b/rust/rhg/src/commands/status.rs
--- a/rust/rhg/src/commands/status.rs
+++ b/rust/rhg/src/commands/status.rs
@@ -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
}
}
To: Alphare, #hg-reviewers, marmoute
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220412/9ae0bad7/attachment-0002.html>
More information about the Mercurial-patches
mailing list