rust/rhg/src/commands/status.rs
branchstable
changeset 51670 955084b4f74f
parent 51666 48fd4d23c867
--- a/rust/rhg/src/commands/status.rs	Thu Aug 01 16:34:37 2024 +0200
+++ b/rust/rhg/src/commands/status.rs	Thu Aug 01 13:04:38 2024 +0100
@@ -611,7 +611,11 @@
             log::info!("not writing dirstate from `status`: lock is held")
         }
         Err(LockError::Other(HgError::IoError { error, .. }))
-            if error.kind() == io::ErrorKind::PermissionDenied =>
+            if error.kind() == io::ErrorKind::PermissionDenied
+                || match error.raw_os_error() {
+                    None => false,
+                    Some(errno) => libc::EROFS == errno,
+                } =>
         {
             // `hg status` on a read-only repository is fine
         }