changeset 49559:7787174f0a5a stable

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.
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 03 Nov 2022 14:58:58 +0100
parents 363923bd51cd
children 5f778b3a94ca
files rust/hg-core/src/revlog/revlog.rs
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/revlog.rs	Wed Nov 02 12:05:34 2022 +0100
+++ b/rust/hg-core/src/revlog/revlog.rs	Thu Nov 03 14:58:58 2022 +0100
@@ -447,6 +447,11 @@
         ) {
             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