diff -r 00222775d59b -r 478d0b1bf0c5 rust/hg-cpython/src/dirstate/dirstate_map.rs --- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Tue Oct 15 21:26:56 2019 +0200 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Tue Oct 08 08:45:55 2019 +0200 @@ -8,7 +8,7 @@ //! Bindings for the `hg::dirstate::dirstate_map` file provided by the //! `hg-core` package. -use std::cell::RefCell; +use std::cell::{Ref, RefCell}; use std::convert::TryInto; use std::time::Duration; @@ -465,6 +465,12 @@ }); impl DirstateMap { + pub fn get_inner<'a>( + &'a self, + py: Python<'a>, + ) -> Ref<'a, RustDirstateMap> { + self.inner_shared(py).borrow() + } fn translate_key( py: Python, res: (&HgPathBuf, &DirstateEntry),