# HG changeset patch # User Georges Racinet # Date 2023-10-18 17:54:18 # Node ID 44fbb7dfb56347208f5d6bb27782c5fe407a8db4 # Parent 51cc12158f9738b83fb8955e61ba4974683997e6 rust-index: renamed nodemap error function for rev not in index The function name was misleading, as the error wording mentions the nodemap, hence would not be appropriate for missing revisions not related to a nodemap lookup. 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 @@ -603,7 +603,7 @@ fn revlog_error(py: Python) -> PyErr { } } -fn rev_not_in_index(py: Python, rev: UncheckedRevision) -> PyErr { +fn nodemap_rev_not_in_index(py: Python, rev: UncheckedRevision) -> PyErr { PyErr::new::( py, format!( @@ -618,7 +618,7 @@ fn rev_not_in_index(py: Python, rev: Unc fn nodemap_error(py: Python, err: NodeMapError) -> PyErr { match err { NodeMapError::MultipleResults => revlog_error(py), - NodeMapError::RevisionNotInIndex(r) => rev_not_in_index(py, r), + NodeMapError::RevisionNotInIndex(r) => nodemap_rev_not_in_index(py, r), } }