Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-pyo3/src/exceptions.rs @ 52785:2fb13c3f4496
rust: add GraphError::ParentOutOfOrder
This will be used in a follow-up commit that creates a data structure optimized
for inserting revisions in descending order, since it will need to fail if a
revision number is greater than its descendant (meaning the graph is corrupted).
author | Mitchell Kember <mkember@janestreet.com> |
---|---|
date | Fri, 07 Feb 2025 16:07:35 -0500 |
parents | 4c9e31984b3a |
children | 32008b1e7104 |
line wrap: on
line diff
--- a/rust/hg-pyo3/src/exceptions.rs Fri Feb 07 16:03:35 2025 -0500 +++ b/rust/hg-pyo3/src/exceptions.rs Fri Feb 07 16:07:35 2025 -0500 @@ -13,6 +13,9 @@ hg::GraphError::ParentOutOfRange(r) => { GraphError::new_err(("ParentOutOfRange", PyRevision(r.0))) } + hg::GraphError::ParentOutOfOrder(r) => { + GraphError::new_err(("ParentOutOfOrder", PyRevision(r.0))) + } } } pub fn from_vcsgraph(inner: vcsgraph::graph::GraphReadError) -> PyErr {