Mercurial > hg-stable
changeset 51494:ccf5c44092db stable
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`.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 06 May 2024 15:30:21 +0200 |
parents | f808fa119212 |
children | b08c5fbe0e70 |
files | rust/hg-cpython/src/dirstate/dirstate_map.rs |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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(), )), } }