Mercurial > hg-stable
changeset 48147:bd5f7c61d69d
dirstatemap: fix copymap.pop in Rust to return the value it pops
I guess this was overlooked in the initial implementation?
Without this, the next patch would, loose copy information in setparent.
Differential Revision: https://phab.mercurial-scm.org/D11580
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 02 Oct 2021 00:44:17 +0200 |
parents | 3c7db97ce541 |
children | bda85920de6b |
files | rust/hg-cpython/src/dirstate/dirstate_map.rs |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Sat Oct 02 00:14:32 2021 +0200 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Sat Oct 02 00:44:17 2021 +0200 @@ -401,7 +401,9 @@ .copy_map_remove(HgPath::new(key.data(py))) .map_err(|e| v2_error(py, e))? { - Some(_) => Ok(None), + Some(copy) => Ok(Some( + PyBytes::new(py, copy.as_bytes()).into_object(), + )), None => Ok(default), } }