rust/hg-cpython/src/revlog.rs
changeset 51245 8b243e2a3bc4
parent 51244 8dbd985733ff
child 51246 2966b88d4531
equal deleted inserted replaced
51244:8dbd985733ff 51245:8b243e2a3bc4
    12     PyRevision,
    12     PyRevision,
    13 };
    13 };
    14 use cpython::{
    14 use cpython::{
    15     buffer::{Element, PyBuffer},
    15     buffer::{Element, PyBuffer},
    16     exc::{IndexError, ValueError},
    16     exc::{IndexError, ValueError},
    17     ObjectProtocol, PyBytes, PyClone, PyDict, PyErr, PyInt, PyList, PyModule,
    17     ObjectProtocol, PyBool, PyBytes, PyClone, PyDict, PyErr, PyInt, PyList,
    18     PyObject, PyResult, PySet, PyString, PyTuple, Python, PythonObject,
    18     PyModule, PyObject, PyResult, PySet, PyString, PyTuple, Python,
    19     ToPyObject, UnsafePyLeaked,
    19     PythonObject, ToPyObject, UnsafePyLeaked,
    20 };
    20 };
    21 use hg::{
    21 use hg::{
    22     errors::HgError,
    22     errors::HgError,
    23     index::{
    23     index::{
    24         IndexHeader, Phase, RevisionDataParams, SnapshotsCache,
    24         IndexHeader, Phase, RevisionDataParams, SnapshotsCache,
   447     def rust_ext_compat(&self) -> PyResult<PyInt> {
   447     def rust_ext_compat(&self) -> PyResult<PyInt> {
   448         // will be entirely removed when the Rust index yet useful to
   448         // will be entirely removed when the Rust index yet useful to
   449         // implement in Rust to detangle things when removing `self.cindex`
   449         // implement in Rust to detangle things when removing `self.cindex`
   450         let rust_res: PyInt = 1.to_py_object(py);
   450         let rust_res: PyInt = 1.to_py_object(py);
   451         Ok(rust_res)
   451         Ok(rust_res)
       
   452     }
       
   453 
       
   454     @property
       
   455     def is_rust(&self) -> PyResult<PyBool> {
       
   456         Ok(false.to_py_object(py))
   452     }
   457     }
   453 
   458 
   454 });
   459 });
   455 
   460 
   456 /// Take a (potentially) mmap'ed buffer, and return the underlying Python
   461 /// Take a (potentially) mmap'ed buffer, and return the underlying Python