##// END OF EJS Templates
rhg: make it possible to opt out of `rhg cat`...
Arseniy Alekseyev -
r49129:698b70b9 default
parent child Browse files
Show More
@@ -33,6 +33,15 b" pub fn args() -> clap::App<'static, 'sta"
33
33
34 #[timed]
34 #[timed]
35 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {
35 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {
36 let cat_enabled_default = true;
37 let cat_enabled = invocation.config.get_option(b"rhg", b"cat")?;
38 if !cat_enabled.unwrap_or(cat_enabled_default) {
39 return Err(CommandError::unsupported(
40 "cat is disabled in rhg (enable it with 'rhg.cat = true' \
41 or enable fallback with 'rhg.on-unsupported = fallback')",
42 ));
43 }
44
36 let rev = invocation.subcommand_args.value_of("rev");
45 let rev = invocation.subcommand_args.value_of("rev");
37 let file_args = match invocation.subcommand_args.values_of("files") {
46 let file_args = match invocation.subcommand_args.values_of("files") {
38 Some(files) => files.collect(),
47 Some(files) => files.collect(),
General Comments 0
You need to be logged in to leave comments. Login now