rust-cpython: don't swallow the dirstate error message
In case we do get a dirstate error, we want to get the full error message and
not just an opaque `Dirstate error`.
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon May 06 13:07:02 2024 +0200
+++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon May 06 15:30:21 2024 +0200
@@ -270,9 +270,9 @@
let tuple = (packed, tree_metadata, append);
Ok(tuple.to_py_object(py).into_object())
},
- Err(_) => Err(PyErr::new::<exc::OSError, _>(
+ Err(e) => Err(PyErr::new::<exc::OSError, _>(
py,
- "Dirstate error".to_string(),
+ e.to_string(),
)),
}
}