Mercurial > public > mercurial-scm > hg-stable
diff rust/rhg/src/error.rs @ 46757:b1f2c2b336ec
rhg: `cat` command: print error messages for missing files
And exit with an error code if no file was matched.
This matches the behavior of Python-based hg.
Differential Revision: https://phab.mercurial-scm.org/D10142
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 03 Mar 2021 16:40:03 +0100 |
parents | 12d59eec7f1d |
children | bcdcb4423ae3 |
line wrap: on
line diff
--- a/rust/rhg/src/error.rs Mon Mar 08 19:07:29 2021 +0100 +++ b/rust/rhg/src/error.rs Wed Mar 03 16:40:03 2021 +0100 @@ -15,6 +15,9 @@ /// Exit with an error message and "standard" failure exit code. Abort { message: Vec<u8> }, + /// Exit with a failure exit code but no message. + Unsuccessful, + /// Encountered something (such as a CLI argument, repository layout, …) /// not supported by this version of `rhg`. Depending on configuration /// `rhg` may attempt to silently fall back to Python-based `hg`, which