# HG changeset patch # User Pierre-Yves David # Date 2024-03-05 14:07:47 # Node ID 68ed56baabf55baf89cf7b5709cddd03d6cb6cc7 # Parent a43a6d4b3be6b24357e556be9f113cb95b1ea7aa 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. diff --git a/rust/hg-cpython/src/revlog.rs b/rust/hg-cpython/src/revlog.rs --- a/rust/hg-cpython/src/revlog.rs +++ b/rust/hg-cpython/src/revlog.rs @@ -873,7 +873,7 @@ impl Index { py: Python, filtered_revs: &PyObject, ) -> PyResult { - 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