##// END OF EJS Templates
rust-index: add fast-path for getting a list of all heads as nodes...
rust-index: add fast-path for getting a list of all heads as nodes This avoids a lot of back-and-forth between Python and Rust. We forgo adding a fast-path in the `filteredchangelog` case yet. If it shows up in profiling, we might add the variant with a filter.

File last commit:

r50534:37bc3ede default
r52155:f20c4b30 default
Show More
debugrequirements.rs
22 lines | 598 B | application/rls-services+xml | RustLexer
/ rust / rhg / src / commands / debugrequirements.rs
use crate::error::CommandError;
pub const HELP_TEXT: &str = "
Print the current repo requirements.
";
pub fn args() -> clap::Command {
clap::command!("debugrequirements").about(HELP_TEXT)
}
pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {
let repo = invocation.repo?;
let mut output = String::new();
let mut requirements: Vec<_> = repo.requirements().iter().collect();
requirements.sort();
for req in requirements {
output.push_str(req);
output.push('\n');
}
invocation.ui.write_stdout(output.as_bytes())?;
Ok(())
}