--- a/rust/hg-core/src/revlog/inner_revlog.rs Tue Oct 08 16:10:30 2024 +0200
+++ b/rust/hg-core/src/revlog/inner_revlog.rs Thu Oct 10 15:54:45 2024 +0200
@@ -857,7 +857,7 @@
if error.kind() != ErrorKind::NotFound {
return Err(HgError::IoError { error, context });
}
- self.vfs.create(&self.data_file)?
+ self.vfs.create(&self.data_file, true)?
}
e => return Err(e),
},
@@ -964,7 +964,8 @@
self.writing_handles.take();
self.segment_file.writing_handle.take();
}
- let mut new_data_file_handle = self.vfs.create(&self.data_file)?;
+ let mut new_data_file_handle =
+ self.vfs.create(&self.data_file, true)?;
// Drop any potential data, possibly redundant with the VFS impl.
new_data_file_handle
.set_len(0)
@@ -988,7 +989,7 @@
self.index_file = index_path
}
- let mut new_index_handle = self.vfs.create(&self.index_file)?;
+ let mut new_index_handle = self.vfs.create(&self.index_file, true)?;
let mut new_data = Vec::with_capacity(self.len() * INDEX_ENTRY_SIZE);
for r in 0..self.len() {
let rev = Revision(r as BaseRevision);