changeset 52696:8370eb2c72ca

rust-revlog: fix storage.revlog.mmap.index logic This ensures that revlogs only use mmap when revlog.mmap.index is true (or defaulted to true based on can_populate_mmap()). This config previously had no effect because the code in its if-branch was accidentally duplicated below.
author Mitchell Kember <mkember@janestreet.com>
date Tue, 21 Jan 2025 18:26:32 -0500
parents b7afc38468bd
children 30510238284e
files rust/hg-core/src/revlog/options.rs
diffstat 1 files changed, 0 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/options.rs	Thu Jan 16 17:18:16 2025 +0100
+++ b/rust/hg-core/src/revlog/options.rs	Tue Jan 21 18:26:32 2025 -0500
@@ -183,12 +183,6 @@
             }
         }
 
-        if let Some(mmap_index_threshold) = config
-            .get_byte_size(b"storage", b"revlog.mmap.index:size-threshold")?
-        {
-            data_config.mmap_index_threshold = Some(mmap_index_threshold);
-        }
-
         let with_sparse_read =
             config.get_bool(b"experimental", b"sparse-read")?;
         if let Some(sr_density_threshold) = config