comparison rust/hg-cpython/src/dirstate.rs @ 52302:db065b33fa56

rust-dirstate: merge `dirstate_tree` module into `dirstate` The historical reasonning for `dirstate_tree` existing in the first place is that a new approach was needed for the tree-like dirstate and it was easier to start somewhat fresh. Now that the former dirstate is (long) gone, we can merge those two modules to avoid the confusion that even the module creators sometimes get.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 04 Nov 2024 11:00:58 +0100
parents ea0467ed76aa
children
comparison
equal deleted inserted replaced
52301:7ffc71552662 52302:db065b33fa56
19 dirstate::{dirs_multiset::Dirs, status::status_wrapper}, 19 dirstate::{dirs_multiset::Dirs, status::status_wrapper},
20 exceptions, 20 exceptions,
21 }; 21 };
22 use cpython::{PyBytes, PyDict, PyList, PyModule, PyObject, PyResult, Python}; 22 use cpython::{PyBytes, PyDict, PyList, PyModule, PyObject, PyResult, Python};
23 use dirstate_map::{DirstateIdentity, DirstateMap}; 23 use dirstate_map::{DirstateIdentity, DirstateMap};
24 use hg::dirstate_tree::on_disk::V2_FORMAT_MARKER; 24 use hg::dirstate::on_disk::V2_FORMAT_MARKER;
25 25
26 /// Create the module, with `__package__` given from parent 26 /// Create the module, with `__package__` given from parent
27 pub fn init_module(py: Python, package: &str) -> PyResult<PyModule> { 27 pub fn init_module(py: Python, package: &str) -> PyResult<PyModule> {
28 let dotted_name = &format!("{}.dirstate", package); 28 let dotted_name = &format!("{}.dirstate", package);
29 let m = PyModule::new(py, dotted_name)?; 29 let m = PyModule::new(py, dotted_name)?;