[Updated] D12534: rust: use `entry.tracked()` directly
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Tue Apr 19 21:56:25 UTC 2022
Closed by commit rHG3f5e207f78be: rust: use `entry.tracked()` directly (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12534?vs=33097&id=33288
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12534/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12534
AFFECTED FILES
rust/hg-core/src/dirstate_tree/dirstate_map.rs
rust/hg-core/src/dirstate_tree/on_disk.rs
rust/hg-core/src/operations/list_tracked_files.rs
rust/hg-core/src/repo.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/repo.rs b/rust/hg-core/src/repo.rs
--- a/rust/hg-core/src/repo.rs
+++ b/rust/hg-core/src/repo.rs
@@ -401,7 +401,7 @@
pub fn has_subrepos(&self) -> Result<bool, DirstateError> {
if let Some(entry) = self.dirstate_map()?.get(HgPath::new(".hgsub"))? {
- Ok(entry.state().is_tracked())
+ Ok(entry.tracked())
} else {
Ok(false)
}
diff --git a/rust/hg-core/src/operations/list_tracked_files.rs b/rust/hg-core/src/operations/list_tracked_files.rs
--- a/rust/hg-core/src/operations/list_tracked_files.rs
+++ b/rust/hg-core/src/operations/list_tracked_files.rs
@@ -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 --git a/rust/hg-core/src/dirstate_tree/on_disk.rs b/rust/hg-core/src/dirstate_tree/on_disk.rs
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs
@@ -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 --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
@@ -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,
To: Alphare, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220419/f020c8bd/attachment-0002.html>
More information about the Mercurial-patches
mailing list