diff --git a/cli/src/config/templates.toml b/cli/src/config/templates.toml index a24c3511b..04c4cda8a 100644 --- a/cli/src/config/templates.toml +++ b/cli/src/config/templates.toml @@ -133,8 +133,8 @@ concat( "Commit ID: " ++ commit_id ++ "\n", "Change ID: " ++ change_id ++ "\n", surround("Bookmarks: ", "\n", separate(" ", local_bookmarks, remote_bookmarks)), - surround("Tags: ", "\n", tags), - "Author: " ++ format_detailed_signature(author) ++ "\n", + surround("Tags : ", "\n", tags), + "Author : " ++ format_detailed_signature(author) ++ "\n", "Committer: " ++ format_detailed_signature(committer) ++ "\n", "\n", indent(" ", diff --git a/cli/tests/test_backout_command.rs b/cli/tests/test_backout_command.rs index 9b508da68..6c139f009 100644 --- a/cli/tests/test_backout_command.rs +++ b/cli/tests/test_backout_command.rs @@ -142,10 +142,10 @@ fn test_backout_multiple() { "###); // View the output of each backed out commit let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@+"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: 8ff3fbc2ccb0d66985f558c461d1643cebb4c7d6 Change ID: wqnwkozpkustnxypnnntnykwrqrkrpvv - Author: Test User (2001-02-03 08:05:19) + Author : Test User (2001-02-03 08:05:19) Committer: Test User (2001-02-03 08:05:19) Back out "e" @@ -156,12 +156,12 @@ fn test_backout_multiple() { 1 1: a 2 2: b 3 : c - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@++"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: d31d42e0267f6524d445348b1dd00926c62a6b57 Change ID: mouksmquosnpvwqrpsvvxtxpywpnxlss - Author: Test User (2001-02-03 08:05:19) + Author : Test User (2001-02-03 08:05:19) Committer: Test User (2001-02-03 08:05:19) Back out "c" @@ -170,12 +170,12 @@ fn test_backout_multiple() { Removed regular file b: 1 : b - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@+++"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: 6504c4ded177fba2334f76683d1aa643700d5073 Change ID: tqvpomtpwrqsylrpsxknultrymmqxmxv - Author: Test User (2001-02-03 08:05:19) + Author : Test User (2001-02-03 08:05:19) Committer: Test User (2001-02-03 08:05:19) Back out "b" @@ -185,7 +185,7 @@ fn test_backout_multiple() { Modified regular file a: 1 1: a 2 : b - "###); + "#); } fn get_log_output(test_env: &TestEnvironment, cwd: &Path) -> String { diff --git a/cli/tests/test_commit_template.rs b/cli/tests/test_commit_template.rs index bd51a9bd3..5958dd795 100644 --- a/cli/tests/test_commit_template.rs +++ b/cli/tests/test_commit_template.rs @@ -316,31 +316,31 @@ fn test_log_builtin_templates() { [EOF] "###); - insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#" Commit ID: dc31539712c7294d1d712cec63cef4504b94ca74 Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp Bookmarks: my-bookmark - Author: (no name set) <(no email set)> (2001-02-03 08:05:08) + Author : (no name set) <(no email set)> (2001-02-03 08:05:08) Committer: (no name set) <(no email set)> (2001-02-03 08:05:08) (no description set) Commit ID: 230dd059e1b059aefc0da06a2e5a7dbf22362f22 Change ID: qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu - Author: Test User (2001-02-03 08:05:07) + Author : Test User (2001-02-03 08:05:07) Committer: Test User (2001-02-03 08:05:07) (no description set) Commit ID: 0000000000000000000000000000000000000000 Change ID: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz - Author: (no name set) <(no email set)> (1970-01-01 11:00:00) + Author : (no name set) <(no email set)> (1970-01-01 11:00:00) Committer: (no name set) <(no email set)> (1970-01-01 11:00:00) (no description set) [EOF] - "###); + "#); } #[test] @@ -386,30 +386,29 @@ fn test_log_builtin_templates_colored() { "#); - insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#" @ Commit ID: dc31539712c7294d1d712cec63cef4504b94ca74 │ Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp │ Bookmarks: my-bookmark - │ Author: (no name set) <(no email set)> (2001-02-03 08:05:08) + │ Author : (no name set) <(no email set)> (2001-02-03 08:05:08) │ Committer: (no name set) <(no email set)> (2001-02-03 08:05:08) │ │  (no description set) │ ○ Commit ID: 230dd059e1b059aefc0da06a2e5a7dbf22362f22 │ Change ID: qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu - │ Author: Test User <test.user@example.com> (2001-02-03 08:05:07) + │ Author : Test User <test.user@example.com> (2001-02-03 08:05:07) │ Committer: Test User <test.user@example.com> (2001-02-03 08:05:07) │ │  (no description set) │ ◆ Commit ID: 0000000000000000000000000000000000000000 Change ID: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz - Author: (no name set) <(no email set)> (1970-01-01 11:00:00) + Author : (no name set) <(no email set)> (1970-01-01 11:00:00) Committer: (no name set) <(no email set)> (1970-01-01 11:00:00)  (no description set) - - "###); + "#); } #[test] @@ -455,30 +454,30 @@ fn test_log_builtin_templates_colored_debug() { <> "#); - insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#" <> <><><> │ <><><> │ <><><> - │ <><><><>< (>><><> + │ <><><><>< (>><><> │ <><><><>< (>><><> │ <> │ <><> │ <> <> <><><> │ <><><> - │ <><><><>< (>><><> + │ <><><><>< (>><><> │ <><><><>< (>><><> │ <> │ <><> │ <> <> <><><> <><><> - <><><><>< (>><><> + <><><><>< (>><><> <><><><>< (>><><> <> <><> <> - "###); + "#); } #[test] diff --git a/cli/tests/test_diff_command.rs b/cli/tests/test_diff_command.rs index 142bc7453..d2e0fd36d 100644 --- a/cli/tests/test_diff_command.rs +++ b/cli/tests/test_diff_command.rs @@ -2086,10 +2086,10 @@ fn test_diff_external_tool() { "###); insta::assert_snapshot!( - test_env.jj_cmd_success(&repo_path, &["show", "--tool=fake-diff-editor"]), @r###" + test_env.jj_cmd_success(&repo_path, &["show", "--tool=fake-diff-editor"]), @r#" Commit ID: 39d9055d70873099fd924b9af218289d5663eac8 Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -2099,7 +2099,7 @@ fn test_diff_external_tool() { -- file2 file3 - "###); + "#); // Enabled by default, looks up the merge-tools table let config = "--config-toml=ui.diff.tool='fake-diff-editor'"; @@ -2133,16 +2133,16 @@ fn test_diff_external_tool() { // Non-zero exit code isn't an error std::fs::write(&edit_script, "print diff\0fail").unwrap(); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["show", "--tool=fake-diff-editor"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: 39d9055d70873099fd924b9af218289d5663eac8 Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) diff - "###); + "#); insta::assert_snapshot!(stderr.replace("exit code:", "exit status:"), @r###" Warning: Tool exited with exit status: 1 (run with --debug to see the exact invocation) "###); @@ -2237,10 +2237,10 @@ fn test_diff_external_file_by_file_tool() { "###); insta::assert_snapshot!( - test_env.jj_cmd_success(&repo_path, &["show", config]), @r###" + test_env.jj_cmd_success(&repo_path, &["show", config]), @r#" Commit ID: 7b01704a670bc77d11ed117d362855cff1d4513b Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -2257,7 +2257,7 @@ fn test_diff_external_file_by_file_tool() { file1 -- file4 - "###); + "#); } #[cfg(unix)] diff --git a/cli/tests/test_show_command.rs b/cli/tests/test_show_command.rs index 49976414d..01ac6d350 100644 --- a/cli/tests/test_show_command.rs +++ b/cli/tests/test_show_command.rs @@ -26,12 +26,12 @@ fn test_show() { let stdout = test_env.jj_cmd_success(&repo_path, &["show"]); let stdout = stdout.lines().skip(2).join("\n"); - insta::assert_snapshot!(stdout, @r###" - Author: Test User (2001-02-03 08:05:07) + insta::assert_snapshot!(stdout, @r#" + Author : Test User (2001-02-03 08:05:07) Committer: Test User (2001-02-03 08:05:07) (no description set) - "###); + "#); } #[test] @@ -48,10 +48,10 @@ fn test_show_basic() { std::fs::write(repo_path.join("file3"), "foo\n").unwrap(); let stdout = test_env.jj_cmd_success(&repo_path, &["show"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -61,13 +61,13 @@ fn test_show_basic() { 2: bar 2 3: baz quxquux Modified regular file file3 (file1 => file3): - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--context=0"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -77,13 +77,13 @@ fn test_show_basic() { 2: bar 2 3: baz quxquux Modified regular file file3 (file1 => file3): - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--color=debug"]); insta::assert_snapshot!(stdout, @r#" Commit ID: <> Change ID: <> - Author: <> <<>> (<>) + Author : <> <<>> (<>) Committer: <> <<>> (<>) <> @@ -96,36 +96,36 @@ fn test_show_basic() { "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "-s"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) M file2 R {file1 => file3} - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--types"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) FF file2 FF {file1 => file3} - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--git"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -142,13 +142,13 @@ fn test_show_basic() { diff --git a/file1 b/file3 rename from file1 rename to file3 - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--git", "--context=0"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -164,13 +164,13 @@ fn test_show_basic() { diff --git a/file1 b/file3 rename from file1 rename to file3 - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--git", "--color=debug"]); insta::assert_snapshot!(stdout, @r#" Commit ID: <> Change ID: <> - Author: <> <<>> (<>) + Author : <> <<>> (<>) Committer: <> <<>> (<>) <> @@ -190,10 +190,10 @@ fn test_show_basic() { "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "-s", "--git"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -212,13 +212,13 @@ fn test_show_basic() { diff --git a/file1 b/file3 rename from file1 rename to file3 - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--stat"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp - Author: Test User (2001-02-03 08:05:09) + Author : Test User (2001-02-03 08:05:09) Committer: Test User (2001-02-03 08:05:09) (no description set) @@ -226,7 +226,7 @@ fn test_show_basic() { file2 | 3 ++- {file1 => file3} | 0 2 files changed, 2 insertions(+), 1 deletion(-) - "###); + "#); } #[test] @@ -294,10 +294,10 @@ fn test_show_relative_timestamps() { .map(|x| timestamp_re.replace_all(x, "(...timestamp...)")) .join("\n"); - insta::assert_snapshot!(stdout, @r###" - Author: Test User (...timestamp...) + insta::assert_snapshot!(stdout, @r#" + Author : Test User (...timestamp...) Committer: Test User (...timestamp...) (no description set) - "###); + "#); }