# HG changeset patch # User Raphaël Gomès <rgomes@octobus.net> # Date 1715002221 -7200 # Mon May 06 15:30:21 2024 +0200 # Branch stable # Node ID ccf5c44092db24a6391d6f5bf3bb82872b9ad9eb # Parent f808fa119212f553cfbc977b2a4b953fdab4b8f3 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`. diff --git a/rust/hg-cpython/src/dirstate/dirstate_map.rs b/rust/hg-cpython/src/dirstate/dirstate_map.rs --- a/rust/hg-cpython/src/dirstate/dirstate_map.rs +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs @@ -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(), )), } }