--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Jun 28 15:41:50 2021 +0200
+++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Jun 28 15:52:10 2021 +0200
@@ -19,11 +19,11 @@
use crate::{
dirstate::copymap::{CopyMap, CopyMapItemsIterator, CopyMapKeysIterator},
+ dirstate::make_dirstate_tuple,
dirstate::non_normal_entries::{
NonNormalEntries, NonNormalEntriesIterator,
},
dirstate::owning::OwningDirstateMap,
- dirstate::{dirs_multiset::Dirs, make_dirstate_tuple},
parsers::dirstate_parents_to_pytuple,
};
use hg::{
@@ -34,8 +34,8 @@
revlog::Node,
utils::files::normalize_case,
utils::hg_path::{HgPath, HgPathBuf},
- DirsMultiset, DirstateEntry, DirstateError,
- DirstateMap as RustDirstateMap, DirstateParents, EntryState, StateMapIter,
+ DirstateEntry, DirstateError, DirstateMap as RustDirstateMap,
+ DirstateParents, EntryState, StateMapIter,
};
// TODO
@@ -391,40 +391,6 @@
)
}
- def getdirs(&self) -> PyResult<Dirs> {
- // TODO don't copy, share the reference
- self.inner(py).borrow_mut().set_dirs()
- .map_err(|e| {
- PyErr::new::<exc::ValueError, _>(py, e.to_string())
- })?;
- Dirs::from_inner(
- py,
- DirsMultiset::from_dirstate(
- self.inner(py).borrow().iter(),
- Some(EntryState::Removed),
- )
- .map_err(|e| {
- PyErr::new::<exc::ValueError, _>(py, e.to_string())
- })?,
- )
- }
- def getalldirs(&self) -> PyResult<Dirs> {
- // TODO don't copy, share the reference
- self.inner(py).borrow_mut().set_all_dirs()
- .map_err(|e| {
- PyErr::new::<exc::ValueError, _>(py, e.to_string())
- })?;
- Dirs::from_inner(
- py,
- DirsMultiset::from_dirstate(
- self.inner(py).borrow().iter(),
- None,
- ).map_err(|e| {
- PyErr::new::<exc::ValueError, _>(py, e.to_string())
- })?,
- )
- }
-
// TODO all copymap* methods, see docstring above
def copymapcopy(&self) -> PyResult<PyDict> {
let dict = PyDict::new(py);