Mercurial > hg
comparison rust/hg-cpython/src/dirstate/dirstate_map.rs @ 48135: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 | 3d0a9c6e614d |
children | 269ff8978086 |
comparison
equal
deleted
inserted
replaced
48134:3c7db97ce541 | 48135:bd5f7c61d69d |
---|---|
399 .inner(py) | 399 .inner(py) |
400 .borrow_mut() | 400 .borrow_mut() |
401 .copy_map_remove(HgPath::new(key.data(py))) | 401 .copy_map_remove(HgPath::new(key.data(py))) |
402 .map_err(|e| v2_error(py, e))? | 402 .map_err(|e| v2_error(py, e))? |
403 { | 403 { |
404 Some(_) => Ok(None), | 404 Some(copy) => Ok(Some( |
405 PyBytes::new(py, copy.as_bytes()).into_object(), | |
406 )), | |
405 None => Ok(default), | 407 None => Ok(default), |
406 } | 408 } |
407 } | 409 } |
408 | 410 |
409 def copymapiter(&self) -> PyResult<CopyMapKeysIterator> { | 411 def copymapiter(&self) -> PyResult<CopyMapKeysIterator> { |