--- a/rust/rhg/src/error.rs Wed Aug 02 10:16:33 2023 -0400
+++ b/rust/rhg/src/error.rs Wed Aug 02 10:46:47 2023 -0400
@@ -10,7 +10,8 @@
use hg::revlog::RevlogError;
use hg::sparse::SparseConfigError;
use hg::utils::files::get_bytes_from_path;
-use hg::{DirstateError, DirstateMapError, StatusError};
+use hg::utils::hg_path::HgPathError;
+use hg::{DirstateError, DirstateMapError, PatternError, StatusError};
use std::convert::From;
/// The kind of command error
@@ -230,6 +231,18 @@
}
}
+impl From<HgPathError> for CommandError {
+ fn from(error: HgPathError) -> Self {
+ CommandError::unsupported(format!("{}", error))
+ }
+}
+
+impl From<PatternError> for CommandError {
+ fn from(error: PatternError) -> Self {
+ CommandError::unsupported(format!("{}", error))
+ }
+}
+
impl From<DirstateMapError> for CommandError {
fn from(error: DirstateMapError) -> Self {
CommandError::abort(format!("{}", error))