Mercurial > public > mercurial-scm > hg-stable
comparison rust/hg-core/src/errors.rs @ 52297:7be39c5110c9
hg-core: add a complete VFS
This will be used from Python in a later change.
More changes are needed in hg-core and rhg to properly clean up the APIs
of the old VFS implementation but it can be done when the dust settles
and we start adding more functionality to the pure Rust VFS.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 29 Jul 2024 20:47:43 +0200 |
parents | de317a87ea6a |
children | 65d516db7309 |
comparison
equal
deleted
inserted
replaced
52296:1a8466fd904a | 52297:7be39c5110c9 |
---|---|
64 RemovingFile(std::path::PathBuf), | 64 RemovingFile(std::path::PathBuf), |
65 RenamingFile { | 65 RenamingFile { |
66 from: std::path::PathBuf, | 66 from: std::path::PathBuf, |
67 to: std::path::PathBuf, | 67 to: std::path::PathBuf, |
68 }, | 68 }, |
69 CopyingFile { | |
70 from: std::path::PathBuf, | |
71 to: std::path::PathBuf, | |
72 }, | |
69 /// `std::fs::canonicalize` | 73 /// `std::fs::canonicalize` |
70 CanonicalizingPath(std::path::PathBuf), | 74 CanonicalizingPath(std::path::PathBuf), |
71 /// `std::env::current_dir` | 75 /// `std::env::current_dir` |
72 CurrentDir, | 76 CurrentDir, |
73 /// `std::env::current_exe` | 77 /// `std::env::current_exe` |
145 f, | 149 f, |
146 "when renaming {} to {}", | 150 "when renaming {} to {}", |
147 from.display(), | 151 from.display(), |
148 to.display() | 152 to.display() |
149 ), | 153 ), |
154 IoErrorContext::CopyingFile { from, to } => write!( | |
155 f, | |
156 "when copying {} to {}", | |
157 from.display(), | |
158 to.display() | |
159 ), | |
150 IoErrorContext::CanonicalizingPath(path) => { | 160 IoErrorContext::CanonicalizingPath(path) => { |
151 write!(f, "when canonicalizing {}", path.display()) | 161 write!(f, "when canonicalizing {}", path.display()) |
152 } | 162 } |
153 IoErrorContext::CurrentDir => { | 163 IoErrorContext::CurrentDir => { |
154 write!(f, "error getting current working directory") | 164 write!(f, "error getting current working directory") |