D10137: rhg: Fall back to Python if ui.relative-paths=no is configured

SimonSapin phabricator at mercurial-scm.org
Tue Mar 9 09:42:34 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/D10137

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

CHANGE DETAILS

diff --git a/rust/rhg/src/commands/files.rs b/rust/rhg/src/commands/files.rs
--- a/rust/rhg/src/commands/files.rs
+++ b/rust/rhg/src/commands/files.rs
@@ -27,6 +27,11 @@
 }
 
 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {
+    let relative = invocation.config.get(b"ui", b"relative-paths");
+    if relative == Some(b"no") {
+        return Err(CommandError::unsupported("ui.relative-paths = no"));
+    }
+
     let rev = invocation.subcommand_args.value_of("rev");
 
     let repo = invocation.repo?;



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


More information about the Mercurial-devel mailing list