# HG changeset patch # User Raphaël Gomès # Date 2022-11-03 13:58:58 # Node ID 7787174f0a5a51361f846f5d90993b075c576ba9 # Parent 363923bd51cdd83a04571707e2d2f4c213dffef7 rhg: fallback when encountering ellipsis revisions Ellipsis revisions are still experimental and buggy in non-trivial histories. We currently have no plans to improve this situation nor to add support for ellipsis revisions in `rhg`. Falling back should be done carefully (since we may have already done some work that is visible to the user), but in this case it's highly unlikely that we're doing anything useful with a repo with ellipsis revisions, so this should be strictly better, also since the error message is more explicit. diff --git a/rust/hg-core/src/revlog/revlog.rs b/rust/hg-core/src/revlog/revlog.rs --- a/rust/hg-core/src/revlog/revlog.rs +++ b/rust/hg-core/src/revlog/revlog.rs @@ -447,6 +447,11 @@ impl<'a> RevlogEntry<'a> { ) { Ok(data) } else { + if (self.flags & REVISION_FLAG_ELLIPSIS) != 0 { + return Err(HgError::unsupported( + "ellipsis revisions are not supported by rhg", + )); + } Err(corrupted(format!( "hash check failed for revision {}", self.rev