Patchwork D10906: rhg: fallback if tweakdefaults or statuscopies is enabled with status

login
register
mail settings
Submitter phabricator
Date June 24, 2021, 6:04 p.m.
Message ID <differential-rev-PHID-DREV-p4owfdzndf2tpbbyd3au-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49220/
State New
Headers show

Comments

phabricator - June 24, 2021, 6:04 p.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  `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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10906

AFFECTED FILES
  rust/rhg/src/commands/status.rs

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/rhg/src/commands/status.rs b/rust/rhg/src/commands/status.rs
--- a/rust/rhg/src/commands/status.rs
+++ b/rust/rhg/src/commands/status.rs
@@ -141,6 +141,30 @@ 
         ));
     }
 
+    // TODO: lift this limitation
+    match invocation.config.get_bool(b"ui", b"tweakdefaults") {
+        Ok(val) => {
+            if val {
+                return Err(CommandError::unsupported(
+                    "ui.tweakdefaults is not yet supported with rhg status",
+                ));
+            }
+        }
+        Err(_) => {}
+    };
+
+    // TODO: lift this limitation
+    match invocation.config.get_bool(b"ui", b"statuscopies") {
+        Ok(val) => {
+            if val {
+                return Err(CommandError::unsupported(
+                    "ui.statuscopies is not yet supported with rhg status",
+                ));
+            }
+        }
+        Err(_) => {}
+    };
+
     let ui = invocation.ui;
     let args = invocation.subcommand_args;
     let display_states = if args.is_present("all") {