Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/commands/cat.rs @ 46666:33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
For now the two values are:
* `abort-silent`: silently exit with code 252, the previous default behavior
* `abort`: print an error message about what feature
is not supported, then exit with code 252. Now the default.
Differential Revision: https://phab.mercurial-scm.org/D10091
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 01 Mar 2021 16:18:42 +0100 |
parents | 5ce2aa7c2ad5 |
children | 97ac588b6d9e |
line wrap: on
line diff
--- a/rust/rhg/src/commands/cat.rs Mon Mar 01 13:51:35 2021 +0100 +++ b/rust/rhg/src/commands/cat.rs Mon Mar 01 16:18:42 2021 +0100 @@ -60,6 +60,8 @@ invocation.ui.write_stdout(&data)?; Ok(()) } - None => Err(CommandError::Unimplemented.into()), + None => Err(CommandError::unsupported( + "`rhg cat` without `--rev` / `-r`", + )), } }