Patchwork D10092: rhg: Change default `rhg.on-unsupported` configuration to `abort`

login
register
mail settings
Submitter phabricator
Date March 2, 2021, 7:58 p.m.
Message ID <differential-rev-PHID-DREV-2ytudt37pmde7e4jgcvl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48406/
State Superseded
Headers show

Comments

phabricator - March 2, 2021, 7:58 p.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/rhg/src/main.rs
  tests/test-rhg.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-rhg.t b/tests/test-rhg.t
--- a/tests/test-rhg.t
+++ b/tests/test-rhg.t
@@ -12,8 +12,6 @@ 
 
 Unimplemented command
   $ rhg unimplemented-command
-  [252]
-  $ rhg unimplemented-command --config rhg.on-unsupported=abort
   unsupported feature: error: Found argument 'unimplemented-command' which wasn't expected, or isn't valid in this context
   
   USAGE:
@@ -22,6 +20,8 @@ 
   For more information try --help
   
   [252]
+  $ rhg unimplemented-command --config rhg.on-unsupported=abort-silent
+  [252]
 
 Finding root
   $ rhg root
@@ -162,12 +162,15 @@ 
 
   $ echo indoor-pool >> .hg/requires
   $ rhg files
+  unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
   [252]
 
   $ rhg cat -r 1 copy_of_original
+  unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
   [252]
 
   $ rhg debugrequirements
+  unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
   [252]
 
   $ echo -e '\xFF' >> .hg/requires
diff --git a/rust/rhg/src/main.rs b/rust/rhg/src/main.rs
--- a/rust/rhg/src/main.rs
+++ b/rust/rhg/src/main.rs
@@ -275,7 +275,7 @@ 
 
 impl OnUnsupported {
     fn from_config(config: &Config) -> Self {
-        let default = OnUnsupported::AbortSilent;
+        let default = OnUnsupported::Abort;
         match config.get(b"rhg", b"on-unsupported") {
             Some(b"abort") => OnUnsupported::Abort,
             Some(b"abort-silent") => OnUnsupported::AbortSilent,