rhg: fallback in `debugdata` if repo has `narrow`
authorRaphaël Gomès <rgomes@octobus.net>
Mon, 11 Jul 2022 17:44:03 +0200
changeset 49494 0199712c7a6d
parent 49493 6193e846cb65
child 49495 a0d189b2e871
rhg: fallback in `debugdata` if repo has `narrow` Narrow uses ellipsis nodes and debugdata does not understand them yet.
rust/rhg/src/commands/debugdata.rs
--- a/rust/rhg/src/commands/debugdata.rs	Wed Jul 06 11:46:00 2022 +0200
+++ b/rust/rhg/src/commands/debugdata.rs	Mon Jul 11 17:44:03 2022 +0200
@@ -55,6 +55,11 @@
         };
 
     let repo = invocation.repo?;
+    if repo.has_narrow() {
+        return Err(CommandError::unsupported(
+            "support for ellipsis nodes is missing and repo has narrow enabled",
+        ));
+    }
     let data = debug_data(repo, rev, kind).map_err(|e| (e, rev))?;
 
     let mut stdout = invocation.ui.stdout_buffer();