diff rust/rhg/src/commands/status.rs @ 47110:9c6b458a08e1

rust: Move "lookup" a.k.a. "unsure" paths into `DirstateStatus` struct Instead of having `status()` returning a tuple of those paths and `DirstateStatus`. Differential Revision: https://phab.mercurial-scm.org/D10494
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 06 Apr 2021 15:14:19 +0200
parents c71e8d9e7f2a
children 62225f9da938
line wrap: on
line diff
--- a/rust/rhg/src/commands/status.rs	Tue Apr 13 17:02:58 2021 +0200
+++ b/rust/rhg/src/commands/status.rs	Tue Apr 06 15:14:19 2021 +0200
@@ -181,7 +181,7 @@
         collect_traversed_dirs: false,
     };
     let ignore_file = repo.working_directory_vfs().join(".hgignore"); // TODO hardcoded
-    let ((lookup, ds_status), pattern_warnings) = hg::status(
+    let (ds_status, pattern_warnings) = hg::status(
         &dmap,
         &AlwaysMatcher,
         repo.working_directory_path().to_owned(),
@@ -195,10 +195,10 @@
     if !ds_status.bad.is_empty() {
         warn!("Bad matches {:?}", &(ds_status.bad))
     }
-    if !lookup.is_empty() {
+    if !ds_status.unsure.is_empty() {
         info!(
             "Files to be rechecked by retrieval from filelog: {:?}",
-            &lookup
+            &ds_status.unsure
         );
     }
     // TODO check ordering to match `hg status` output.
@@ -206,7 +206,7 @@
     if display_states.modified {
         display_status_paths(ui, &(ds_status.modified), b"M")?;
     }
-    if !lookup.is_empty() {
+    if !ds_status.unsure.is_empty() {
         let p1: Node = parents
             .expect(
                 "Dirstate with no parents should not list any file to
@@ -217,7 +217,7 @@
         let p1_hex = format!("{:x}", p1);
         let mut rechecked_modified: Vec<HgPathCow> = Vec::new();
         let mut rechecked_clean: Vec<HgPathCow> = Vec::new();
-        for to_check in lookup {
+        for to_check in ds_status.unsure {
             if cat_file_is_modified(repo, &to_check, &p1_hex)? {
                 rechecked_modified.push(to_check);
             } else {