##// END OF EJS Templates
rhg: use a release-mode executable in tests...
rhg: use a release-mode executable in tests This allows the rhg build for test-rhg.t to share compiled dependencies such as hg-core with the hg-cpython build for other tests. For context, my wrapper script for the typical edit-compile-test cycle now looks like this: (cd rust && cargo +nightly-2020-10-04 fmt) (cd rust && cargo build --release -p rhg) make --silent local PURE=--rust python test/run-tests.py --local "$@" Differential Revision: https://phab.mercurial-scm.org/D9728

File last commit:

r46782:8a491439 default
r46845:e73b40c7 default
Show More
debugrequirements.rs
30 lines | 706 B | application/rls-services+xml | RustLexer
/ rust / rhg / src / commands / debugrequirements.rs
use crate::commands::Command;
use crate::error::CommandError;
use crate::ui::Ui;
use hg::repo::Repo;
use hg::requirements;
pub const HELP_TEXT: &str = "
Print the current repo requirements.
";
pub struct DebugRequirementsCommand {}
impl DebugRequirementsCommand {
pub fn new() -> Self {
DebugRequirementsCommand {}
}
}
impl Command for DebugRequirementsCommand {
fn run(&self, ui: &Ui) -> Result<(), CommandError> {
let repo = Repo::find()?;
let mut output = String::new();
for req in requirements::load(&repo)? {
output.push_str(&req);
output.push('\n');
}
ui.write_stdout(output.as_bytes())?;
Ok(())
}
}