Mercurial > public > mercurial-scm > hg
diff rust/hg-cpython/src/cindex.rs @ 52771: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 | 96e05f1a99bd |
children |
line wrap: on
line diff
--- a/rust/hg-cpython/src/cindex.rs Fri Feb 07 16:03:35 2025 -0500 +++ b/rust/hg-cpython/src/cindex.rs Fri Feb 07 16:07:35 2025 -0500 @@ -171,6 +171,9 @@ Err(GraphError::ParentOutOfRange(rev)) => { Err(vcsgraph::graph::GraphReadError::KeyedInvalidKey(rev.0)) } + Err(GraphError::ParentOutOfOrder(_)) => { + Err(vcsgraph::graph::GraphReadError::InconsistentGraphData) + } } } }