diff rust/hg-core/src/errors.rs @ 52167: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
line wrap: on
line diff
--- a/rust/hg-core/src/errors.rs	Mon Jul 29 20:28:42 2024 +0200
+++ b/rust/hg-core/src/errors.rs	Mon Jul 29 20:47:43 2024 +0200
@@ -66,6 +66,10 @@
         from: std::path::PathBuf,
         to: std::path::PathBuf,
     },
+    CopyingFile {
+        from: std::path::PathBuf,
+        to: std::path::PathBuf,
+    },
     /// `std::fs::canonicalize`
     CanonicalizingPath(std::path::PathBuf),
     /// `std::env::current_dir`
@@ -147,6 +151,12 @@
                 from.display(),
                 to.display()
             ),
+            IoErrorContext::CopyingFile { from, to } => write!(
+                f,
+                "when copying {} to {}",
+                from.display(),
+                to.display()
+            ),
             IoErrorContext::CanonicalizingPath(path) => {
                 write!(f, "when canonicalizing {}", path.display())
             }