rust/hg-pyo3/src/revlog/mod.rs
changeset 52818 acd76143f868
parent 52817 5950957af8a3
child 52819 88a69ebbba3b
--- a/rust/hg-pyo3/src/revlog/mod.rs	Thu Jan 02 23:37:14 2025 +0100
+++ b/rust/hg-pyo3/src/revlog/mod.rs	Thu Jan 02 23:59:26 2025 +0100
@@ -286,6 +286,25 @@
         Self::_index_issnapshot(slf, rev)
     }
 
+    #[pyo3(signature = (rev, stoprev=None))]
+    fn _deltachain(
+        slf: &Bound<'_, Self>,
+        py: Python<'_>,
+        rev: PyRevision,
+        stoprev: Option<PyRevision>,
+    ) -> PyResult<Py<PyTuple>> {
+        Self::with_index_read(slf, |idx| {
+            let using_general_delta = idx.uses_generaldelta();
+            Self::_index_deltachain(
+                slf,
+                py,
+                rev,
+                stoprev,
+                Some(using_general_delta.into()),
+            )
+        })
+    }
+
     fn reading(slf: &Bound<'_, Self>) -> PyResult<ReadingContextManager> {
         Ok(ReadingContextManager {
             inner_revlog: slf.clone().unbind(),