##// END OF EJS Templates
tests: demonstrate how continuing rebase after upgrade can result in merge...
tests: demonstrate how continuing rebase after upgrade can result in merge If the user starts a rebase with an hg version before 9c9cfecd4600 (rebase: don't use rebased node as dirstate p2 (BC), 2020-01-10) and then runs into conflicts, they will be dropped out to the shell with the rebased node set as the dirstate's second parent. If they then upgrade to a later hg version, it will respect the dirstate's parents and will create a merge commit even if the user was rebasing a non-merge commit. Differential Revision: https://phab.mercurial-scm.org/D8355

File last commit:

r45128:af739894 default
r45156:e89b3603 default
Show More
main.rs
38 lines | 1.4 KiB | application/rls-services+xml | RustLexer
use pyembed::MainPythonInterpreter;
// Include an auto-generated file containing the default
// `pyembed::PythonConfig` derived by the PyOxidizer configuration file.
//
// If you do not want to use PyOxidizer to generate this file, simply
// remove this line and instantiate your own instance of
// `pyembed::PythonConfig`.
include!(env!("PYOXIDIZER_DEFAULT_PYTHON_CONFIG_RS"));
fn main() {
// The following code is in a block so the MainPythonInterpreter is destroyed in an
// orderly manner, before process exit.
let code = {
// Load the default Python configuration as derived by the PyOxidizer config
// file used at build time.
let config = default_python_config();
// Construct a new Python interpreter using that config, handling any errors
// from construction.
match MainPythonInterpreter::new(config) {
Ok(mut interp) => {
// And run it using the default run configuration as specified by the
// configuration. If an uncaught Python exception is raised, handle it.
// This includes the special SystemExit, which is a request to terminate the
// process.
interp.run_as_main()
}
Err(msg) => {
eprintln!("{}", msg);
1
}
}
};
// And exit the process according to code execution results.
std::process::exit(code);
}