D10098: rhg: Fall back to Python on unsupported `rhg config <section>`

SimonSapin phabricator at mercurial-scm.org
Wed Mar 3 18:24:44 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/D10098

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

CHANGE DETAILS

diff --git a/rust/rhg/src/commands/config.rs b/rust/rhg/src/commands/config.rs
--- a/rust/rhg/src/commands/config.rs
+++ b/rust/rhg/src/commands/config.rs
@@ -27,7 +27,7 @@
         .expect("missing required CLI argument")
         .as_bytes()
         .split_2(b'.')
-        .ok_or_else(|| HgError::abort(""))?;
+        .ok_or_else(|| HgError::unsupported("hg config <section>"))?;
 
     let value = invocation.config.get(section, name).unwrap_or(b"");
 



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


More information about the Mercurial-devel mailing list