diff rust/hg-cpython/src/lib.rs @ 41694:0c7b353ce100

rust-cpython: binding for headrevs() This uses the core `dagops::retain_heads` to give a Rust implementation to `mercurial.dagop.headrevs`. Testing happens for now from `test-rust-ancestors.py` (for quick and minimal change), but it'd made more sense to put the binary index data elsewhere and to create a new test python module
author Georges Racinet <georges.racinet@octobus.net>
date Thu, 10 Jan 2019 18:25:18 +0100
parents ff333620a4cc
children 13b64247f48f
line wrap: on
line diff
--- a/rust/hg-cpython/src/lib.rs	Wed Jan 16 16:05:27 2019 +0100
+++ b/rust/hg-cpython/src/lib.rs	Thu Jan 10 18:25:18 2019 +0100
@@ -27,6 +27,7 @@
 pub mod ancestors;
 mod cindex;
 mod conversion;
+pub mod dagops;
 pub mod exceptions;
 
 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| {
@@ -38,6 +39,7 @@
 
     let dotted_name: String = m.get(py, "__name__")?.extract(py)?;
     m.add(py, "ancestor", ancestors::init_module(py, &dotted_name)?)?;
+    m.add(py, "dagop", dagops::init_module(py, &dotted_name)?)?;
     m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?;
     Ok(())
 });