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

SimonSapin phabricator at mercurial-scm.org
Tue Mar 2 19:58:32 UTC 2021


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

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,



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


More information about the Mercurial-devel mailing list