Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/errors.rs @ 46740:97ac588b6d9e
rhg: Don?t make repository path absolute too early
Some error messages want to include a relative path,
which affects the output of some tests.
Differential Revision: https://phab.mercurial-scm.org/D10138
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 08 Mar 2021 08:35:43 +0100 |
parents | 12d59eec7f1d |
children | bcdcb4423ae3 |
comparison
equal
deleted
inserted
replaced
46739:c184b490da37 | 46740:97ac588b6d9e |
---|---|
48 RemovingFile(std::path::PathBuf), | 48 RemovingFile(std::path::PathBuf), |
49 RenamingFile { | 49 RenamingFile { |
50 from: std::path::PathBuf, | 50 from: std::path::PathBuf, |
51 to: std::path::PathBuf, | 51 to: std::path::PathBuf, |
52 }, | 52 }, |
53 /// `std::fs::canonicalize` | |
54 CanonicalizingPath(std::path::PathBuf), | |
53 /// `std::env::current_dir` | 55 /// `std::env::current_dir` |
54 CurrentDir, | 56 CurrentDir, |
55 /// `std::env::current_exe` | 57 /// `std::env::current_exe` |
56 CurrentExe, | 58 CurrentExe, |
57 } | 59 } |
126 f, | 128 f, |
127 "when renaming {} to {}", | 129 "when renaming {} to {}", |
128 from.display(), | 130 from.display(), |
129 to.display() | 131 to.display() |
130 ), | 132 ), |
133 IoErrorContext::CanonicalizingPath(path) => { | |
134 write!(f, "when canonicalizing {}", path.display()) | |
135 } | |
131 IoErrorContext::CurrentDir => { | 136 IoErrorContext::CurrentDir => { |
132 write!(f, "error getting current working directory") | 137 write!(f, "error getting current working directory") |
133 } | 138 } |
134 IoErrorContext::CurrentExe => { | 139 IoErrorContext::CurrentExe => { |
135 write!(f, "error getting current executable") | 140 write!(f, "error getting current executable") |