Mercurial > public > mercurial-scm > hg
diff rust/hg-pyo3/src/revlog/mod.rs @ 52836:9749a97d3cfb
rust-pyo3: introduce utils to get the pyo3-wrapped index from Python
This is the equivalent of what we did in `convert_cpython`, but with fewer
steps, since we don't have to do the convertion/checking from cpython to pyo3
anymore.
This will be used in the next changeset when plugging everything in.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Sun, 05 Jan 2025 23:33:24 +0100 |
parents | 8ebe20a6fcb7 |
children | 28f0f00b5dbd |
line wrap: on
line diff
--- a/rust/hg-pyo3/src/revlog/mod.rs Sun Jan 05 23:21:56 2025 +0100 +++ b/rust/hg-pyo3/src/revlog/mod.rs Sun Jan 05 23:33:24 2025 +0100 @@ -61,9 +61,9 @@ mod config; use config::*; mod index; +pub use index::PySharedIndex; use index::{ py_tuple_to_revision_data_params, revision_data_params_to_py_tuple, - PySharedIndex, }; #[pyclass] @@ -203,8 +203,8 @@ #[pyclass] #[allow(dead_code)] -struct InnerRevlog { - irl: PyShareable<CoreInnerRevlog>, +pub(crate) struct InnerRevlog { + pub(crate) irl: PyShareable<CoreInnerRevlog>, nt: RwLock<Option<CoreNodeTree>>, docket: Option<PyObject>, // Holds a reference to the mmap'ed persistent nodemap data