Mercurial > hg-stable
changeset 51445:68ed56baabf5 stable
rust-index: don't use mutable borrow to computed filtered heads
This does not need to mutate the index.
This is the prime suspect for some RuntimeError raised during some pushes.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 05 Mar 2024 15:07:47 +0100 |
parents | a43a6d4b3be6 |
children | 406b413e3cf2 |
files | rust/hg-cpython/src/revlog.rs |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-cpython/src/revlog.rs Tue Mar 05 15:07:04 2024 +0100 +++ b/rust/hg-cpython/src/revlog.rs Tue Mar 05 15:07:47 2024 +0100 @@ -873,7 +873,7 @@ py: Python, filtered_revs: &PyObject, ) -> PyResult<PyObject> { - let index = &mut *self.index(py).borrow_mut(); + let index = &*self.index(py).borrow(); let filtered_revs = rev_pyiter_collect(py, filtered_revs, index)?; if let Some(new_heads) = index