changeset 52189:e698e3e75420 stable

rust-cpython: add a TODO about repo reuse This will need to be done soon-ish to prevent any surprises.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 05 Nov 2024 15:18:32 +0100
parents e4b242f9d4d9
children e6a44bc91bc2
files rust/hg-cpython/src/utils.rs
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-cpython/src/utils.rs	Mon Nov 04 16:43:05 2024 -0500
+++ b/rust/hg-cpython/src/utils.rs	Tue Nov 05 15:18:32 2024 +0100
@@ -64,6 +64,8 @@
 /// Get a repository from a given [`PyObject`] path, and bubble up any error
 /// that comes up.
 pub fn repo_from_path(py: Python, repo_path: PyObject) -> Result<Repo, PyErr> {
+    // TODO make the Config a Python class and downcast it here, otherwise we
+    // lose CLI args and runtime overrides done in Python.
     let config =
         hgerror_to_pyerr(py, Config::load_non_repo().map_err(HgError::from))?;
     let py_bytes = &repo_path.extract::<PyBytes>(py)?;