##// END OF EJS Templates
filemerge: rename _formatconflictmarker() since it formats a label...
filemerge: rename _formatconflictmarker() since it formats a label `_formatconflictmarker()`'s name made me think that it would create something like `<<<<<<<` and maybe some more stuff after it, but it's actually just the label that comes after on the same line. So let's rename it to `_formatlabel()`. That's better aligned with the variables the result is assigned it. Differential Revision: https://phab.mercurial-scm.org/D11801

File last commit:

r47335:5ce2aa7c default
r49169:1eeec02c default
Show More
debugrequirements.rs
22 lines | 625 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::App<'static, 'static> {
clap::SubCommand::with_name("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(())
}