rust/hg-core/src/operations/debugdata.rs
changeset 49087 bfc117647c71
parent 48541 f2f57724d4eb
child 49089 399439c12223
--- a/rust/hg-core/src/operations/debugdata.rs	Thu Mar 31 22:54:33 2022 -0700
+++ b/rust/hg-core/src/operations/debugdata.rs	Tue Apr 12 11:40:37 2022 -0700
@@ -6,6 +6,7 @@
 // GNU General Public License version 2 or any later version.
 
 use crate::repo::Repo;
+use crate::requirements;
 use crate::revlog::revlog::{Revlog, RevlogError};
 
 /// Kind of data to debug
@@ -25,7 +26,10 @@
         DebugDataKind::Changelog => "00changelog.i",
         DebugDataKind::Manifest => "00manifest.i",
     };
-    let revlog = Revlog::open(repo, index_file, None)?;
+    let use_nodemap = repo
+        .requirements()
+        .contains(requirements::NODEMAP_REQUIREMENT);
+    let revlog = Revlog::open(repo, index_file, None, use_nodemap)?;
     let rev =
         crate::revset::resolve_rev_number_or_hex_prefix(revset, &revlog)?;
     let data = revlog.get_rev_data(rev)?;