# HG changeset patch # User Raphaël Gomès # Date 1649777183 -7200 # Node ID 3f5e207f78bea65df348b345855cda4b2376e749 # Parent a1fce5003ff4354484763c06b65029985b598558 rust: use `entry.tracked()` directly This is the new API Differential Revision: https://phab.mercurial-scm.org/D12534 diff -r a1fce5003ff4 -r 3f5e207f78be rust/hg-core/src/dirstate_tree/dirstate_map.rs --- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs Tue Apr 12 17:25:38 2022 +0200 +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs Tue Apr 12 17:26:23 2022 +0200 @@ -477,7 +477,7 @@ let parents = parse_dirstate_entries( map.on_disk, |path, entry, copy_source| { - let tracked = entry.state().is_tracked(); + let tracked = entry.tracked(); let node = Self::get_or_insert_node_inner( map.on_disk, &mut map.unreachable_bytes, diff -r a1fce5003ff4 -r 3f5e207f78be rust/hg-core/src/dirstate_tree/on_disk.rs --- a/rust/hg-core/src/dirstate_tree/on_disk.rs Tue Apr 12 17:25:38 2022 +0200 +++ b/rust/hg-core/src/dirstate_tree/on_disk.rs Tue Apr 12 17:26:23 2022 +0200 @@ -587,7 +587,7 @@ ) -> Result<(), DirstateV2ParseError> { for node in read_nodes(on_disk, nodes)? { if let Some(entry) = node.entry()? { - if entry.state().is_tracked() { + if entry.tracked() { f(node.full_path(on_disk)?) } } diff -r a1fce5003ff4 -r 3f5e207f78be rust/hg-core/src/operations/list_tracked_files.rs --- a/rust/hg-core/src/operations/list_tracked_files.rs Tue Apr 12 17:25:38 2022 +0200 +++ b/rust/hg-core/src/operations/list_tracked_files.rs Tue Apr 12 17:26:23 2022 +0200 @@ -51,7 +51,7 @@ let _parents = parse_dirstate_entries( &self.content, |path, entry, _copy_source| { - if entry.state().is_tracked() { + if entry.tracked() { files.push(path) } Ok(()) diff -r a1fce5003ff4 -r 3f5e207f78be rust/hg-core/src/repo.rs --- a/rust/hg-core/src/repo.rs Tue Apr 12 17:25:38 2022 +0200 +++ b/rust/hg-core/src/repo.rs Tue Apr 12 17:26:23 2022 +0200 @@ -401,7 +401,7 @@ pub fn has_subrepos(&self) -> Result { if let Some(entry) = self.dirstate_map()?.get(HgPath::new(".hgsub"))? { - Ok(entry.state().is_tracked()) + Ok(entry.tracked()) } else { Ok(false) }