##// END OF EJS Templates
copies: avoid unwanted side effect from one branch to another...
copies: avoid unwanted side effect from one branch to another Without this copy, change in a one descendant branch (With "remove" change only) could affect computation on another descendant branches. This was not caugh by the test because the test graph are "too simple". I started writing more test in that regards, but I a submitting this changes earlier because I want to get more code landed to allow other optimisation work to happens. Differential Revision: https://phab.mercurial-scm.org/D9416

File last commit:

r46536:a2eda1ff default
r46599:b6b7626d default
Show More
debugrequirements.rs
30 lines | 725 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::operations::FindRoot;
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 root = FindRoot::new().run()?;
let mut output = String::new();
for req in requirements::load(&root)? {
output.push_str(&req);
output.push('\n');
}
ui.write_stdout(output.as_bytes())?;
Ok(())
}
}