D6633: rust-dirstate: rust-cpython bridge for dirstatemap
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Sat Aug 17 02:49:44 EDT 2019
yuja added a comment.
> + def getdirs(&self) -> PyResult<Dirs> {
> + // TODO don't copy, share the reference
> + self.inner(py).borrow_mut().set_dirs();
> + Dirs::from_inner(
> + py,
> + DirsMultiset::new(
> + DirsIterable::Dirstate(&self.inner(py).borrow()),
> + Some(EntryState::Removed),
> + ),
> + )
> + }
> + def getalldirs(&self) -> PyResult<Dirs> {
> + // TODO don't copy, share the reference
> + self.inner(py).borrow_mut().set_all_dirs();
> + Dirs::from_inner(
> + py,
> + DirsMultiset::new(
> + DirsIterable::Dirstate(&self.inner(py).borrow()),
> + None,
> + ),
> + )
> + }
How do these set_dirs/set_all_dirs work? IIUC, the return value is built
from state_map.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6633/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6633
To: Alphare, #hg-reviewers
Cc: yuja, durin42, kevincox, mercurial-devel
More information about the Mercurial-devel
mailing list