Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-cpython/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 | 4c5f6e95df84 |
children |
line wrap: on
line diff
--- a/rust/hg-cpython/src/exceptions.rs Fri Feb 07 16:03:35 2025 -0500 +++ b/rust/hg-cpython/src/exceptions.rs Fri Feb 07 16:07:35 2025 -0500 @@ -28,6 +28,9 @@ hg::GraphError::ParentOutOfRange(r) => { GraphError::new(py, ("ParentOutOfRange", PyRevision(r.0))) } + hg::GraphError::ParentOutOfOrder(r) => { + GraphError::new(py, ("ParentOutOfOrder", PyRevision(r.0))) + } } }