diff -r 4c75f00b199e -r 3df46f3a3d6c rust/hg-cpython/src/dirstate/dirstate_map.rs --- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Mar 28 23:45:54 2022 +0200 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Tue Mar 29 00:53:11 2022 +0200 @@ -489,6 +489,19 @@ Ok(dirs) } + def setparents_fixup(&self) -> PyResult { + let dict = PyDict::new(py); + let copies = self.inner(py).borrow_mut().setparents_fixup(); + for (key, value) in copies.map_err(|e| v2_error(py, e))? { + dict.set_item( + py, + PyBytes::new(py, key.as_bytes()), + PyBytes::new(py, value.as_bytes()), + )?; + } + Ok(dict) + } + def debug_iter(&self, all: bool) -> PyResult { let dirs = PyList::new(py, &[]); for item in self.inner(py).borrow().debug_iter(all) {