--- a/rust/hg-cpython/src/revlog.rs Mon Oct 30 11:03:57 2023 +0100
+++ b/rust/hg-cpython/src/revlog.rs Wed Aug 02 14:34:21 2023 +0200
@@ -324,12 +324,18 @@
Ok(rev >= -1 && rev < self.len(py)? as BaseRevision)
}
Err(_) => {
- cindex.inner().call_method(
+ let item_bytes: PyBytes = item.extract(py)?;
+ let rust_res = self.has_node(py, item_bytes)?;
+
+ let c_res = cindex.inner().call_method(
py,
"has_node",
- PyTuple::new(py, &[item]),
+ PyTuple::new(py, &[item.clone_ref(py)]),
None)?
- .extract(py)
+ .extract(py)?;
+
+ assert_eq!(rust_res, c_res);
+ Ok(rust_res)
}
}
}