From a04e145f0658506936eb2eb814e96ce052abcfbc Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 23 Apr 2021 22:55:15 -0700 Subject: [PATCH] cli: make remaining messages start with uppercase for consitency --- src/commands.rs | 8 ++++---- tests/smoke_test.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index ab685de4e..20fb95656 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -244,7 +244,7 @@ fn update_working_copy( if old_commit == new_commit { return Ok(None); } - ui.write("leaving: ")?; + ui.write("Leaving: ")?; ui.write_commit_summary(repo.as_repo_ref(), &old_commit)?; ui.write("\n")?; // TODO: CheckoutError::ConcurrentCheckout should probably just result in a @@ -256,7 +256,7 @@ fn update_working_copy( err )) })?; - ui.write("now at: ")?; + ui.write("Now at: ")?; ui.write_commit_summary(repo.as_repo_ref(), &new_commit)?; ui.write("\n")?; Ok(Some(stats)) @@ -660,7 +660,7 @@ fn cmd_checkout( tx.commit(); let stats = update_working_copy(ui, &repo, &locked_wc)?; match stats { - None => ui.write("already on that commit\n")?, + None => ui.write("Already on that commit\n")?, Some(stats) => writeln!( ui, "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) .generate_new_change_id() .write_to_repo(mut_repo); - ui.write("created: ")?; + ui.write("Created: ")?; ui.write_commit_summary(mut_repo.as_repo_ref(), &new_commit)?; ui.write("\n")?; tx.commit(); diff --git a/tests/smoke_test.rs b/tests/smoke_test.rs index c93fcbbc4..a49abf359 100644 --- a/tests/smoke_test.rs +++ b/tests/smoke_test.rs @@ -91,7 +91,7 @@ fn smoke_test() { assert_eq!(output.status, 0); let stdout_string = output.stdout_string(); 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!( output_regex.is_match(&stdout_string), "output was: {}", @@ -103,7 +103,7 @@ fn smoke_test() { assert_eq!(output.status, 0); let stdout_string = output.stdout_string(); 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!( output_regex.is_match(&stdout_string), "output was: {}",