feat: set message for multiple revsets

Allows to set the revision message of multiple revisions by passing
them as arguments. This only supports simple revisions, such as `@`,
`@-`, `xs`, and so on. Comple revisions such as `@..@-` are not
supported.

Fixes: #5
This commit is contained in:
2026-04-05 23:02:14 +02:00
parent e965a728a1
commit 1bab78cb20
17 changed files with 438 additions and 168 deletions
+16 -1
View File
@@ -14,4 +14,19 @@ use clap::Parser;
Jujutsu repository.\n\n\
This tool requires an interactive terminal (TTY)."
)]
pub struct Cli;
pub struct Cli {
/// The revision(s) whose description to edit (default: @)
#[arg(value_name = "REVSETS")]
revsets: Vec<String>,
}
impl Cli {
/// Returns the revsets to operate on, defaulting to `["@"]` if none provided
pub fn revsets(&self) -> Vec<&str> {
if self.revsets.is_empty() {
vec!["@"]
} else {
self.revsets.iter().map(|s| s.as_str()).collect()
}
}
}