Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/error.rs @ 45923:ead435aa5294
rhg: add a `debugrequirements` subcommand
For now it only prints the contents of `.hg/requires` as-is, without parsing.
Differential Revision: https://phab.mercurial-scm.org/D9397
author | Simon Sapin <simon-commits@exyr.org> |
---|---|
date | Tue, 24 Nov 2020 15:11:58 +0100 |
parents | 33ded2d3f4fc |
children | a2eda1ff22aa |
line wrap: on
line diff
--- a/rust/rhg/src/error.rs Wed Nov 25 11:08:28 2020 -0500 +++ b/rust/rhg/src/error.rs Tue Nov 24 15:11:58 2020 +0100 @@ -12,6 +12,9 @@ RootNotFound(PathBuf), /// The current directory cannot be found CurrentDirNotFound(std::io::Error), + /// Error while reading or writing a file + // TODO: add the file name/path? + FileError(std::io::Error), /// The standard output stream cannot be written to StdoutError, /// The standard error stream cannot be written to @@ -27,6 +30,7 @@ match self { CommandErrorKind::RootNotFound(_) => exitcode::ABORT, CommandErrorKind::CurrentDirNotFound(_) => exitcode::ABORT, + CommandErrorKind::FileError(_) => exitcode::ABORT, CommandErrorKind::StdoutError => exitcode::ABORT, CommandErrorKind::StderrError => exitcode::ABORT, CommandErrorKind::Abort(_) => exitcode::ABORT,