rust/hg-cpython/src/revlog.rs
changeset 46974 3c9208702db3
parent 46432 18a261b11b20
child 47034 0d8ff1f4ab0c
--- a/rust/hg-cpython/src/revlog.rs	Wed Apr 14 20:32:53 2021 +0200
+++ b/rust/hg-cpython/src/revlog.rs	Mon Apr 05 12:22:25 2021 +0200
@@ -12,8 +12,8 @@
 use cpython::{
     buffer::{Element, PyBuffer},
     exc::{IndexError, ValueError},
-    ObjectProtocol, PyBytes, PyClone, PyDict, PyErr, PyModule, PyObject,
-    PyResult, PyString, PyTuple, Python, PythonObject, ToPyObject,
+    ObjectProtocol, PyBytes, PyClone, PyDict, PyErr, PyInt, PyModule,
+    PyObject, PyResult, PyString, PyTuple, Python, PythonObject, ToPyObject,
 };
 use hg::{
     nodemap::{Block, NodeMapError, NodeTree},
@@ -285,6 +285,10 @@
         self.inner_update_nodemap_data(py, docket, nm_data)
     }
 
+    @property
+    def entry_size(&self) -> PyResult<PyInt> {
+        self.cindex(py).borrow().inner().getattr(py, "entry_size")?.extract::<PyInt>(py)
+    }
 
 });