Mercurial > hg
diff rust/hg-cpython/src/dirstate/dirstate_map.rs @ 46440:776b97179c06
rust: Remove DirstateParseError and ListDirstateTrackedFilesError
Use HgError instead.
Differential Revision: https://phab.mercurial-scm.org/D9894
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 27 Jan 2021 14:00:21 +0100 |
parents | 5bae4bc9bd42 |
children | 98a455a62699 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Wed Jan 27 13:41:28 2021 +0100 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Wed Jan 27 14:00:21 2021 +0100 @@ -26,10 +26,10 @@ dirstate::{dirs_multiset::Dirs, make_dirstate_tuple}, }; use hg::{ + errors::HgError, utils::hg_path::{HgPath, HgPathBuf}, DirsMultiset, DirstateEntry, DirstateMap as RustDirstateMap, - DirstateMapError, DirstateParents, DirstateParseError, EntryState, - StateMapIter, PARENT_SIZE, + DirstateMapError, DirstateParents, EntryState, StateMapIter, PARENT_SIZE, }; // TODO @@ -84,13 +84,13 @@ HgPath::new(f.extract::<PyBytes>(py)?.data(py)), oldstate.extract::<PyBytes>(py)?.data(py)[0] .try_into() - .map_err(|e: DirstateParseError| { + .map_err(|e: HgError| { PyErr::new::<exc::ValueError, _>(py, e.to_string()) })?, DirstateEntry { state: state.extract::<PyBytes>(py)?.data(py)[0] .try_into() - .map_err(|e: DirstateParseError| { + .map_err(|e: HgError| { PyErr::new::<exc::ValueError, _>(py, e.to_string()) })?, mode: mode.extract(py)?, @@ -113,7 +113,7 @@ HgPath::new(f.extract::<PyBytes>(py)?.data(py)), oldstate.extract::<PyBytes>(py)?.data(py)[0] .try_into() - .map_err(|e: DirstateParseError| { + .map_err(|e: HgError| { PyErr::new::<exc::ValueError, _>(py, e.to_string()) })?, size.extract(py)?, @@ -137,7 +137,7 @@ HgPath::new(f.extract::<PyBytes>(py)?.data(py)), oldstate.extract::<PyBytes>(py)?.data(py)[0] .try_into() - .map_err(|e: DirstateParseError| { + .map_err(|e: HgError| { PyErr::new::<exc::ValueError, _>(py, e.to_string()) })?, )