rhg: fallback if tweakdefaults or statuscopies is enabled with status
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 24 Jun 2021 14:23:11 +0530
changeset 48171 64b8676f11bb
parent 48170 941fbaab5aff
child 48172 08c8cd2527bc
rhg: fallback if tweakdefaults or statuscopies is enabled with status `rhg status` is experimental right now and does not support all functionalities. While the long term target is to implement them, for now we add a fallback to have all tests pass with `rhg status` enabled. Differential Revision: https://phab.mercurial-scm.org/D10906
rust/rhg/src/commands/status.rs
--- a/rust/rhg/src/commands/status.rs	Mon Jul 19 04:13:50 2021 +0530
+++ b/rust/rhg/src/commands/status.rs	Thu Jun 24 14:23:11 2021 +0530
@@ -133,6 +133,18 @@
         ));
     }
 
+    // TODO: lift these limitations
+    if invocation.config.get_bool(b"ui", b"tweakdefaults").ok() == Some(true) {
+        return Err(CommandError::unsupported(
+            "ui.tweakdefaults is not yet supported with rhg status",
+        ));
+    }
+    if invocation.config.get_bool(b"ui", b"statuscopies").ok() == Some(true) {
+        return Err(CommandError::unsupported(
+            "ui.statuscopies is not yet supported with rhg status",
+        ));
+    }
+
     let ui = invocation.ui;
     let args = invocation.subcommand_args;
     let display_states = if args.is_present("all") {