# HG changeset patch # User Pierre-Yves David # Date 1633128257 -7200 # Node ID bd5f7c61d69d9c4c089829c7327de738d6218553 # Parent 3c7db97ce541a1d0556ee8127a25f100ac107732 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 diff -r 3c7db97ce541 -r bd5f7c61d69d rust/hg-cpython/src/dirstate/dirstate_map.rs --- 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), } }