changeset 46726:92e3cfd63096

rhg: Fall back to Python on unsupported `rhg config <section>` Printing an entire section (as opposed to a single value with `rhg config foo.bar`) is not supported yet in Rust only. Differential Revision: https://phab.mercurial-scm.org/D10098
author Simon Sapin <simon.sapin@octobus.net>
date Wed, 03 Mar 2021 18:38:22 +0100
parents df247f58ecee
children 28a54c128e82
files rust/rhg/src/commands/config.rs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/rhg/src/commands/config.rs	Tue Mar 02 23:18:23 2021 +0100
+++ b/rust/rhg/src/commands/config.rs	Wed Mar 03 18:38:22 2021 +0100
@@ -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"");