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
--- 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),
}
}