Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-core/src/errors.rs @ 46744:3d692e724d06
rhg: Align config file parse error formatting with Python
Differences can cause tests to fail
Differential Revision: https://phab.mercurial-scm.org/D10110
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Wed, 03 Mar 2021 19:47:48 +0100 |
parents | 1f55cd5b292f |
children | 12d59eec7f1d |
line wrap: on
line diff
--- a/rust/hg-core/src/errors.rs Wed Mar 03 19:08:27 2021 +0100 +++ b/rust/hg-core/src/errors.rs Wed Mar 03 19:47:48 2021 +0100 @@ -78,10 +78,10 @@ match self { HgError::Abort(explanation) => write!(f, "{}", explanation), HgError::IoError { error, context } => { - write!(f, "{}: {}", error, context) + write!(f, "abort: {}: {}", context, error) } HgError::CorruptedRepository(explanation) => { - write!(f, "corrupted repository: {}", explanation) + write!(f, "abort: corrupted repository: {}", explanation) } HgError::UnsupportedFeature(explanation) => { write!(f, "unsupported feature: {}", explanation) @@ -128,8 +128,12 @@ from.display(), to.display() ), - IoErrorContext::CurrentDir => write!(f, "current directory"), - IoErrorContext::CurrentExe => write!(f, "current executable"), + IoErrorContext::CurrentDir => { + write!(f, "error getting current working directory") + } + IoErrorContext::CurrentExe => { + write!(f, "error getting current executable") + } } } }