ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: make remaining messages start with uppercase for consitency

This commit is contained in:
Martin von Zweigbergk 2021-04-23 22:55:15 -07:00
parent c6f6498cc9
commit a04e145f06
2 changed files with 6 additions and 6 deletions

View file

@ -244,7 +244,7 @@ fn update_working_copy(
if old_commit == new_commit { if old_commit == new_commit {
return Ok(None); return Ok(None);
} }
ui.write("leaving: ")?; ui.write("Leaving: ")?;
ui.write_commit_summary(repo.as_repo_ref(), &old_commit)?; ui.write_commit_summary(repo.as_repo_ref(), &old_commit)?;
ui.write("\n")?; ui.write("\n")?;
// TODO: CheckoutError::ConcurrentCheckout should probably just result in a // TODO: CheckoutError::ConcurrentCheckout should probably just result in a
@ -256,7 +256,7 @@ fn update_working_copy(
err err
)) ))
})?; })?;
ui.write("now at: ")?; ui.write("Now at: ")?;
ui.write_commit_summary(repo.as_repo_ref(), &new_commit)?; ui.write_commit_summary(repo.as_repo_ref(), &new_commit)?;
ui.write("\n")?; ui.write("\n")?;
Ok(Some(stats)) Ok(Some(stats))
@ -660,7 +660,7 @@ fn cmd_checkout(
tx.commit(); tx.commit();
let stats = update_working_copy(ui, &repo, &locked_wc)?; let stats = update_working_copy(ui, &repo, &locked_wc)?;
match stats { match stats {
None => ui.write("already on that commit\n")?, None => ui.write("Already on that commit\n")?,
Some(stats) => writeln!( Some(stats) => writeln!(
ui, ui,
"added {} files, modified {} files, removed {} files", "added {} files, modified {} files, removed {} files",
@ -1268,7 +1268,7 @@ fn cmd_duplicate(
let new_commit = CommitBuilder::for_rewrite_from(ui.settings(), repo.store(), &predecessor) let new_commit = CommitBuilder::for_rewrite_from(ui.settings(), repo.store(), &predecessor)
.generate_new_change_id() .generate_new_change_id()
.write_to_repo(mut_repo); .write_to_repo(mut_repo);
ui.write("created: ")?; ui.write("Created: ")?;
ui.write_commit_summary(mut_repo.as_repo_ref(), &new_commit)?; ui.write_commit_summary(mut_repo.as_repo_ref(), &new_commit)?;
ui.write("\n")?; ui.write("\n")?;
tx.commit(); tx.commit();

View file

@ -91,7 +91,7 @@ fn smoke_test() {
assert_eq!(output.status, 0); assert_eq!(output.status, 0);
let stdout_string = output.stdout_string(); let stdout_string = output.stdout_string();
let output_regex = let output_regex =
Regex::new("^leaving: [[:xdigit:]]+ \nnow at: [[:xdigit:]]+ add some files\n$").unwrap(); Regex::new("^Leaving: [[:xdigit:]]+ \nNow at: [[:xdigit:]]+ add some files\n$").unwrap();
assert!( assert!(
output_regex.is_match(&stdout_string), output_regex.is_match(&stdout_string),
"output was: {}", "output was: {}",
@ -103,7 +103,7 @@ fn smoke_test() {
assert_eq!(output.status, 0); assert_eq!(output.status, 0);
let stdout_string = output.stdout_string(); let stdout_string = output.stdout_string();
let output_regex = let output_regex =
Regex::new("^leaving: [[:xdigit:]]+ add some files\nnow at: [[:xdigit:]]+ \n$").unwrap(); Regex::new("^Leaving: [[:xdigit:]]+ add some files\nNow at: [[:xdigit:]]+ \n$").unwrap();
assert!( assert!(
output_regex.is_match(&stdout_string), output_regex.is_match(&stdout_string),
"output was: {}", "output was: {}",