##// END OF EJS Templates
rebase: don't create merge when continuing rebase interrupted by old hg...
rebase: don't create merge when continuing rebase interrupted by old hg This fixes the bug described and demonstrated in the previous commit. It does so by practically undoing 8082a77cc3a2 (rebase: remove some redundant setting of dirstate parents, 2020-01-10). Differential Revision: https://phab.mercurial-scm.org/D8356

File last commit:

r45018:d4f19eb4 default
r45157:e7af56a0 default
Show More
debug.rs
26 lines | 884 B | application/rls-services+xml | RustLexer
// debug.rs
//
// Copyright 2020 Raphaël Gomès <rgomes@octobus.net>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
//! Module to get debug information about Rust extensions.
use cpython::{PyDict, PyModule, PyResult, Python};
/// Create the module, with `__package__` given from parent
pub fn init_module(py: Python, package: &str) -> PyResult<PyModule> {
let dotted_name = &format!("{}.debug", package);
let m = PyModule::new(py, dotted_name)?;
m.add(py, "__package__", package)?;
m.add(py, "__doc__", "Rust debugging information")?;
m.add(py, "re2_installed", cfg!(feature = "with-re2"))?;
let sys = PyModule::import(py, "sys")?;
let sys_modules: PyDict = sys.get(py, "modules")?.extract(py)?;
sys_modules.set_item(py, dotted_name, &m)?;
Ok(m)
}