Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/operations/dirstate_status.rs @ 45862:5c736ba5dc27
rust-status: don't bubble up os errors, translate them to bad matches
In the rare cases when either the OS/filesystem throws an error on an otherwise
valid action, or because a path is not representable on the filesystem, or
because of concurrent actions in the filesystem, we want to warn the user about
said path instead of bubbling up the error, causing an exception to be raised
in the Python layer.
Differential Revision: https://phab.mercurial-scm.org/D9320
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 16 Nov 2020 16:38:57 +0100 |
parents | 496537c9c1b4 |
children | fd47483f1645 |
line wrap: on
line diff
--- a/rust/hg-core/src/operations/dirstate_status.rs Mon Nov 16 16:36:00 2020 +0100 +++ b/rust/hg-core/src/operations/dirstate_status.rs Mon Nov 16 16:38:57 2020 +0100 @@ -56,7 +56,7 @@ .expect("old results should exist"), &mut results, traversed_sender.clone(), - )?; + ); } } _ => { @@ -104,7 +104,7 @@ &old_results, &mut results, traversed_sender.clone(), - )?; + ); } } _ => { @@ -116,7 +116,7 @@ if !self.matcher.is_exact() { if self.options.list_unknown { - self.handle_unknowns(&mut results)?; + self.handle_unknowns(&mut results); } else { // TODO this is incorrect, see issue6335 // This requires a fix in both Python and Rust that can happen