Mercurial > public > mercurial-scm > hg-stable
comparison rust/hg-cpython/src/revlog.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 | c2480ac4c5e2 |
children | 8de68446a5bd |
comparison
equal
deleted
inserted
replaced
52784:7b4548a075ab | 52785:2fb13c3f4496 |
---|---|
92 Ok(parents) => { | 92 Ok(parents) => { |
93 Ok(vcsgraph::graph::Parents([parents[0].0, parents[1].0])) | 93 Ok(vcsgraph::graph::Parents([parents[0].0, parents[1].0])) |
94 } | 94 } |
95 Err(hg::GraphError::ParentOutOfRange(rev)) => { | 95 Err(hg::GraphError::ParentOutOfRange(rev)) => { |
96 Err(vcsgraph::graph::GraphReadError::KeyedInvalidKey(rev.0)) | 96 Err(vcsgraph::graph::GraphReadError::KeyedInvalidKey(rev.0)) |
97 } | |
98 Err(hg::GraphError::ParentOutOfOrder(_)) => { | |
99 Err(vcsgraph::graph::GraphReadError::InconsistentGraphData) | |
97 } | 100 } |
98 } | 101 } |
99 } | 102 } |
100 } | 103 } |
101 | 104 |