--- 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
}