breezyshim 0.7.16

Rust shim around the Breezy Python API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Basic support for interacting with GitLab
use pyo3::prelude::*;

/// Login to GitLab using saved credentials.
pub fn login(url: &url::Url) -> PyResult<()> {
    Python::attach(|py| {
        let m = py.import("breezy.plugins.gitlab.cmds").unwrap();
        let cmd = m.getattr("cmd_gitlab_login").unwrap();

        let cmd_gl = cmd.call0().unwrap();
        cmd_gl.call_method0("_setup_outf").unwrap();

        cmd_gl.call_method1("run", (url.as_str(),)).unwrap();

        Ok(())
    })
}