diff -r 68a15b5a7e58 -r 776b97179c06 rust/hg-core/src/dirstate.rs --- a/rust/hg-core/src/dirstate.rs Wed Jan 27 13:41:28 2021 +0100 +++ b/rust/hg-core/src/dirstate.rs Wed Jan 27 14:00:21 2021 +0100 @@ -5,7 +5,8 @@ // This software may be used and distributed according to the terms of the // GNU General Public License version 2 or any later version. -use crate::{utils::hg_path::HgPathBuf, DirstateParseError, FastHashMap}; +use crate::errors::HgError; +use crate::{utils::hg_path::HgPathBuf, FastHashMap}; use std::collections::hash_map; use std::convert::TryFrom; @@ -60,7 +61,7 @@ } impl TryFrom for EntryState { - type Error = DirstateParseError; + type Error = HgError; fn try_from(value: u8) -> Result { match value { @@ -69,8 +70,8 @@ b'r' => Ok(EntryState::Removed), b'm' => Ok(EntryState::Merged), b'?' => Ok(EntryState::Unknown), - _ => Err(DirstateParseError::CorruptedEntry(format!( - "Incorrect entry state {}", + _ => Err(HgError::CorruptedRepository(format!( + "Incorrect dirstate entry state {}", value ))), }