[Request] [+ ] D12475: rust-dirstatemap: use `DirstateEntry::tracked` directly
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Wed Apr 6 14:13:25 UTC 2022
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
`state()` is a legacy API that will be removed at some point, let's use the
newer API.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12475
AFFECTED FILES
rust/hg-core/src/dirstate_tree/dirstate_map.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/dirstate_tree/dirstate_map.rs b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs
@@ -982,9 +982,7 @@
&mut self,
filename: &HgPath,
) -> Result<(), DirstateError> {
- let was_tracked = self
- .get(filename)?
- .map_or(false, |e| e.state().is_tracked());
+ let was_tracked = self.get(filename)?.map_or(false, |e| e.tracked());
struct Dropped {
was_tracked: bool,
had_entry: bool,
To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20220406/452710d6/attachment.html>
More information about the Mercurial-patches
mailing list