On Wed, 05 Dec 2018 22:43:35 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <y...@tcha.org>
> # Date 1543756237 -32400
> #      Sun Dec 02 22:10:37 2018 +0900
> # Node ID 716a73bab79be30c20c75e13324c44205d5e2120
> # Parent  3842abba948cd7f4bb3fad6805265a35fb94a083
> revlog: add public CPython function to get parent revisions

> +/*
> + * Get parents of the given rev.
> + *
> + * If the specified rev is out of range, IndexError will be raised. If the
> + * revlog entry is corrupted, ValueError may be raised.
> + *
> + * Returns 0 on success or -1 on failure.
> + */
> +int HgRevlogIndex_GetParents(PyObject *op, int rev, int *ps)

This is based on the idea that the Rust module will be statically linked with
the cext objects. I thought that would be easier for our use case, package-local
visibility, but I'm not certain. If that makes things complicated, maybe we
should choose dynamic linking and wrap the function with PyCapsule, as you did
in the PoC code.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to