From f369749ce4661d95fa5afefa9b2c959020c13aaa Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Wed, 21 Aug 2024 13:53:44 -0700 Subject: [PATCH] =?UTF-8?q?log=20node=20template:=20mark=20empty=20un-conf?= =?UTF-8?q?licted=20commits=20with=20`=E2=97=8C`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is useful to see which merges resolve conflicts and to more easily sort WIP commits. Some ideas I thought about and decided against: - `∅` looked too messy - I considered using green for "empty", and yellow for "non-empty working copy", but I think the dotted circle is visible enough and making the working copy stand out is more important. - There's the option of using `○` for empty commits and `●` for non-empty, but I personally feel like so many `●`s would look too heavy. --- cli/src/config/templates.toml | 1 + cli/tests/test_advance_branches.rs | 150 ++++---- cli/tests/test_backout_command.rs | 12 +- cli/tests/test_branch_command.rs | 92 ++--- cli/tests/test_builtin_aliases.rs | 6 +- cli/tests/test_checkout.rs | 16 +- cli/tests/test_commit_command.rs | 12 +- cli/tests/test_commit_template.rs | 164 ++++----- cli/tests/test_concurrent_operations.rs | 18 +- cli/tests/test_describe_command.rs | 54 +-- cli/tests/test_git_colocated.rs | 118 +++---- cli/tests/test_git_init.rs | 6 +- cli/tests/test_git_push.rs | 16 +- cli/tests/test_git_remotes.rs | 6 +- cli/tests/test_init_command.rs | 6 +- cli/tests/test_log_command.rs | 140 ++++---- cli/tests/test_new_command.rs | 272 +++++++-------- cli/tests/test_next_prev_commands.rs | 440 ++++++++++++------------ cli/tests/test_obslog_command.rs | 48 +-- cli/tests/test_operations.rs | 8 +- cli/tests/test_parallelize_command.rs | 376 ++++++++++---------- cli/tests/test_rebase_command.rs | 12 +- cli/tests/test_resolve_command.rs | 6 +- cli/tests/test_split_command.rs | 36 +- cli/tests/test_squash_command.rs | 36 +- cli/tests/test_undo.rs | 12 +- cli/tests/test_workspaces.rs | 132 +++---- 27 files changed, 1098 insertions(+), 1097 deletions(-) diff --git a/cli/src/config/templates.toml b/cli/src/config/templates.toml index ecc199a0ca..5b2162a232 100644 --- a/cli/src/config/templates.toml +++ b/cli/src/config/templates.toml @@ -228,6 +228,7 @@ coalesce( if(current_working_copy, "@"), if(immutable, "◆"), if(conflict, "×"), + if(empty, "◌"), "○", ) ) diff --git a/cli/tests/test_advance_branches.rs b/cli/tests/test_advance_branches.rs index c32d9ac38f..c6d8011865 100644 --- a/cli/tests/test_advance_branches.rs +++ b/cli/tests/test_advance_branches.rs @@ -84,23 +84,23 @@ fn test_advance_branches_enabled(make_commit: CommitFn) { // Run jj commit, which will advance the branch pointing to @-. make_commit(&test_env, &workspace_path, "first"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{test_branch} desc: first + ◌ branches{test_branch} desc: first ◆ branches{} desc: - "###); + "#); } // Now disable advance branches and commit again. The branch shouldn't move. set_advance_branches(&test_env, false); make_commit(&test_env, &workspace_path, "second"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{} desc: second - ○ branches{test_branch} desc: first + ◌ branches{} desc: second + ◌ branches{test_branch} desc: first ◆ branches{} desc: - "###); + "#); } } @@ -125,11 +125,11 @@ fn test_advance_branches_at_minus(make_commit: CommitFn) { make_commit(&test_env, &workspace_path, "first"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{test_branch} desc: first + ◌ branches{test_branch} desc: first ◆ branches{} desc: - "###); + "#); } // Create a second branch pointing to @. On the next commit, only the first @@ -137,12 +137,12 @@ fn test_advance_branches_at_minus(make_commit: CommitFn) { test_env.jj_cmd_ok(&workspace_path, &["branch", "create", "test_branch2"]); make_commit(&test_env, &workspace_path, "second"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{test_branch test_branch2} desc: second - ○ branches{} desc: first + ◌ branches{test_branch test_branch2} desc: second + ◌ branches{} desc: first ◆ branches{} desc: - "###); + "#); } } @@ -172,11 +172,11 @@ fn test_advance_branches_overrides(make_commit: CommitFn) { // Commit will not advance the branch since advance-branches is disabled. make_commit(&test_env, &workspace_path, "first"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{} desc: first + ◌ branches{} desc: first ◆ branches{test_branch} desc: - "###); + "#); } // Now enable advance branches for "test_branch", move the branch, and commit @@ -191,20 +191,20 @@ fn test_advance_branches_overrides(make_commit: CommitFn) { &["branch", "set", "test_branch", "-r", "@-"], ); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{test_branch} desc: first + ◌ branches{test_branch} desc: first ◆ branches{} desc: - "###); + "#); } make_commit(&test_env, &workspace_path, "second"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{test_branch} desc: second - ○ branches{} desc: first + ◌ branches{test_branch} desc: second + ◌ branches{} desc: first ◆ branches{} desc: - "###); + "#); } // Now disable advance branches for "test_branch" and "second_branch", which @@ -217,13 +217,13 @@ fn test_advance_branches_overrides(make_commit: CommitFn) { ); make_commit(&test_env, &workspace_path, "third"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{} desc: third - ○ branches{test_branch} desc: second - ○ branches{} desc: first + ◌ branches{} desc: third + ◌ branches{test_branch} desc: second + ◌ branches{} desc: first ◆ branches{} desc: - "###); + "#); } // If we create a new branch at @- and move test_branch there as well. When @@ -237,24 +237,24 @@ fn test_advance_branches_overrides(make_commit: CommitFn) { &["branch", "set", "test_branch", "-r", "@-"], ); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{second_branch test_branch} desc: third - ○ branches{} desc: second - ○ branches{} desc: first + ◌ branches{second_branch test_branch} desc: third + ◌ branches{} desc: second + ◌ branches{} desc: first ◆ branches{} desc: - "###); + "#); } make_commit(&test_env, &workspace_path, "fourth"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{second_branch} desc: fourth - ○ branches{test_branch} desc: third - ○ branches{} desc: second - ○ branches{} desc: first + ◌ branches{second_branch} desc: fourth + ◌ branches{test_branch} desc: third + ◌ branches{} desc: second + ◌ branches{} desc: first ◆ branches{} desc: - "###); + "#); } } @@ -287,11 +287,11 @@ fn test_advance_branches_multiple_branches(make_commit: CommitFn) { // Both branches are eligible and both will advance. make_commit(&test_env, &workspace_path, "first"); insta::allow_duplicates! { - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{first_branch second_branch} desc: first + ◌ branches{first_branch second_branch} desc: first ◆ branches{} desc: - "###); + "#); } } @@ -319,23 +319,23 @@ fn test_new_advance_branches_interior() { &workspace_path, &["branch", "create", "-r", "@---", "test_branch"], ); - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{} desc: third - ○ branches{} desc: second - ○ branches{test_branch} desc: first + ◌ branches{} desc: third + ◌ branches{} desc: second + ◌ branches{test_branch} desc: first ◆ branches{} desc: - "###); + "#); test_env.jj_cmd_ok(&workspace_path, &["new", "-r", "@--"]); - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - │ ○ branches{} desc: third + │ ◌ branches{} desc: third ├─╯ - ○ branches{test_branch} desc: second - ○ branches{} desc: first + ◌ branches{test_branch} desc: second + ◌ branches{} desc: first ◆ branches{} desc: - "###); + "#); } // If the `--before` flag is passed to `jj new`, branches are not advanced. @@ -361,22 +361,22 @@ fn test_new_advance_branches_before() { &workspace_path, &["branch", "create", "-r", "@---", "test_branch"], ); - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{} desc: third - ○ branches{} desc: second - ○ branches{test_branch} desc: first + ◌ branches{} desc: third + ◌ branches{} desc: second + ◌ branches{test_branch} desc: first ◆ branches{} desc: - "###); + "#); test_env.jj_cmd_ok(&workspace_path, &["new", "--before", "@-"]); - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" - ○ branches{} desc: third + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" + ◌ branches{} desc: third @ branches{} desc: - ○ branches{} desc: second - ○ branches{test_branch} desc: first + ◌ branches{} desc: second + ◌ branches{test_branch} desc: first ◆ branches{} desc: - "###); + "#); } // If the `--after` flag is passed to `jj new`, branches are not advanced. @@ -400,11 +400,11 @@ fn test_new_advance_branches_after() { test_env.jj_cmd_ok(&workspace_path, &["describe", "-m", "first"]); test_env.jj_cmd_ok(&workspace_path, &["new", "--after", "@"]); - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: - ○ branches{} desc: first + ◌ branches{} desc: first ◆ branches{test_branch} desc: - "###); + "#); } #[test] @@ -423,26 +423,26 @@ fn test_new_advance_branches_merge_children() { ); // Check the initial state of the repo. - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: 2 - │ ○ branches{} desc: 1 + │ ◌ branches{} desc: 1 ├─╯ - ○ branches{test_branch} desc: 0 + ◌ branches{test_branch} desc: 0 ◆ branches{} desc: - "###); + "#); // The branch won't advance because `jj new` had multiple targets. test_env.jj_cmd_ok( &workspace_path, &["new", "description(1)", "description(2)"], ); - insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output_with_branches(&test_env, &workspace_path), @r#" @ branches{} desc: ├─╮ - │ ○ branches{} desc: 2 - ○ │ branches{} desc: 1 + │ ◌ branches{} desc: 2 + ◌ │ branches{} desc: 1 ├─╯ - ○ branches{test_branch} desc: 0 + ◌ branches{test_branch} desc: 0 ◆ branches{} desc: - "###); + "#); } diff --git a/cli/tests/test_backout_command.rs b/cli/tests/test_backout_command.rs index 73eb48e393..522594a035 100644 --- a/cli/tests/test_backout_command.rs +++ b/cli/tests/test_backout_command.rs @@ -109,21 +109,21 @@ fn test_backout_multiple() { create_commit(&test_env, &repo_path, "e", &["d"], &[("a", "a\nb\nc\n")]); // Test the setup - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 208f8612074a e - ○ ceeec03be46b d + ◌ ceeec03be46b d ○ 413337bbd11f c ○ 46cc97af6802 b ○ 2443ea76b0b1 a ◆ 000000000000 - "###); + "#); // Backout multiple commits let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["backout", "-r", "b", "-r", "c", "-r", "e"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(stderr, @""); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" ○ 6504c4ded177 Back out "b" │ │ This backs out commit 46cc97af6802301d8db381386e8485ff3ff24ae6. @@ -134,12 +134,12 @@ fn test_backout_multiple() { │ │ This backs out commit 208f8612074af4c219d06568a8e1f04f2e80dc25. @ 208f8612074a e - ○ ceeec03be46b d + ◌ ceeec03be46b d ○ 413337bbd11f c ○ 46cc97af6802 b ○ 2443ea76b0b1 a ◆ 000000000000 - "###); + "#); // View the output of each backed out commit let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@+"]); insta::assert_snapshot!(stdout, @r###" diff --git a/cli/tests/test_branch_command.rs b/cli/tests/test_branch_command.rs index c07006d915..ce4f9262c3 100644 --- a/cli/tests/test_branch_command.rs +++ b/cli/tests/test_branch_command.rs @@ -40,11 +40,11 @@ fn test_branch_multiple_names() { Moved 2 branches to zsuskuln 8bb159bc bar foo | (empty) (no description set) Hint: Use -r to specify the target revision. "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ bar foo 8bb159bc30a9 - ○ 230dd059e1b0 + ◌ 230dd059e1b0 ◆ 000000000000 - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["branch", "delete", "foo", "bar", "foo"]); @@ -52,11 +52,11 @@ fn test_branch_multiple_names() { insta::assert_snapshot!(stderr, @r###" Deleted 2 branches. "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 8bb159bc30a9 - ○ 230dd059e1b0 + ◌ 230dd059e1b0 ◆ 000000000000 - "###); + "#); // Hint should be omitted if -r is specified let (_stdout, stderr) = @@ -245,15 +245,15 @@ fn test_branch_move_matching() { test_env.jj_cmd_ok(&repo_path, &["new"]); test_env.jj_cmd_ok(&repo_path, &["branch", "create", "c1"]); test_env.jj_cmd_ok(&repo_path, &["new", "-mhead2"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ a2781dd9ee37 - ○ c1 f4f38657a3dd - ○ b1 f652c32197cf - │ ○ 6b5e840ea72b - │ ○ a1 a2 230dd059e1b0 + ◌ c1 f4f38657a3dd + ◌ b1 f652c32197cf + │ ◌ 6b5e840ea72b + │ ◌ a1 a2 230dd059e1b0 ├─╯ ◆ 000000000000 - "###); + "#); // The default could be considered "--from=all() glob:*", but is disabled let stderr = test_env.jj_cmd_cli_error(&repo_path, &["branch", "move"]); @@ -290,15 +290,15 @@ fn test_branch_move_matching() { Moved 2 branches to vruxwmqv a2781dd9 b1 c1 | (empty) head2 Hint: Specify branch by name to update just one of the branches. "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ b1 c1 a2781dd9ee37 - ○ f4f38657a3dd - ○ f652c32197cf - │ ○ 6b5e840ea72b - │ ○ a1 a2 230dd059e1b0 + ◌ f4f38657a3dd + ◌ f652c32197cf + │ ◌ 6b5e840ea72b + │ ◌ a1 a2 230dd059e1b0 ├─╯ ◆ 000000000000 - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["undo"]); // Try to move multiple branches, but one of them isn't fast-forward @@ -307,15 +307,15 @@ fn test_branch_move_matching() { Error: Refusing to move branch backwards or sideways: a1 Hint: Use --allow-backwards to allow it. "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ a2781dd9ee37 - ○ c1 f4f38657a3dd - ○ b1 f652c32197cf - │ ○ 6b5e840ea72b - │ ○ a1 a2 230dd059e1b0 + ◌ c1 f4f38657a3dd + ◌ b1 f652c32197cf + │ ◌ 6b5e840ea72b + │ ◌ a1 a2 230dd059e1b0 ├─╯ ◆ 000000000000 - "###); + "#); // Select by revision and name let (_stdout, stderr) = test_env.jj_cmd_ok( @@ -325,15 +325,15 @@ fn test_branch_move_matching() { insta::assert_snapshot!(stderr, @r###" Moved 1 branches to kkmpptxz 6b5e840e a1 | (empty) head1 "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ a2781dd9ee37 - ○ c1 f4f38657a3dd - ○ b1 f652c32197cf - │ ○ a1 6b5e840ea72b - │ ○ a2 230dd059e1b0 + ◌ c1 f4f38657a3dd + ◌ b1 f652c32197cf + │ ◌ a1 6b5e840ea72b + │ ◌ a2 230dd059e1b0 ├─╯ ◆ 000000000000 - "###); + "#); } #[test] @@ -361,15 +361,15 @@ fn test_branch_move_conflicting() { &repo_path, &["branch", "create", "--at-op=@-", "-rdescription(B0)", "foo"], ); - insta::assert_snapshot!(get_log(), @r###" + insta::assert_snapshot!(get_log(), @r#" @ A1 - ○ A0 foo?? - │ ○ C0 + ◌ A0 foo?? + │ ◌ C0 ├─╯ - │ ○ B0 foo?? + │ ◌ B0 foo?? ├─╯ ◆ - "###); + "#); // Can't move the branch to C0 since it's sibling. let stderr = @@ -386,15 +386,15 @@ fn test_branch_move_conflicting() { insta::assert_snapshot!(stderr, @r###" Moved 1 branches to mzvwutvl 9328d344 foo | (empty) A1 "###); - insta::assert_snapshot!(get_log(), @r###" + insta::assert_snapshot!(get_log(), @r#" @ A1 foo - ○ A0 - │ ○ C0 + ◌ A0 + │ ◌ C0 ├─╯ - │ ○ B0 + │ ◌ B0 ├─╯ ◆ - "###); + "#); } #[test] @@ -1433,18 +1433,18 @@ fn test_branch_list_filtered() { &local_path, &["log", "-r::(branches() | remote_branches())", "-T", template], ), - @r###" - ○ e31634b64294 remote-rewrite* + @r#" + ◌ e31634b64294 remote-rewrite* │ @ c7b4c09cd77c local-keep ├─╯ - │ ○ 3e9a5af6ef15 remote-rewrite@origin (hidden) + │ ◌ 3e9a5af6ef15 remote-rewrite@origin (hidden) ├─╯ - │ ○ dad5f298ca57 remote-delete@origin + │ ◌ dad5f298ca57 remote-delete@origin ├─╯ - │ ○ 911e912015fb remote-keep + │ ◌ 911e912015fb remote-keep ├─╯ ◆ 000000000000 - "###); + "#); // All branches are listed by default. let (stdout, stderr) = test_env.jj_cmd_ok(&local_path, &["branch", "list"]); diff --git a/cli/tests/test_builtin_aliases.rs b/cli/tests/test_builtin_aliases.rs index 52400c8501..86248bd7d0 100644 --- a/cli/tests/test_builtin_aliases.rs +++ b/cli/tests/test_builtin_aliases.rs @@ -146,11 +146,11 @@ fn test_builtin_user_redefines_builtin_immutable_heads() { test_env.add_config(r#"revset-aliases.'immutable()' = '@'"#); let (stdout, stderr) = test_env.jj_cmd_ok(&workspace_root, &["log", "-r", "trunk()"]); - insta::assert_snapshot!(stdout, @r###" - ○ xtvrqkyv test.user@example.com 2001-02-03 08:05:08 main d13ecdbd + insta::assert_snapshot!(stdout, @r#" + ◌ xtvrqkyv test.user@example.com 2001-02-03 08:05:08 main d13ecdbd │ (empty) description 1 ~ - "###); + "#); insta::assert_snapshot!(stderr, @r###" Warning: Redefining `revset-aliases.builtin_immutable_heads()` is not recommended; redefine `immutable_heads()` instead Warning: Redefining `revset-aliases.immutable()` is not recommended; redefine `immutable_heads()` instead diff --git a/cli/tests/test_checkout.rs b/cli/tests/test_checkout.rs index 9c64ec12f6..e976dda797 100644 --- a/cli/tests/test_checkout.rs +++ b/cli/tests/test_checkout.rs @@ -34,22 +34,22 @@ fn test_checkout() { Working copy now at: zsuskuln c97da310 (empty) (no description set) Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ c97da310c66008034013412d321397242e1e43ef - ○ 9ed53a4a1becd028f9a2fe0d5275973acea7e8da second - ○ fa15625b4a986997697639dfc2844138900c79f2 first + ◌ 9ed53a4a1becd028f9a2fe0d5275973acea7e8da second + ◌ fa15625b4a986997697639dfc2844138900c79f2 first ◆ 0000000000000000000000000000000000000000 - "###); + "#); // Can provide a description test_env.jj_cmd_ok(&repo_path, &["checkout", "@--", "-m", "my message"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 6f9c4a002224fde4ebc48ce6ec03d5ffcfa64ad2 my message - │ ○ 9ed53a4a1becd028f9a2fe0d5275973acea7e8da second + │ ◌ 9ed53a4a1becd028f9a2fe0d5275973acea7e8da second ├─╯ - ○ fa15625b4a986997697639dfc2844138900c79f2 first + ◌ fa15625b4a986997697639dfc2844138900c79f2 first ◆ 0000000000000000000000000000000000000000 - "###); + "#); } #[test] diff --git a/cli/tests/test_commit_command.rs b/cli/tests/test_commit_command.rs index 7c752c54c3..50472ecd06 100644 --- a/cli/tests/test_commit_command.rs +++ b/cli/tests/test_commit_command.rs @@ -24,11 +24,11 @@ fn test_commit_with_description_from_cli() { // Description applies to the current working-copy (not the new one) test_env.jj_cmd_ok(&workspace_path, &["commit", "-m=first"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ e8ea92a8b6b3 - ○ fa15625b4a98 first + ◌ fa15625b4a98 first ◆ 000000000000 - "###); + "#); } #[test] @@ -43,11 +43,11 @@ fn test_commit_with_editor() { let edit_script = test_env.set_up_fake_editor(); std::fs::write(&edit_script, ["dump editor0", "write\nmodified"].join("\0")).unwrap(); test_env.jj_cmd_ok(&workspace_path, &["commit"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ a57b2c95fb75 - ○ 159271101e05 modified + ◌ 159271101e05 modified ◆ 000000000000 - "###); + "#); insta::assert_snapshot!( std::fs::read_to_string(test_env.env_root().join("editor0")).unwrap(), @r###" initial diff --git a/cli/tests/test_commit_template.rs b/cli/tests/test_commit_template.rs index c711f14b78..68d21c5f5c 100644 --- a/cli/tests/test_commit_template.rs +++ b/cli/tests/test_commit_template.rs @@ -29,16 +29,16 @@ fn test_log_parents() { let template = r#"commit_id ++ "\nP: " ++ parents.len() ++ " " ++ parents.map(|c| c.commit_id()) ++ "\n""#; let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ c067170d4ca1bc6162b64f7550617ec809647f84 ├─╮ P: 2 4db490c88528133d579540b6900b8098f0c17701 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - ○ │ 4db490c88528133d579540b6900b8098f0c17701 + ◌ │ 4db490c88528133d579540b6900b8098f0c17701 ├─╯ P: 1 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - ○ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 + ◌ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 │ P: 1 0000000000000000000000000000000000000000 ◆ 0000000000000000000000000000000000000000 P: 0 - "###); + "#); let template = r#"parents.map(|c| c.commit_id().shortest(4))"#; let stdout = test_env.jj_cmd_success( @@ -87,11 +87,11 @@ fn test_log_author_timestamp() { test_env.jj_cmd_ok(&repo_path, &["new", "-m", "second"]); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "author.timestamp()"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ 2001-02-03 04:05:09.000 +07:00 - ○ 2001-02-03 04:05:08.000 +07:00 + ◌ 2001-02-03 04:05:08.000 +07:00 ◆ 1970-01-01 00:00:00.000 +00:00 - "###); + "#); } #[test] @@ -168,11 +168,11 @@ fn test_mine_is_true_when_author_is_user() { r#"coalesce(if(mine, "mine"), author.email(), email_placeholder)"#, ], ); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ johndoe@example.com - ○ mine + ◌ mine ◆ (no email set) - "###); + "#); } #[test] @@ -310,32 +310,32 @@ fn test_log_builtin_templates_colored() { ); test_env.jj_cmd_ok(&repo_path, &["branch", "create", "my-branch"]); - insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#" @ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-branch dc315397 (empty) (no description set) - ○ qpvuntsm test.user 2001-02-03 08:05:07 230dd059 (empty) (no description set) + ◌ qpvuntsm test.user 2001-02-03 08:05:07 230dd059 (empty) (no description set) ◆ zzzzzzzz root() 00000000 - "###); + "#); - insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#" @ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-branch dc315397 │ (empty) (no description set) - ○ qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059 + ◌ qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059 │ (empty) (no description set) ◆ zzzzzzzz root() 00000000 - "###); + "#); - insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#" @ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-branch dc315397 │ (empty) (no description set) │ - ○ qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059 + ◌ qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059 │ (empty) (no description set) │ ◆ zzzzzzzz root() 00000000 - "###); + "#); - insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#" @ Commit ID: dc31539712c7294d1d712cec63cef4504b94ca74 │ Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp │ Branches: my-branch @@ -344,7 +344,7 @@ fn test_log_builtin_templates_colored() { │ │  (no description set) │ - ○ Commit ID: 230dd059e1b059aefc0da06a2e5a7dbf22362f22 + ◌ Commit ID: 230dd059e1b059aefc0da06a2e5a7dbf22362f22 │ Change ID: qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu │ 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) @@ -358,7 +358,7 @@ fn test_log_builtin_templates_colored() {  (no description set) - "###); + "#); } #[test] @@ -379,32 +379,32 @@ fn test_log_builtin_templates_colored_debug() { ); test_env.jj_cmd_ok(&repo_path, &["branch", "create", "my-branch"]); - insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#" <> <><><><><><><><><><><><><><><><> - <> <><><><><><><><><><><><><><> + <> <><><><><><><><><><><><><><> <> <><><><><><><><> - "###); + "#); - insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#" <> <><><><><><><><><><><><> │ <><><><> - <> <><><><><><><><><><> + <> <><><><><><><><><><> │ <><><><> <> <><><><><><><><> - "###); + "#); - insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#" <> <><><><><><><><><><><><> │ <><><><> │ <> - <> <><><><><><><><><><> + <> <><><><><><><><><><> │ <><><><> │ <> <> <><><><><><><><> <> - "###); + "#); - insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" + insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#" <> <><><> │ <><><> │ <><><> @@ -413,7 +413,7 @@ fn test_log_builtin_templates_colored_debug() { │ <> │ <><> │ <> - <> <><><> + <> <><><> │ <><><> │ <><><><>< (>><><> │ <><><><>< (>><><> @@ -427,7 +427,7 @@ fn test_log_builtin_templates_colored_debug() { <> <><> <> - "###); + "#); } #[test] @@ -475,25 +475,25 @@ fn test_log_obslog_divergence() { // Obslog and hidden divergent let stdout = test_env.jj_cmd_success(&repo_path, &["obslog"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 ff309c29 │ description 1 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 485d52a9 │ (no description set) - ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 + ◌ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 (empty) (no description set) - "###); + "#); // Colored obslog let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "--color=always"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 ff309c29 │ description 1 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 485d52a9 │ (no description set) - ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 + ◌ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 (empty) (no description set) - "###); + "#); } #[test] @@ -545,45 +545,45 @@ fn test_log_branches() { let template = r#"commit_id.short() ++ " " ++ if(branches, branches, "(no branches)")"#; let output = test_env.jj_cmd_success(&workspace_root, &["log", "-T", template]); - insta::assert_snapshot!(output, @r###" - ○ fed794e2ba44 branch3?? branch3@origin - │ ○ b1bb3766d584 branch3?? + insta::assert_snapshot!(output, @r#" + ◌ fed794e2ba44 branch3?? branch3@origin + │ ◌ b1bb3766d584 branch3?? ├─╯ - │ ○ 28ff13ce7195 branch1* + │ ◌ 28ff13ce7195 branch1* ├─╯ │ @ a5b4d15489cc branch2* new-branch - │ ○ 8476341eb395 branch2@origin unchanged + │ ◌ 8476341eb395 branch2@origin unchanged ├─╯ ◆ 000000000000 (no branches) - "###); + "#); let template = r#"branches.map(|b| separate("/", b.remote(), b.name())).join(", ")"#; let output = test_env.jj_cmd_success(&workspace_root, &["log", "-T", template]); - insta::assert_snapshot!(output, @r###" - ○ branch3, origin/branch3 - │ ○ branch3 + insta::assert_snapshot!(output, @r#" + ◌ branch3, origin/branch3 + │ ◌ branch3 ├─╯ - │ ○ branch1 + │ ◌ branch1 ├─╯ │ @ branch2, new-branch - │ ○ origin/branch2, unchanged + │ ◌ origin/branch2, unchanged ├─╯ ◆ - "###); + "#); let template = r#"separate(" ", "L:", local_branches, "R:", remote_branches)"#; let output = test_env.jj_cmd_success(&workspace_root, &["log", "-T", template]); - insta::assert_snapshot!(output, @r###" - ○ L: branch3?? R: branch3@origin - │ ○ L: branch3?? R: + insta::assert_snapshot!(output, @r#" + ◌ L: branch3?? R: branch3@origin + │ ◌ L: branch3?? R: ├─╯ - │ ○ L: branch1* R: + │ ◌ L: branch1* R: ├─╯ │ @ L: branch2* new-branch R: - │ ○ L: unchanged R: branch2@origin unchanged@origin + │ ◌ L: unchanged R: branch2@origin unchanged@origin ├─╯ ◆ L: R: - "###); + "#); let template = r#" remote_branches.map(|ref| concat( @@ -597,14 +597,14 @@ fn test_log_branches() { &workspace_root, &["log", "-r::remote_branches()", "-T", template], ); - insta::assert_snapshot!(output, @r###" - ○ branch3@origin(+0/-1) - │ ○ branch2@origin(+0/-1) unchanged@origin(+0/-0) + insta::assert_snapshot!(output, @r#" + ◌ branch3@origin(+0/-1) + │ ◌ branch2@origin(+0/-1) unchanged@origin(+0/-0) ├─╯ - │ ○ branch1@origin(+1/-1) + │ ◌ branch1@origin(+1/-1) ├─╯ ◆ - "###); + "#); } #[test] @@ -624,20 +624,20 @@ fn test_log_git_head() { ) ++ "\n" "#; let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ remote: - ○ name: HEAD, remote: git + ◌ name: HEAD, remote: git ◆ remote: - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ rlvkpnrz test.user@example.com 2001-02-03 08:05:09 50aaf475 │ initial - ○ qpvuntsm test.user@example.com 2001-02-03 08:05:07 HEAD@git 230dd059 + ◌ qpvuntsm test.user@example.com 2001-02-03 08:05:07 HEAD@git 230dd059 │ (empty) (no description set) ◆ zzzzzzzz root() 00000000 - "###); + "#); } #[test] @@ -704,14 +704,14 @@ fn test_log_immutable() { test_env.add_config("revset-aliases.'immutable_heads()' = 'main'"); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-r::", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ D - │ ○ C + │ ◌ C │ ◆ B main [immutable] │ ◆ A [immutable] ├─╯ ◆ [immutable] - "###); + "#); // Suppress error that could be detected earlier test_env.add_config("revsets.short-prefixes = ''"); @@ -782,14 +782,14 @@ fn test_log_contained_in() { &template_for_revset(r#"description(A)::"#), ], ); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ D - │ ○ C [contained_in] - │ ○ B main [contained_in] - │ ○ A [contained_in] + │ ◌ C [contained_in] + │ ◌ B main [contained_in] + │ ◌ A [contained_in] ├─╯ ◆ - "###); + "#); let stdout = test_env.jj_cmd_success( &repo_path, @@ -800,14 +800,14 @@ fn test_log_contained_in() { &template_for_revset(r#"visible_heads()"#), ], ); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ D [contained_in] - │ ○ C [contained_in] - │ ○ B main - │ ○ A + │ ◌ C [contained_in] + │ ◌ B main + │ ◌ A ├─╯ ◆ - "###); + "#); // Suppress error that could be detected earlier let stderr = test_env.jj_cmd_failure( diff --git a/cli/tests/test_concurrent_operations.rs b/cli/tests/test_concurrent_operations.rs index 1c6e41be69..2f9b9d0618 100644 --- a/cli/tests/test_concurrent_operations.rs +++ b/cli/tests/test_concurrent_operations.rs @@ -52,12 +52,12 @@ fn test_concurrent_operation_divergence() { // We should be informed about the concurrent modification let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["log", "-T", "description"]); - insta::assert_snapshot!(stdout, @r###" - ○ message 2 + insta::assert_snapshot!(stdout, @r#" + ◌ message 2 │ @ message 1 ├─╯ ◆ - "###); + "#); insta::assert_snapshot!(stderr, @r###" Concurrent modification detected, resolving automatically. "###); @@ -95,11 +95,11 @@ fn test_concurrent_operations_auto_rebase() { // We should be informed about the concurrent modification let (stdout, stderr) = get_log_output_with_stderr(&test_env, &repo_path); - insta::assert_snapshot!(stdout, @r###" - ○ db141860e12c2d5591c56fde4fc99caf71cec418 new child + insta::assert_snapshot!(stdout, @r#" + ◌ db141860e12c2d5591c56fde4fc99caf71cec418 new child @ 07c3641e495cce57ea4ca789123b52f421c57aa2 rewritten ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!(stderr, @r###" Concurrent modification detected, resolving automatically. Rebased 1 descendant commits onto commits rewritten by other operation @@ -129,13 +129,13 @@ fn test_concurrent_operations_wc_modified() { // We should be informed about the concurrent modification let (stdout, stderr) = get_log_output_with_stderr(&test_env, &repo_path); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ 4eadcf3df11f46ef3d825c776496221cc8303053 new child1 - │ ○ 68119f1643b7e3c301c5f7c2b6c9bf4ccba87379 new child2 + │ ◌ 68119f1643b7e3c301c5f7c2b6c9bf4ccba87379 new child2 ├─╯ ○ 2ff7ae858a3a11837fdf9d1a76be295ef53f1bb3 initial ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!(stderr, @r###" Concurrent modification detected, resolving automatically. "###); diff --git a/cli/tests/test_describe_command.rs b/cli/tests/test_describe_command.rs index 9a01287762..54a43ae0e8 100644 --- a/cli/tests/test_describe_command.rs +++ b/cli/tests/test_describe_command.rs @@ -186,12 +186,12 @@ fn test_describe_multiple_commits() { // Initial setup test_env.jj_cmd_ok(&repo_path, &["new"]); test_env.jj_cmd_ok(&repo_path, &["new"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ c6349e79bbfd - ○ 65b6b74e0897 - ○ 230dd059e1b0 + ◌ 65b6b74e0897 + ◌ 230dd059e1b0 ◆ 000000000000 - "###); + "#); // Set the description of multiple commits using `-m` flag let (stdout, stderr) = test_env.jj_cmd_ok( @@ -205,12 +205,12 @@ fn test_describe_multiple_commits() { Working copy now at: kkmpptxz 41659b84 (empty) description from CLI Parent commit : rlvkpnrz 8d650510 (empty) (no description set) "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 41659b846096 description from CLI - ○ 8d650510daad - ○ a42f5755e688 description from CLI + ◌ 8d650510daad + ◌ a42f5755e688 description from CLI ◆ 000000000000 - "###); + "#); // Check that the text file gets initialized with the current description of // each commit and doesn't update commits if no changes are made. @@ -266,16 +266,16 @@ fn test_describe_multiple_commits() { Working copy now at: kkmpptxz f203494a (empty) description from editor of @ Parent commit : rlvkpnrz 0d76a92c (empty) description from editor of @- "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ f203494a4507 description from editor of @ │ │ further commit message of @ - ○ 0d76a92ca7cc description from editor of @- + ◌ 0d76a92ca7cc description from editor of @- │ │ further commit message of @- - ○ a42f5755e688 description from CLI + ◌ a42f5755e688 description from CLI ◆ 000000000000 - "###); + "#); // Fails if the edited message has a commit with multiple descriptions std::fs::write( @@ -511,17 +511,17 @@ fn test_describe_author() { test_env.jj_cmd_ok(&repo_path, &["new"]); test_env.jj_cmd_ok(&repo_path, &["new"]); test_env.jj_cmd_ok(&repo_path, &["new"]); - insta::assert_snapshot!(get_signatures(), @r###" + insta::assert_snapshot!(get_signatures(), @r#" @ Test User test.user@example.com 2001-02-03 04:05:10.000 +07:00 │ Test User test.user@example.com 2001-02-03 04:05:10.000 +07:00 - ○ Test User test.user@example.com 2001-02-03 04:05:09.000 +07:00 + ◌ Test User test.user@example.com 2001-02-03 04:05:09.000 +07:00 │ Test User test.user@example.com 2001-02-03 04:05:09.000 +07:00 - ○ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 + ◌ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 │ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 - ○ Test User test.user@example.com 2001-02-03 04:05:07.000 +07:00 + ◌ Test User test.user@example.com 2001-02-03 04:05:07.000 +07:00 │ Test User test.user@example.com 2001-02-03 04:05:07.000 +07:00 ~ - "###); + "#); // Reset the author for the latest commit (the committer is always reset) test_env.jj_cmd_ok( @@ -535,17 +535,17 @@ fn test_describe_author() { "--reset-author", ], ); - insta::assert_snapshot!(get_signatures(), @r###" + insta::assert_snapshot!(get_signatures(), @r#" @ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:12.000 +07:00 │ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:12.000 +07:00 - ○ Test User test.user@example.com 2001-02-03 04:05:09.000 +07:00 + ◌ Test User test.user@example.com 2001-02-03 04:05:09.000 +07:00 │ Test User test.user@example.com 2001-02-03 04:05:09.000 +07:00 - ○ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 + ◌ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 │ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 - ○ Test User test.user@example.com 2001-02-03 04:05:07.000 +07:00 + ◌ Test User test.user@example.com 2001-02-03 04:05:07.000 +07:00 │ Test User test.user@example.com 2001-02-03 04:05:07.000 +07:00 ~ - "###); + "#); // Reset the author for multiple commits (the committer is always reset) test_env.jj_cmd_ok( @@ -561,17 +561,17 @@ fn test_describe_author() { "--reset-author", ], ); - insta::assert_snapshot!(get_signatures(), @r###" + insta::assert_snapshot!(get_signatures(), @r#" @ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 │ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 - ○ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 + ◌ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 │ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 - ○ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 + ◌ Test User test.user@example.com 2001-02-03 04:05:08.000 +07:00 │ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 - ○ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 + ◌ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 │ Ove Ridder ove.ridder@example.com 2001-02-03 04:05:14.000 +07:00 ~ - "###); + "#); } #[test] diff --git a/cli/tests/test_git_colocated.rs b/cli/tests/test_git_colocated.rs index fa523fdba7..18d3ef5699 100644 --- a/cli/tests/test_git_colocated.rs +++ b/cli/tests/test_git_colocated.rs @@ -316,13 +316,13 @@ fn test_git_colocated_branches() { test_env.jj_cmd_ok(&workspace_root, &["git", "init", "--git-repo", "."]); test_env.jj_cmd_ok(&workspace_root, &["new", "-m", "foo"]); test_env.jj_cmd_ok(&workspace_root, &["new", "@-", "-m", "bar"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r#" @ 3560559274ab431feea00b7b7e0b9250ecce951f bar - │ ○ 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda foo + │ ◌ 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda foo ├─╯ - ○ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git + ◌ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git ◆ 0000000000000000000000000000000000000000 - "###); + "#); // Create a branch in jj. It should be exported to Git even though it points to // the working- copy commit. @@ -350,13 +350,13 @@ fn test_git_colocated_branches() { ) .unwrap(); let (stdout, stderr) = get_log_output_with_stderr(&test_env, &workspace_root); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ 096dc80da67094fbaa6683e2a205dddffa31f9a8 - │ ○ 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda master foo + │ ◌ 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda master foo ├─╯ - ○ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git + ◌ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!(stderr, @r###" Abandoned 1 commits that are no longer reachable. Working copy now at: yqosqzyt 096dc80d (empty) (no description set) @@ -373,11 +373,11 @@ fn test_git_colocated_branch_forget() { test_env.jj_cmd_ok(&workspace_root, &["git", "init", "--git-repo", "."]); test_env.jj_cmd_ok(&workspace_root, &["new"]); test_env.jj_cmd_ok(&workspace_root, &["branch", "create", "foo"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r#" @ 65b6b74e08973b88d38404430f119c8c79465250 foo - ○ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git + ◌ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!(get_branch_output(&test_env, &workspace_root), @r###" foo: rlvkpnrz 65b6b74e (empty) (no description set) @git: rlvkpnrz 65b6b74e (empty) (no description set) @@ -524,15 +524,15 @@ fn test_git_colocated_fetch_deleted_or_moved_branch() { git2::Repository::clone(origin_path.to_str().unwrap(), &clone_path).unwrap(); test_env.jj_cmd_ok(&clone_path, &["git", "init", "--git-repo=."]); test_env.jj_cmd_ok(&clone_path, &["new", "A"]); - insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r#" @ 9c2de797c3c299a40173c5af724329012b77cbdd - │ ○ 4a191a9013d3f3398ccf5e172792a61439dbcf3a C_to_move original C + │ ◌ 4a191a9013d3f3398ccf5e172792a61439dbcf3a C_to_move original C ├─╯ - │ ○ c49ec4fb50844d0e693f1609da970b11878772ee B_to_delete B_to_delete + │ ◌ c49ec4fb50844d0e693f1609da970b11878772ee B_to_delete B_to_delete ├─╯ ◆ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 A HEAD@git A ◆ 0000000000000000000000000000000000000000 - "###); + "#); test_env.jj_cmd_ok(&origin_path, &["branch", "delete", "B_to_delete"]); // Move branch C sideways @@ -546,13 +546,13 @@ fn test_git_colocated_fetch_deleted_or_moved_branch() { "###); // "original C" and "B_to_delete" are abandoned, as the corresponding branches // were deleted or moved on the remote (#864) - insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r###" - ○ 4f3d13296f978cbc351c46a43b4619c91b888475 C_to_move moved C + insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r#" + ◌ 4f3d13296f978cbc351c46a43b4619c91b888475 C_to_move moved C │ @ 9c2de797c3c299a40173c5af724329012b77cbdd ├─╯ ◆ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 A HEAD@git A ◆ 0000000000000000000000000000000000000000 - "###); + "#); } #[test] @@ -621,13 +621,13 @@ fn test_git_colocated_external_checkout() { test_env.jj_cmd_ok(&repo_path, &["new"]); // Checked out anonymous branch - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ f8a23336e41840ed1757ef323402a770427dc89a - ○ eccedddfa5152d99fc8ddd1081b375387a8a382a HEAD@git B - │ ○ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master A + ◌ eccedddfa5152d99fc8ddd1081b375387a8a382a HEAD@git B + │ ◌ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master A ├─╯ ◆ 0000000000000000000000000000000000000000 - "###); + "#); // Check out another branch by external command git_check_out_ref("refs/heads/master"); @@ -635,13 +635,13 @@ fn test_git_colocated_external_checkout() { // The old working-copy commit gets abandoned, but the whole branch should not // be abandoned. (#1042) let (stdout, stderr) = get_log_output_with_stderr(&test_env, &repo_path); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ 8bb9e8d42a37c2a4e8dcfad97fce0b8f49bc7afa - ○ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master HEAD@git A - │ ○ eccedddfa5152d99fc8ddd1081b375387a8a382a B + ◌ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master HEAD@git A + │ ◌ eccedddfa5152d99fc8ddd1081b375387a8a382a B ├─╯ ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!(stderr, @r###" Reset the working copy parent to the new Git HEAD. "###); @@ -649,29 +649,29 @@ fn test_git_colocated_external_checkout() { // Edit non-head commit test_env.jj_cmd_ok(&repo_path, &["new", "description(B)"]); test_env.jj_cmd_ok(&repo_path, &["new", "-m=C", "--no-edit"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ 99a813753d6db988d8fc436b0d6b30a54d6b2707 C + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ 99a813753d6db988d8fc436b0d6b30a54d6b2707 C @ 81e086b7f9b1dd7fde252e28bdcf4ba4abd86ce5 - ○ eccedddfa5152d99fc8ddd1081b375387a8a382a HEAD@git B - │ ○ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master A + ◌ eccedddfa5152d99fc8ddd1081b375387a8a382a HEAD@git B + │ ◌ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master A ├─╯ ◆ 0000000000000000000000000000000000000000 - "###); + "#); // Check out another branch by external command git_check_out_ref("refs/heads/master"); // The old working-copy commit shouldn't be abandoned. (#3747) let (stdout, stderr) = get_log_output_with_stderr(&test_env, &repo_path); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ ca2a4e32f08688c6fb795c4c034a0a7e09c0d804 - ○ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master HEAD@git A - │ ○ 99a813753d6db988d8fc436b0d6b30a54d6b2707 C - │ ○ 81e086b7f9b1dd7fde252e28bdcf4ba4abd86ce5 - │ ○ eccedddfa5152d99fc8ddd1081b375387a8a382a B + ◌ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 master HEAD@git A + │ ◌ 99a813753d6db988d8fc436b0d6b30a54d6b2707 C + │ ◌ 81e086b7f9b1dd7fde252e28bdcf4ba4abd86ce5 + │ ◌ eccedddfa5152d99fc8ddd1081b375387a8a382a B ├─╯ ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!(stderr, @r###" Reset the working copy parent to the new Git HEAD. "###); @@ -685,26 +685,26 @@ fn test_git_colocated_squash_undo() { test_env.jj_cmd_ok(&repo_path, &["git", "init", "--git-repo=."]); test_env.jj_cmd_ok(&repo_path, &["ci", "-m=A"]); // Test the setup - insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r#" @ rlvkpnrzqnoo 9670380ac379 - ○ qpvuntsmwlqt a7e4cec4256b A HEAD@git + ◌ qpvuntsmwlqt a7e4cec4256b A HEAD@git ◆ zzzzzzzzzzzz 000000000000 - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["squash"]); - insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r#" @ zsuskulnrvyr 6ee662324e5a - ○ qpvuntsmwlqt 13ab6b96d82e A HEAD@git + ◌ qpvuntsmwlqt 13ab6b96d82e A HEAD@git ◆ zzzzzzzzzzzz 000000000000 - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["undo"]); // TODO: There should be no divergence here; 2f376ea1478c should be hidden // (#922) - insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r#" @ rlvkpnrzqnoo 9670380ac379 - ○ qpvuntsmwlqt a7e4cec4256b A HEAD@git + ◌ qpvuntsmwlqt a7e4cec4256b A HEAD@git ◆ zzzzzzzzzzzz 000000000000 - "###); + "#); } #[test] @@ -719,11 +719,11 @@ fn test_git_colocated_undo_head_move() { insta::assert_snapshot!( git_repo.head().unwrap().target().unwrap().to_string(), @"230dd059e1b059aefc0da06a2e5a7dbf22362f22"); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 65b6b74e08973b88d38404430f119c8c79465250 - ○ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git + ◌ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git ◆ 0000000000000000000000000000000000000000 - "###); + "#); // HEAD should be unset test_env.jj_cmd_ok(&repo_path, &["undo"]); @@ -736,12 +736,12 @@ fn test_git_colocated_undo_head_move() { // Create commit on non-root commit test_env.jj_cmd_ok(&repo_path, &["new"]); test_env.jj_cmd_ok(&repo_path, &["new"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 69b19f73cf584f162f078fb0d91c55ca39d10bc7 - ○ eb08b363bb5ef8ee549314260488980d7bbe8f63 HEAD@git - ○ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 + ◌ eb08b363bb5ef8ee549314260488980d7bbe8f63 HEAD@git + ◌ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!( git_repo.head().unwrap().target().unwrap().to_string(), @"eb08b363bb5ef8ee549314260488980d7bbe8f63"); @@ -756,11 +756,11 @@ fn test_git_colocated_undo_head_move() { insta::assert_snapshot!( git_repo.head().unwrap().target().unwrap().to_string(), @"230dd059e1b059aefc0da06a2e5a7dbf22362f22"); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ eb08b363bb5ef8ee549314260488980d7bbe8f63 - ○ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git + ◌ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 HEAD@git ◆ 0000000000000000000000000000000000000000 - "###); + "#); } fn get_log_output_divergence(test_env: &TestEnvironment, repo_path: &Path) -> String { @@ -845,11 +845,11 @@ fn test_git_colocated_unreachable_commits() { // Import the repo while there is no path to the second commit test_env.jj_cmd_ok(&workspace_root, &["git", "init", "--git-repo", "."]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r#" @ 66ae47cee4f8c28ee8d7e4f5d9401b03c07e22f2 - ○ 2ee37513d2b5e549f7478c671a780053614bff19 master HEAD@git initial + ◌ 2ee37513d2b5e549f7478c671a780053614bff19 master HEAD@git initial ◆ 0000000000000000000000000000000000000000 - "###); + "#); insta::assert_snapshot!( git_repo.head().unwrap().peel_to_commit().unwrap().id().to_string(), @"2ee37513d2b5e549f7478c671a780053614bff19" diff --git a/cli/tests/test_git_init.rs b/cli/tests/test_git_init.rs index bfa8fd88e9..c29c918c11 100644 --- a/cli/tests/test_git_init.rs +++ b/cli/tests/test_git_init.rs @@ -693,11 +693,11 @@ fn test_git_init_external_but_git_dir_exists() { // Check that Git HEAD is not set because this isn't a colocated repo test_env.jj_cmd_ok(&workspace_root, &["new"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r#" @ 4db490c88528 - ○ 230dd059e1b0 + ◌ 230dd059e1b0 ◆ 000000000000 - "###); + "#); } #[test] diff --git a/cli/tests/test_git_push.rs b/cli/tests/test_git_push.rs index 7e3cfe75f1..4e44e1b161 100644 --- a/cli/tests/test_git_push.rs +++ b/cli/tests/test_git_push.rs @@ -558,15 +558,15 @@ fn test_git_push_multiple() { @origin: yqosqzyt c4a3c310 (empty) foo "###); let stdout = test_env.jj_cmd_success(&workspace_root, &["log", "-rall()"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ yqosqzyt test.user@example.com 2001-02-03 08:05:17 branch2 my-branch c4a3c310 │ (empty) foo - │ ○ rlzusymt test.user@example.com 2001-02-03 08:05:10 8476341e + │ ◌ rlzusymt test.user@example.com 2001-02-03 08:05:10 8476341e ├─╯ (empty) description 2 - │ ○ xtvrqkyv test.user@example.com 2001-02-03 08:05:08 d13ecdbd + │ ◌ xtvrqkyv test.user@example.com 2001-02-03 08:05:08 d13ecdbd ├─╯ (empty) description 1 ◆ zzzzzzzz root() 00000000 - "###); + "#); } #[test] @@ -1027,15 +1027,15 @@ fn test_git_push_deleted() { Delete branch branch1 from d13ecdbda2a2 "###); let stdout = test_env.jj_cmd_success(&workspace_root, &["log", "-rall()"]); - insta::assert_snapshot!(stdout, @r###" - ○ rlzusymt test.user@example.com 2001-02-03 08:05:10 branch2 8476341e + insta::assert_snapshot!(stdout, @r#" + ◌ rlzusymt test.user@example.com 2001-02-03 08:05:10 branch2 8476341e │ (empty) description 2 - │ ○ xtvrqkyv test.user@example.com 2001-02-03 08:05:08 d13ecdbd + │ ◌ xtvrqkyv test.user@example.com 2001-02-03 08:05:08 d13ecdbd ├─╯ (empty) description 1 │ @ yqosqzyt test.user@example.com 2001-02-03 08:05:13 5b36783c ├─╯ (empty) (no description set) ◆ zzzzzzzz root() 00000000 - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&workspace_root, &["git", "push", "--deleted"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(stderr, @r###" diff --git a/cli/tests/test_git_remotes.rs b/cli/tests/test_git_remotes.rs index 94fc297611..c2ae91da43 100644 --- a/cli/tests/test_git_remotes.rs +++ b/cli/tests/test_git_remotes.rs @@ -231,9 +231,9 @@ fn test_git_remote_named_git() { "###); // @git branch shouldn't be removed. let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-rmain@git", "-Tbranches"]); - insta::assert_snapshot!(stdout, @r###" - ○ main + insta::assert_snapshot!(stdout, @r#" + ◌ main │ ~ - "###); + "#); } diff --git a/cli/tests/test_init_command.rs b/cli/tests/test_init_command.rs index 1f2d044a2a..838be8a71a 100644 --- a/cli/tests/test_init_command.rs +++ b/cli/tests/test_init_command.rs @@ -483,11 +483,11 @@ fn test_init_git_external_but_git_dir_exists() { // Check that Git HEAD is not set because this isn't a colocated repo test_env.jj_cmd_ok(&workspace_root, &["new"]); let stdout = test_env.jj_cmd_success(&workspace_root, &["log", "-r", "@-"]); - insta::assert_snapshot!(stdout, @r###" - ○ qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059 + insta::assert_snapshot!(stdout, @r#" + ◌ qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059 │ (empty) (no description set) ~ - "###); + "#); } #[test] diff --git a/cli/tests/test_log_command.rs b/cli/tests/test_log_command.rs index d617bda7a4..d85aff0da6 100644 --- a/cli/tests/test_log_command.rs +++ b/cli/tests/test_log_command.rs @@ -764,11 +764,11 @@ fn test_log_reversed() { test_env.jj_cmd_ok(&repo_path, &["new", "-m", "second"]); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description", "--reversed"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" ◆ - ○ first + ◌ first @ second - "###); + "#); let stdout = test_env.jj_cmd_success( &repo_path, @@ -1104,27 +1104,27 @@ fn test_multiple_revsets() { insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["log", "-T", "branches", "-rfoo"]), - @r###" - ○ foo + @r#" + ◌ foo │ ~ - "###); + "#); insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["log", "-T", "branches", "-rfoo", "-rbar", "-rbaz"]), - @r###" + @r#" @ baz - ○ bar - ○ foo + ◌ bar + ◌ foo │ ~ - "###); + "#); insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["log", "-T", "branches", "-rfoo", "-rfoo"]), - @r###" - ○ foo + @r#" + ◌ foo │ ~ - "###); + "#); } #[test] @@ -1150,29 +1150,29 @@ fn test_graph_template_color() { // First test without color for comparison let template = r#"label(if(current_working_copy, "working_copy"), description)"#; let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ single line - ○ first line + ◌ first line │ second line │ third line ◆ - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["--color=always", "log", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ single line - ○ first line + ◌ first line │ second line │ third line ◆ - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["--color=debug", "log", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" <> <> - <> <> + <> <> │ <> │ <> <> - "###); + "#); } #[test] @@ -1196,19 +1196,19 @@ fn test_graph_styles() { // Default (curved) style let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T=description"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ merge ├─╮ - │ ○ side branch + │ ◌ side branch │ │ with │ │ long │ │ description - │ ○ main branch 2 + │ ◌ main branch 2 ├─╯ - ○ main branch 1 - ○ initial + ◌ main branch 1 + ◌ initial ◆ - "###); + "#); // ASCII style test_env.add_config(r#"ui.graph.style = "ascii""#); @@ -1249,36 +1249,36 @@ fn test_graph_styles() { // Curved style test_env.add_config(r#"ui.graph.style = "curved""#); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T=description"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ merge ├─╮ - │ ○ side branch + │ ◌ side branch │ │ with │ │ long │ │ description - │ ○ main branch 2 + │ ◌ main branch 2 ├─╯ - ○ main branch 1 - ○ initial + ◌ main branch 1 + ◌ initial ◆ - "###); + "#); // Square style test_env.add_config(r#"ui.graph.style = "square""#); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T=description"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ merge ├─┐ - │ ○ side branch + │ ◌ side branch │ │ with │ │ long │ │ description - │ ○ main branch 2 + │ ◌ main branch 2 ├─┘ - ○ main branch 1 - ○ initial + ◌ main branch 1 + ◌ initial ◆ - "###); + "#); } #[test] @@ -1335,26 +1335,26 @@ fn test_log_word_wrap() { // Graph width should be subtracted from the term width let template = r#""0 1 2 3 4 5 6 7 8 9""#; - insta::assert_snapshot!(render(&["log", "-T", template], 10, true), @r###" + insta::assert_snapshot!(render(&["log", "-T", template], 10, true), @r#" @ 0 1 2 ├─╮ 3 4 5 │ │ 6 7 8 │ │ 9 - │ ○ 0 1 2 + │ ◌ 0 1 2 │ │ 3 4 5 │ │ 6 7 8 │ │ 9 - │ ○ 0 1 2 + │ ◌ 0 1 2 ├─╯ 3 4 5 │ 6 7 8 │ 9 - ○ 0 1 2 3 + ◌ 0 1 2 3 │ 4 5 6 7 │ 8 9 ◆ 0 1 2 3 4 5 6 7 8 9 - "###); + "#); // Shouldn't panic with $COLUMNS < graph_width insta::assert_snapshot!(render(&["log", "-r@"], 0, true), @r###" @@ -1449,78 +1449,78 @@ fn test_elided() { }; // Test the setup - insta::assert_snapshot!(get_log("::"), @r###" + insta::assert_snapshot!(get_log("::"), @r#" @ merge ├─╮ - │ ○ side branch 2 + │ ◌ side branch 2 │ │ - │ ○ side branch 1 + │ ◌ side branch 1 │ │ - ○ │ main branch 2 + ◌ │ main branch 2 │ │ - ○ │ main branch 1 + ◌ │ main branch 1 ├─╯ - ○ initial + ◌ initial │ ◆ - "###); + "#); // Elide some commits from each side of the merge. It's unclear that a revision // was skipped on the left side. test_env.add_config("ui.log-synthetic-elided-nodes = false"); - insta::assert_snapshot!(get_log("@ | @- | description(initial)"), @r###" + insta::assert_snapshot!(get_log("@ | @- | description(initial)"), @r#" @ merge ├─╮ - │ ○ side branch 2 + │ ◌ side branch 2 │ ╷ - ○ ╷ main branch 2 + ◌ ╷ main branch 2 ├─╯ - ○ initial + ◌ initial │ ~ - "###); + "#); // Elide shared commits. It's unclear that a revision was skipped on the right // side (#1252). - insta::assert_snapshot!(get_log("@-- | root()"), @r###" - ○ side branch 1 + insta::assert_snapshot!(get_log("@-- | root()"), @r#" + ◌ side branch 1 ╷ - ╷ ○ main branch 1 + ╷ ◌ main branch 1 ╭─╯ ◆ - "###); + "#); // Now test the same thing with synthetic nodes for elided commits // Elide some commits from each side of the merge test_env.add_config("ui.log-synthetic-elided-nodes = true"); - insta::assert_snapshot!(get_log("@ | @- | description(initial)"), @r###" + insta::assert_snapshot!(get_log("@ | @- | description(initial)"), @r#" @ merge ├─╮ - │ ○ side branch 2 + │ ◌ side branch 2 │ │ │ ~ (elided revisions) - ○ │ main branch 2 + ◌ │ main branch 2 │ │ ~ │ (elided revisions) ├─╯ - ○ initial + ◌ initial │ ~ - "###); + "#); // Elide shared commits. To keep the implementation simple, it still gets // rendered as two synthetic nodes. - insta::assert_snapshot!(get_log("@-- | root()"), @r###" - ○ side branch 1 + insta::assert_snapshot!(get_log("@-- | root()"), @r#" + ◌ side branch 1 │ ~ (elided revisions) - │ ○ main branch 1 + │ ◌ main branch 1 │ │ │ ~ (elided revisions) ├─╯ ◆ - "###); + "#); } #[test] diff --git a/cli/tests/test_new_command.rs b/cli/tests/test_new_command.rs index c025c2322c..28375b533f 100644 --- a/cli/tests/test_new_command.rs +++ b/cli/tests/test_new_command.rs @@ -25,32 +25,32 @@ fn test_new() { test_env.jj_cmd_ok(&repo_path, &["describe", "-m", "add a file"]); test_env.jj_cmd_ok(&repo_path, &["new", "-m", "a new commit"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 34f3c770f1db22ac5c58df21d587aed1a030201f a new commit - ○ bf8753cb48b860b68386c5c8cc997e8e37122485 add a file + ◌ bf8753cb48b860b68386c5c8cc997e8e37122485 add a file ◆ 0000000000000000000000000000000000000000 - "###); + "#); // Start a new change off of a specific commit (the root commit in this case). test_env.jj_cmd_ok(&repo_path, &["new", "-m", "off of root", "root()"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 026537ddb96b801b9cb909985d5443aab44616c1 off of root - │ ○ 34f3c770f1db22ac5c58df21d587aed1a030201f a new commit - │ ○ bf8753cb48b860b68386c5c8cc997e8e37122485 add a file + │ ◌ 34f3c770f1db22ac5c58df21d587aed1a030201f a new commit + │ ◌ bf8753cb48b860b68386c5c8cc997e8e37122485 add a file ├─╯ ◆ 0000000000000000000000000000000000000000 - "###); + "#); // --edit is a no-op test_env.jj_cmd_ok(&repo_path, &["new", "--edit", "-m", "yet another commit"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 101cbec5cae8049cb9850a906ef3675631ed48fa yet another commit - ○ 026537ddb96b801b9cb909985d5443aab44616c1 off of root - │ ○ 34f3c770f1db22ac5c58df21d587aed1a030201f a new commit - │ ○ bf8753cb48b860b68386c5c8cc997e8e37122485 add a file + ◌ 026537ddb96b801b9cb909985d5443aab44616c1 off of root + │ ◌ 34f3c770f1db22ac5c58df21d587aed1a030201f a new commit + │ ◌ bf8753cb48b860b68386c5c8cc997e8e37122485 add a file ├─╯ ◆ 0000000000000000000000000000000000000000 - "###); + "#); // --edit cannot be used with --no-edit let stderr = test_env.jj_cmd_cli_error(&repo_path, &["new", "--edit", "B", "--no-edit", "D"]); @@ -97,14 +97,14 @@ fn test_new_merge() { insta::assert_snapshot!(stderr, @r###" Created new commit znkkpsqq 496490a6 (empty) (no description set) "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ 496490a66cebb31730c4103b7b22a1098d49af91 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ 496490a66cebb31730c4103b7b22a1098d49af91 ├─╮ │ @ f399209d9dda06e8a25a0c8e9a0cde9f421ff35d add file2 ○ │ 8d996e001c23e298d0d353ab455665c81bf2080c add file1 ├─╯ ◆ 0000000000000000000000000000000000000000 - "###); + "#); // Same test with `jj merge` test_env.jj_cmd_ok(&repo_path, &["undo"]); @@ -158,18 +158,18 @@ fn test_new_insert_after() { test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); setup_before_insertion(&test_env, &repo_path); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ F ├─╮ - │ ○ E - ○ │ D + │ ◌ E + ◌ │ D ├─╯ - │ ○ C - │ ○ B - │ ○ A + │ ◌ C + │ ◌ B + │ ◌ A ├─╯ ◆ root - "###); + "#); // --insert-after can be repeated; --after is an alias let (stdout, stderr) = test_env.jj_cmd_ok( @@ -183,20 +183,20 @@ fn test_new_insert_after() { Parent commit : kkmpptxz bfd4157e B | (empty) B Parent commit : vruxwmqv c9257eff D | (empty) D "###); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - ○ C - │ ○ F + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" + ◌ C + │ ◌ F ╭─┤ @ │ G ├───╮ - │ │ ○ D - ○ │ │ B - ○ │ │ A + │ │ ◌ D + ◌ │ │ B + ◌ │ │ A ├───╯ - │ ○ E + │ ◌ E ├─╯ ◆ root - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["new", "-m", "H", "--insert-after", "D"]); @@ -206,21 +206,21 @@ fn test_new_insert_after() { Working copy now at: uyznsvlq fcf8281b (empty) H Parent commit : vruxwmqv c9257eff D | (empty) D "###); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - ○ C - │ ○ F + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" + ◌ C + │ ◌ F ╭─┤ - ○ │ G + ◌ │ G ├───╮ │ │ @ H - │ │ ○ D - ○ │ │ B - ○ │ │ A + │ │ ◌ D + ◌ │ │ B + ◌ │ │ A ├───╯ - │ ○ E + │ ◌ E ├─╯ ◆ root - "###); + "#); // --after cannot be used with revisions let stderr = test_env.jj_cmd_cli_error(&repo_path, &["new", "--after", "B", "D"]); @@ -239,18 +239,18 @@ fn test_new_insert_after_children() { test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); setup_before_insertion(&test_env, &repo_path); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ F ├─╮ - │ ○ E - ○ │ D + │ ◌ E + ◌ │ D ├─╯ - │ ○ C - │ ○ B - │ ○ A + │ ◌ C + │ ◌ B + │ ◌ A ├─╯ ◆ root - "###); + "#); // Check that inserting G after A and C doesn't try to rebase B (which is // initially a child of A) onto G as that would create a cycle since B is @@ -273,21 +273,21 @@ fn test_new_insert_after_children() { Parent commit : qpvuntsm 5ef24e4b A | (empty) A Parent commit : mzvwutvl 83376b27 C | (empty) C "###); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ G ├─╮ - │ ○ C - │ ○ B + │ ◌ C + │ ◌ B ├─╯ - ○ A - │ ○ F + ◌ A + │ ◌ F │ ├─╮ - │ │ ○ E + │ │ ◌ E ├───╯ - │ ○ D + │ ◌ D ├─╯ ◆ root - "###); + "#); } #[test] @@ -296,18 +296,18 @@ fn test_new_insert_before() { test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); setup_before_insertion(&test_env, &repo_path); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ F ├─╮ - │ ○ E - ○ │ D + │ ◌ E + ◌ │ D ├─╯ - │ ○ C - │ ○ B - │ ○ A + │ ◌ C + │ ◌ B + │ ◌ A ├─╯ ◆ root - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok( &repo_path, @@ -329,20 +329,20 @@ fn test_new_insert_before() { Parent commit : vruxwmqv c9257eff D | (empty) D Parent commit : znkkpsqq 41a89ffc E | (empty) E "###); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - ○ F - │ ○ C + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" + ◌ F + │ ◌ C ├─╯ @ G ├─┬─╮ - │ │ ○ E - │ ○ │ D + │ │ ◌ E + │ ◌ │ D │ ├─╯ - ○ │ B - ○ │ A + ◌ │ B + ◌ │ A ├─╯ ◆ root - "###); + "#); // --before cannot be used with revisions let stderr = test_env.jj_cmd_cli_error(&repo_path, &["new", "--before", "B", "D"]); @@ -361,18 +361,18 @@ fn test_new_insert_before_root_successors() { test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); setup_before_insertion(&test_env, &repo_path); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ F ├─╮ - │ ○ E - ○ │ D + │ ◌ E + ◌ │ D ├─╯ - │ ○ C - │ ○ B - │ ○ A + │ ◌ C + │ ◌ B + │ ◌ A ├─╯ ◆ root - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok( &repo_path, @@ -392,19 +392,19 @@ fn test_new_insert_before_root_successors() { Working copy now at: kxryzmor 36541977 (empty) G Parent commit : zzzzzzzz 00000000 (empty) (no description set) "###); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - ○ F + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" + ◌ F ├─╮ - │ ○ E - ○ │ D - │ │ ○ C - │ │ ○ B - │ │ ○ A + │ ◌ E + ◌ │ D + │ │ ◌ C + │ │ ◌ B + │ │ ◌ A ├───╯ @ │ G ├─╯ ◆ root - "###); + "#); } #[test] @@ -415,18 +415,18 @@ fn test_new_insert_before_no_loop() { setup_before_insertion(&test_env, &repo_path); let template = r#"commit_id.short() ++ " " ++ if(description, description, "root")"#; let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ 7705d353bf5d F ├─╮ - │ ○ 41a89ffcbba2 E - ○ │ c9257eff5bf9 D + │ ◌ 41a89ffcbba2 E + ◌ │ c9257eff5bf9 D ├─╯ - │ ○ 83376b270925 C - │ ○ bfd4157e6ea4 B - │ ○ 5ef24e4bf2be A + │ ◌ 83376b270925 C + │ ◌ bfd4157e6ea4 B + │ ◌ 5ef24e4bf2be A ├─╯ ◆ 000000000000 root - "###); + "#); let stderr = test_env.jj_cmd_failure( &repo_path, @@ -451,18 +451,18 @@ fn test_new_insert_before_no_root_merge() { test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); setup_before_insertion(&test_env, &repo_path); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ F ├─╮ - │ ○ E - ○ │ D + │ ◌ E + ◌ │ D ├─╯ - │ ○ C - │ ○ B - │ ○ A + │ ◌ C + │ ◌ B + │ ◌ A ├─╯ ◆ root - "###); + "#); let stderr = test_env.jj_cmd_failure( &repo_path, @@ -487,18 +487,18 @@ fn test_new_insert_before_root() { test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); setup_before_insertion(&test_env, &repo_path); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ F ├─╮ - │ ○ E - ○ │ D + │ ◌ E + ◌ │ D ├─╯ - │ ○ C - │ ○ B - │ ○ A + │ ◌ C + │ ◌ B + │ ◌ A ├─╯ ◆ root - "###); + "#); let stderr = test_env.jj_cmd_failure(&repo_path, &["new", "-m", "G", "--insert-before", "root()"]); @@ -513,18 +513,18 @@ fn test_new_insert_after_before() { test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); setup_before_insertion(&test_env, &repo_path); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" @ F ├─╮ - │ ○ E - ○ │ D + │ ◌ E + ◌ │ D ├─╯ - │ ○ C - │ ○ B - │ ○ A + │ ◌ C + │ ◌ B + │ ◌ A ├─╯ ◆ root - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok( &repo_path, @@ -536,19 +536,19 @@ fn test_new_insert_after_before() { Working copy now at: kxryzmor 78a97058 (empty) G Parent commit : mzvwutvl 83376b27 C | (empty) C "###); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - ○ F + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" + ◌ F ├─┬─╮ │ │ @ G - │ │ ○ C - │ │ ○ B - │ │ ○ A - │ ○ │ E + │ │ ◌ C + │ │ ◌ B + │ │ ◌ A + │ ◌ │ E │ ├─╯ - ○ │ D + ◌ │ D ├─╯ ◆ root - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok( &repo_path, @@ -560,22 +560,22 @@ fn test_new_insert_after_before() { Working copy now at: uyznsvlq fcf8281b (empty) H Parent commit : vruxwmqv c9257eff D | (empty) D "###); - insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - ○ F + insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r#" + ◌ F ├─┬─╮ - │ │ ○ G - │ │ ○ C - │ │ ○ B + │ │ ◌ G + │ │ ◌ C + │ │ ◌ B │ │ ├─╮ │ │ │ @ H ├─────╯ - ○ │ │ D - │ │ ○ A + ◌ │ │ D + │ │ ◌ A ├───╯ - │ ○ E + │ ◌ E ├─╯ ◆ root - "###); + "#); } #[test] @@ -586,18 +586,18 @@ fn test_new_insert_after_before_no_loop() { setup_before_insertion(&test_env, &repo_path); let template = r#"commit_id.short() ++ " " ++ if(description, description, "root")"#; let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", template]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ 7705d353bf5d F ├─╮ - │ ○ 41a89ffcbba2 E - ○ │ c9257eff5bf9 D + │ ◌ 41a89ffcbba2 E + ◌ │ c9257eff5bf9 D ├─╯ - │ ○ 83376b270925 C - │ ○ bfd4157e6ea4 B - │ ○ 5ef24e4bf2be A + │ ◌ 83376b270925 C + │ ◌ bfd4157e6ea4 B + │ ◌ 5ef24e4bf2be A ├─╯ ◆ 000000000000 root - "###); + "#); let stderr = test_env.jj_cmd_failure( &repo_path, diff --git a/cli/tests/test_next_prev_commands.rs b/cli/tests/test_next_prev_commands.rs index 91f539a557..d4f0092315 100644 --- a/cli/tests/test_next_prev_commands.rs +++ b/cli/tests/test_next_prev_commands.rs @@ -33,25 +33,25 @@ fn test_next_simple() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "first"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "second"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ zsuskulnrvyr - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); // Move to `first` test_env.jj_cmd_ok(&repo_path, &["new", "@--"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr - │ ○ kkmpptxzrspx third + │ ◌ kkmpptxzrspx third ├─╯ - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next"]); insta::assert_snapshot!(stdout, @""); @@ -60,13 +60,13 @@ fn test_next_simple() { Parent commit : kkmpptxz 30056b0c (empty) third "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ vruxwmqvtpmx - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -81,15 +81,15 @@ fn test_next_multiple() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "fourth"]); test_env.jj_cmd_ok(&repo_path, &["new", "@---"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr - │ ○ zsuskulnrvyr fourth - │ ○ kkmpptxzrspx third + │ ◌ zsuskulnrvyr fourth + │ ◌ kkmpptxzrspx third ├─╯ - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next", "2"]); // We should now be the child of the fourth commit. @@ -99,14 +99,14 @@ fn test_next_multiple() { Parent commit : zsuskuln 9d7e5e99 (empty) fourth "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ vruxwmqvtpmx - ○ zsuskulnrvyr fourth - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ zsuskulnrvyr fourth + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -118,13 +118,13 @@ fn test_prev_simple() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "first"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "second"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ zsuskulnrvyr - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev"]); insta::assert_snapshot!(stdout, @""); @@ -133,14 +133,14 @@ fn test_prev_simple() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr - │ ○ kkmpptxzrspx third + │ ◌ kkmpptxzrspx third ├─╯ - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -153,14 +153,14 @@ fn test_prev_multiple_without_root() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "second"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "fourth"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ mzvwutvlkqwt - ○ zsuskulnrvyr fourth - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ zsuskulnrvyr fourth + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev", "2"]); insta::assert_snapshot!(stdout, @""); @@ -169,15 +169,15 @@ fn test_prev_multiple_without_root() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ yqosqzytrlsw - │ ○ zsuskulnrvyr fourth - │ ○ kkmpptxzrspx third + │ ◌ zsuskulnrvyr fourth + │ ◌ kkmpptxzrspx third ├─╯ - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -191,12 +191,12 @@ fn test_next_exceeding_history() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); test_env.jj_cmd_ok(&repo_path, &["edit", "-r", "@--"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ kkmpptxzrspx third + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ kkmpptxzrspx third @ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let stderr = test_env.jj_cmd_failure(&repo_path, &["next", "3"]); // `jj next` beyond existing history fails. @@ -218,14 +218,14 @@ fn test_next_parent_has_multiple_descendants() { test_env.jj_cmd_ok(&repo_path, &["new", "root()", "-m", "3"]); test_env.jj_cmd_ok(&repo_path, &["new", "-m", "4"]); test_env.jj_cmd_ok(&repo_path, &["edit", "description(3)"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ mzvwutvlkqwt 4 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ mzvwutvlkqwt 4 @ zsuskulnrvyr 3 - │ ○ kkmpptxzrspx 2 - │ ○ qpvuntsmwlqt 1 + │ ◌ kkmpptxzrspx 2 + │ ◌ qpvuntsmwlqt 1 ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next", "--edit"]); insta::assert_snapshot!(stdout,@r###""###); @@ -233,14 +233,14 @@ fn test_next_parent_has_multiple_descendants() { Working copy now at: mzvwutvl 1b8531ce (empty) 4 Parent commit : zsuskuln b1394455 (empty) 3 "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ mzvwutvlkqwt 4 - ○ zsuskulnrvyr 3 - │ ○ kkmpptxzrspx 2 - │ ○ qpvuntsmwlqt 1 + ◌ zsuskulnrvyr 3 + │ ◌ kkmpptxzrspx 2 + │ ◌ qpvuntsmwlqt 1 ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -257,17 +257,17 @@ fn test_next_with_merge_commit_parent() { ); test_env.jj_cmd_ok(&repo_path, &["new", "-m", "4"]); test_env.jj_cmd_ok(&repo_path, &["prev", "0"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr - │ ○ mzvwutvlkqwt 4 + │ ◌ mzvwutvlkqwt 4 ├─╯ - ○ zsuskulnrvyr 3 + ◌ zsuskulnrvyr 3 ├─╮ - │ ○ kkmpptxzrspx 2 - ○ │ qpvuntsmwlqt 1 + │ ◌ kkmpptxzrspx 2 + ◌ │ qpvuntsmwlqt 1 ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next"]); insta::assert_snapshot!(stdout,@r###""###); @@ -275,16 +275,16 @@ fn test_next_with_merge_commit_parent() { Working copy now at: vruxwmqv e2cefcb7 (empty) (no description set) Parent commit : mzvwutvl b54bbdea (empty) 4 "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ vruxwmqvtpmx - ○ mzvwutvlkqwt 4 - ○ zsuskulnrvyr 3 + ◌ mzvwutvlkqwt 4 + ◌ zsuskulnrvyr 3 ├─╮ - │ ○ kkmpptxzrspx 2 - ○ │ qpvuntsmwlqt 1 + │ ◌ kkmpptxzrspx 2 + ◌ │ qpvuntsmwlqt 1 ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -301,15 +301,15 @@ fn test_next_on_merge_commit() { ); test_env.jj_cmd_ok(&repo_path, &["new", "-m", "4"]); test_env.jj_cmd_ok(&repo_path, &["edit", "description(3)"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ mzvwutvlkqwt 4 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ mzvwutvlkqwt 4 @ zsuskulnrvyr 3 ├─╮ - │ ○ kkmpptxzrspx 2 - ○ │ qpvuntsmwlqt 1 + │ ◌ kkmpptxzrspx 2 + ◌ │ qpvuntsmwlqt 1 ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next", "--edit"]); insta::assert_snapshot!(stdout,@r###""###); @@ -317,15 +317,15 @@ fn test_next_on_merge_commit() { Working copy now at: mzvwutvl b54bbdea (empty) 4 Parent commit : zsuskuln 5542f0b4 (empty) 3 "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ mzvwutvlkqwt 4 - ○ zsuskulnrvyr 3 + ◌ zsuskulnrvyr 3 ├─╮ - │ ○ kkmpptxzrspx 2 - ○ │ qpvuntsmwlqt 1 + │ ◌ kkmpptxzrspx 2 + ◌ │ qpvuntsmwlqt 1 ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -339,15 +339,15 @@ fn test_next_fails_on_branching_children_no_stdin() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); test_env.jj_cmd_ok(&repo_path, &["new", "@--"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr - │ ○ zsuskulnrvyr third + │ ◌ zsuskulnrvyr third ├─╯ - │ ○ rlvkpnrzqnoo second + │ ◌ rlvkpnrzqnoo second ├─╯ - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); // Try to advance the working copy commit. let assert = test_env.jj_cmd(&repo_path, &["next"]).assert().code(1); @@ -368,15 +368,15 @@ fn test_next_fails_on_branching_children_quit_prompt() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); test_env.jj_cmd_ok(&repo_path, &["new", "@--"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr - │ ○ zsuskulnrvyr third + │ ◌ zsuskulnrvyr third ├─╯ - │ ○ rlvkpnrzqnoo second + │ ◌ rlvkpnrzqnoo second ├─╯ - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); // Try to advance the working copy commit. let assert = test_env @@ -437,14 +437,14 @@ fn test_prev_on_merge_commit() { test_env.jj_cmd_ok(&repo_path, &["new", "left", "right"]); // Check that the graph looks the way we expect. - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr ├─╮ - │ ○ zsuskulnrvyr right second - ○ │ qpvuntsmwlqt left first + │ ◌ zsuskulnrvyr right second + ◌ │ qpvuntsmwlqt left first ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev"]); insta::assert_snapshot!(stdout, @""); @@ -486,18 +486,18 @@ fn test_prev_on_merge_commit_with_parent_merge() { ); // Check that the graph looks the way we expect. - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr M ├─╮ - │ ○ mzvwutvlkqwt 1 - ○ │ zsuskulnrvyr z + │ ◌ mzvwutvlkqwt 1 + ◌ │ zsuskulnrvyr z ├───╮ - │ │ ○ kkmpptxzrspx y + │ │ ◌ kkmpptxzrspx y │ ├─╯ - ○ │ qpvuntsmwlqt x + ◌ │ qpvuntsmwlqt x ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_stdin_ok(&repo_path, &["prev"], "2\n"); insta::assert_snapshot!(stdout, @r###" @@ -544,17 +544,17 @@ fn test_prev_prompts_on_multiple_parents() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "merge"]); // Check that the graph looks the way we expect. - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ vruxwmqvtpmx - ○ yqosqzytrlsw merge + ◌ yqosqzytrlsw merge ├─┬─╮ - │ │ ○ qpvuntsmwlqt first - │ ○ │ kkmpptxzrspx second + │ │ ◌ qpvuntsmwlqt first + │ ◌ │ kkmpptxzrspx second │ ├─╯ - ○ │ mzvwutvlkqwt third + ◌ │ mzvwutvlkqwt third ├─╯ ◆ zzzzzzzzzzzz - "###); + "#); // Move @ backwards. let (stdout, stderr) = test_env.jj_cmd_stdin_ok(&repo_path, &["prev"], "3\n"); @@ -581,14 +581,14 @@ fn test_prev_beyond_root_fails() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "second"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "fourth"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ mzvwutvlkqwt - ○ zsuskulnrvyr fourth - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ zsuskulnrvyr fourth + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); // @- is at "fourth", and there is no parent 5 commits behind it. let stderr = test_env.jj_cmd_failure(&repo_path, &["prev", "5"]); insta::assert_snapshot!(stderr,@r###" @@ -609,13 +609,13 @@ fn test_prev_editing() { // Edit the "fourth" commit, which becomes the leaf. test_env.jj_cmd_ok(&repo_path, &["edit", "@-"]); // Check that the graph looks the way we expect. - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ zsuskulnrvyr fourth - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev", "--edit"]); insta::assert_snapshot!(stdout, @r""); @@ -624,13 +624,13 @@ fn test_prev_editing() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ zsuskulnrvyr fourth + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ zsuskulnrvyr fourth @ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -645,13 +645,13 @@ fn test_next_editing() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "fourth"]); test_env.jj_cmd_ok(&repo_path, &["edit", "@---"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ zsuskulnrvyr fourth - ○ kkmpptxzrspx third + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ zsuskulnrvyr fourth + ◌ kkmpptxzrspx third @ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next", "--edit"]); insta::assert_snapshot!(stdout, @""); @@ -660,13 +660,13 @@ fn test_next_editing() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ zsuskulnrvyr fourth + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ zsuskulnrvyr fourth @ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -723,21 +723,21 @@ fn test_prev_conflict_editing() { std::fs::write(&file_path, "first text").unwrap(); test_env.jj_cmd_ok(&repo_path, &["new", "description(third)"]); // Test the setup - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr conflict × kkmpptxzrspx conflict third - ○ rlvkpnrzqnoo second + ◌ rlvkpnrzqnoo second ○ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["prev", "--conflict", "--edit"]); // We now should be editing the third commit. - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ kkmpptxzrspx conflict third - ○ rlvkpnrzqnoo second + ◌ rlvkpnrzqnoo second ○ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -758,22 +758,22 @@ fn test_next_conflict() { std::fs::write(&file_path, "first v2").unwrap(); test_env.jj_cmd_ok(&repo_path, &["squash", "--into", "description(third)"]); // Test the setup - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr │ × kkmpptxzrspx conflict third - │ ○ rlvkpnrzqnoo second + │ ◌ rlvkpnrzqnoo second ├─╯ ○ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["next", "--conflict"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ vruxwmqvtpmx conflict × kkmpptxzrspx conflict third - ○ rlvkpnrzqnoo second + ◌ rlvkpnrzqnoo second ○ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -800,12 +800,12 @@ fn test_next_conflict_editing() { ◆ zzzzzzzzzzzz "###); test_env.jj_cmd_ok(&repo_path, &["next", "--conflict", "--edit"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ kkmpptxzrspx conflict ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -846,22 +846,22 @@ fn test_movement_edit_mode_true() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "first"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "second"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ zsuskulnrvyr - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["prev"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev"]); insta::assert_snapshot!(stdout, @""); @@ -870,12 +870,12 @@ fn test_movement_edit_mode_true() { Parent commit : qpvuntsm fa15625b (empty) first "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ kkmpptxzrspx third + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ kkmpptxzrspx third @ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev"]); insta::assert_snapshot!(stdout, @""); @@ -884,12 +884,12 @@ fn test_movement_edit_mode_true() { Parent commit : zzzzzzzz 00000000 (empty) (no description set) "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second @ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next"]); insta::assert_snapshot!(stdout, @""); @@ -898,12 +898,12 @@ fn test_movement_edit_mode_true() { Parent commit : qpvuntsm fa15625b (empty) first "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ kkmpptxzrspx third + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ kkmpptxzrspx third @ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next"]); insta::assert_snapshot!(stdout, @""); @@ -912,12 +912,12 @@ fn test_movement_edit_mode_true() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev", "--no-edit"]); insta::assert_snapshot!(stdout, @""); @@ -926,14 +926,14 @@ fn test_movement_edit_mode_true() { Parent commit : qpvuntsm fa15625b (empty) first "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ nkmrtpmomlro - │ ○ kkmpptxzrspx third - │ ○ rlvkpnrzqnoo second + │ ◌ kkmpptxzrspx third + │ ◌ rlvkpnrzqnoo second ├─╯ - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next", "--no-edit"]); insta::assert_snapshot!(stdout, @""); @@ -942,14 +942,14 @@ fn test_movement_edit_mode_true() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ xznxytknoqwo - │ ○ kkmpptxzrspx third + │ ◌ kkmpptxzrspx third ├─╯ - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } #[test] @@ -963,24 +963,24 @@ fn test_movement_edit_mode_false() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "first"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "second"]); test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "third"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ zsuskulnrvyr - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["prev"]); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ royxmykxtrkr - │ ○ kkmpptxzrspx third + │ ◌ kkmpptxzrspx third ├─╯ - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev", "--no-edit"]); insta::assert_snapshot!(stdout, @""); @@ -989,14 +989,14 @@ fn test_movement_edit_mode_false() { Parent commit : qpvuntsm fa15625b (empty) first "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ vruxwmqvtpmx - │ ○ kkmpptxzrspx third - │ ○ rlvkpnrzqnoo second + │ ◌ kkmpptxzrspx third + │ ◌ rlvkpnrzqnoo second ├─╯ - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next"]); insta::assert_snapshot!(stdout, @""); @@ -1005,14 +1005,14 @@ fn test_movement_edit_mode_false() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ znkkpsqqskkl - │ ○ kkmpptxzrspx third + │ ◌ kkmpptxzrspx third ├─╯ - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next", "--no-edit"]); insta::assert_snapshot!(stdout, @""); @@ -1021,13 +1021,13 @@ fn test_movement_edit_mode_false() { Parent commit : kkmpptxz 30056b0c (empty) third "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ kmkuslswpqwq - ○ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ kkmpptxzrspx third + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["prev", "--edit", "2"]); insta::assert_snapshot!(stdout, @""); @@ -1036,12 +1036,12 @@ fn test_movement_edit_mode_false() { Parent commit : qpvuntsm fa15625b (empty) first "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - ○ kkmpptxzrspx third + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" + ◌ kkmpptxzrspx third @ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["next", "--edit"]); insta::assert_snapshot!(stdout, @""); @@ -1050,12 +1050,12 @@ fn test_movement_edit_mode_false() { Parent commit : rlvkpnrz 9ed53a4a (empty) second "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ kkmpptxzrspx third - ○ rlvkpnrzqnoo second - ○ qpvuntsmwlqt first + ◌ rlvkpnrzqnoo second + ◌ qpvuntsmwlqt first ◆ zzzzzzzzzzzz - "###); + "#); } fn get_log_output(test_env: &TestEnvironment, cwd: &Path) -> String { diff --git a/cli/tests/test_obslog_command.rs b/cli/tests/test_obslog_command.rs index 923108debc..09b5eeadf3 100644 --- a/cli/tests/test_obslog_command.rs +++ b/cli/tests/test_obslog_command.rs @@ -28,34 +28,34 @@ fn test_obslog_with_or_without_diff() { std::fs::write(repo_path.join("file1"), "resolved\n").unwrap(); let stdout = test_env.jj_cmd_success(&repo_path, &["obslog"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3 │ my description × rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 cf73917d conflict │ my description ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 068224a7 │ my description - ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 2b023b5f + ◌ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 2b023b5f (empty) my description - "###); + "#); // Color let stdout = test_env.jj_cmd_success(&repo_path, &["--color=always", "obslog"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3 │ my description × rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 cf73917d conflict │ my description ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 068224a7 │ my description - ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 2b023b5f + ◌ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 2b023b5f (empty) my description - "###); + "#); // There should be no diff caused by the rebase because it was a pure rebase // (even even though it resulted in a conflict). let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "-p"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r##" @ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 66b42ad3 │ my description │ Resolved conflict in file1: @@ -75,9 +75,9 @@ fn test_obslog_with_or_without_diff() { │ 2: bar │ Added regular file file2: │ 1: foo - ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 2b023b5f + ◌ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 2b023b5f (empty) my description - "###); + "##); // Test `--limit` let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "--limit=2"]); @@ -193,20 +193,20 @@ fn test_obslog_word_wrap() { test_env.jj_cmd_ok(&repo_path, &["describe", "-m", "first"]); // ui.log-word-wrap option applies to both graph/no-graph outputs - insta::assert_snapshot!(render(&["obslog"], 40, false), @r###" + insta::assert_snapshot!(render(&["obslog"], 40, false), @r#" @ qpvuntsm test.user@example.com 2001-02-03 08:05:08 fa15625b │ (empty) first - ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 + ◌ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 (empty) (no description set) - "###); - insta::assert_snapshot!(render(&["obslog"], 40, true), @r###" + "#); + insta::assert_snapshot!(render(&["obslog"], 40, true), @r#" @ qpvuntsm test.user@example.com │ 2001-02-03 08:05:08 fa15625b │ (empty) first - ○ qpvuntsm hidden test.user@example.com + ◌ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 (empty) (no description set) - "###); + "#); insta::assert_snapshot!(render(&["obslog", "--no-graph"], 40, false), @r###" qpvuntsm test.user@example.com 2001-02-03 08:05:08 fa15625b (empty) first @@ -264,20 +264,20 @@ fn test_obslog_squash() { let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "-p", "-r", "description('squash')"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" ○ qpvuntsm test.user@example.com 2001-02-03 08:05:15 d49749bf ├─┬─╮ squashed 3 │ │ ○ vruxwmqv hidden test.user@example.com 2001-02-03 08:05:15 8f2ae2b5 │ │ │ fifth │ │ │ Added regular file file5: │ │ │ 1: foo5 - │ │ ○ vruxwmqv hidden test.user@example.com 2001-02-03 08:05:14 04d28ca9 + │ │ ◌ vruxwmqv hidden test.user@example.com 2001-02-03 08:05:14 04d28ca9 │ │ (empty) fifth │ ○ yqosqzyt hidden test.user@example.com 2001-02-03 08:05:14 c5801e10 │ │ fourth │ │ Added regular file file4: │ │ 1: foo4 - │ ○ yqosqzyt hidden test.user@example.com 2001-02-03 08:05:13 bb54a199 + │ ◌ yqosqzyt hidden test.user@example.com 2001-02-03 08:05:13 bb54a199 │ (empty) fourth ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:12 1408a0a7 ├─╮ squashed 2 @@ -295,9 +295,9 @@ fn test_obslog_squash() { │ │ 1: foo2 │ │ Added regular file file3: │ │ 1: foo3 - │ ○ zsuskuln hidden test.user@example.com 2001-02-03 08:05:11 66645763 + │ ◌ zsuskuln hidden test.user@example.com 2001-02-03 08:05:11 66645763 │ │ (empty) third - │ ○ zsuskuln hidden test.user@example.com 2001-02-03 08:05:10 1c7afcb4 + │ ◌ zsuskuln hidden test.user@example.com 2001-02-03 08:05:10 1c7afcb4 │ (empty) (no description set) ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:10 e3c2a446 ├─╮ squashed 1 @@ -306,17 +306,17 @@ fn test_obslog_squash() { │ │ Modified regular file file1: │ │ 1 1: foo │ │ 2: bar - │ ○ kkmpptxz hidden test.user@example.com 2001-02-03 08:05:09 cba41deb + │ ◌ kkmpptxz hidden test.user@example.com 2001-02-03 08:05:09 cba41deb │ (empty) second ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:09 766420db │ first │ Added regular file file1: │ 1: foo - ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 fa15625b + ◌ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 fa15625b │ (empty) first - ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 + ◌ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 230dd059 (empty) (no description set) - "###); + "#); } #[test] diff --git a/cli/tests/test_operations.rs b/cli/tests/test_operations.rs index 9d2b08c047..f82ac9d405 100644 --- a/cli/tests/test_operations.rs +++ b/cli/tests/test_operations.rs @@ -675,15 +675,15 @@ fn test_op_recover_from_bad_gc() { // The repo should no longer be corrupt. let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["log"]); - insta::assert_snapshot!(stdout, @r###" - ○ mzvwutvl?? test.user@example.com 2001-02-03 08:05:15 dc2c6d52 + insta::assert_snapshot!(stdout, @r#" + ◌ mzvwutvl?? test.user@example.com 2001-02-03 08:05:15 dc2c6d52 │ (empty) 4.1 │ @ mzvwutvl?? test.user@example.com 2001-02-03 08:05:12 6d868f04 ├─╯ (empty) 4 - ○ zsuskuln test.user@example.com 2001-02-03 08:05:10 HEAD@git f652c321 + ◌ zsuskuln test.user@example.com 2001-02-03 08:05:10 HEAD@git f652c321 │ (empty) (no description set) ◆ zzzzzzzz root() 00000000 - "###); + "#); insta::assert_snapshot!(stderr, @r###" Concurrent modification detected, resolving automatically. "###); diff --git a/cli/tests/test_parallelize_command.rs b/cli/tests/test_parallelize_command.rs index 214cc8578b..ac2afb5741 100644 --- a/cli/tests/test_parallelize_command.rs +++ b/cli/tests/test_parallelize_command.rs @@ -26,31 +26,31 @@ fn test_parallelize_no_descendants() { test_env.jj_cmd_ok(&workspace_path, &["commit", &format!("-m{n}")]); } test_env.jj_cmd_ok(&workspace_path, &["describe", "-m=6"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 02b7709cc4e9 6 parents: 5 - ○ 1b2f08d76b66 5 parents: 4 - ○ e5c4cf44e237 4 parents: 3 - ○ 4cd999dfaac0 3 parents: 2 - ○ d3902619fade 2 parents: 1 - ○ 8b64ddff700d 1 parents: + ◌ 1b2f08d76b66 5 parents: 4 + ◌ e5c4cf44e237 4 parents: 3 + ◌ 4cd999dfaac0 3 parents: 2 + ◌ d3902619fade 2 parents: 1 + ◌ 8b64ddff700d 1 parents: ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok(&workspace_path, &["parallelize", "description(1)::"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 4850b4629edb 6 parents: - │ ○ 87627fbb7d29 5 parents: + │ ◌ 87627fbb7d29 5 parents: ├─╯ - │ ○ 5b9815e28fae 4 parents: + │ ◌ 5b9815e28fae 4 parents: ├─╯ - │ ○ bb1bb465ccc2 3 parents: + │ ◌ bb1bb465ccc2 3 parents: ├─╯ - │ ○ 337eca1ef3a8 2 parents: + │ ◌ 337eca1ef3a8 2 parents: ├─╯ - │ ○ 8b64ddff700d 1 parents: + │ ◌ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } // Only the head commit has descendants. @@ -64,33 +64,33 @@ fn test_parallelize_with_descendants_simple() { test_env.jj_cmd_ok(&workspace_path, &["commit", &format!("-m{n}")]); } test_env.jj_cmd_ok(&workspace_path, &["describe", "-m=6"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 02b7709cc4e9 6 parents: 5 - ○ 1b2f08d76b66 5 parents: 4 - ○ e5c4cf44e237 4 parents: 3 - ○ 4cd999dfaac0 3 parents: 2 - ○ d3902619fade 2 parents: 1 - ○ 8b64ddff700d 1 parents: + ◌ 1b2f08d76b66 5 parents: 4 + ◌ e5c4cf44e237 4 parents: 3 + ◌ 4cd999dfaac0 3 parents: 2 + ◌ d3902619fade 2 parents: 1 + ◌ 8b64ddff700d 1 parents: ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok( &workspace_path, &["parallelize", "description(1)::description(4)"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 9bc057f8b6e3 6 parents: 5 - ○ 9e36a8afe793 5 parents: 1 2 3 4 + ◌ 9e36a8afe793 5 parents: 1 2 3 4 ├─┬─┬─╮ - │ │ │ ○ 5b9815e28fae 4 parents: - │ │ ○ │ bb1bb465ccc2 3 parents: + │ │ │ ◌ 5b9815e28fae 4 parents: + │ │ ◌ │ bb1bb465ccc2 3 parents: │ │ ├─╯ - │ ○ │ 337eca1ef3a8 2 parents: + │ ◌ │ 337eca1ef3a8 2 parents: │ ├─╯ - ○ │ 8b64ddff700d 1 parents: + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } // One of the commits being parallelized has a child that isn't being @@ -107,37 +107,37 @@ fn test_parallelize_where_interior_has_non_target_children() { } test_env.jj_cmd_ok(&workspace_path, &["new", "description(2)", "-m=2c"]); test_env.jj_cmd_ok(&workspace_path, &["new", "description(5)", "-m=6"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 2508ea92308a 6 parents: 5 - ○ 1b2f08d76b66 5 parents: 4 - ○ e5c4cf44e237 4 parents: 3 - ○ 4cd999dfaac0 3 parents: 2 - │ ○ 3e7571e62c87 2c parents: 2 + ◌ 1b2f08d76b66 5 parents: 4 + ◌ e5c4cf44e237 4 parents: 3 + ◌ 4cd999dfaac0 3 parents: 2 + │ ◌ 3e7571e62c87 2c parents: 2 ├─╯ - ○ d3902619fade 2 parents: 1 - ○ 8b64ddff700d 1 parents: + ◌ d3902619fade 2 parents: 1 + ◌ 8b64ddff700d 1 parents: ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok( &workspace_path, &["parallelize", "description(1)::description(4)"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ c9525dff9d03 6 parents: 5 - ○ b3ad09518546 5 parents: 1 2 3 4 + ◌ b3ad09518546 5 parents: 1 2 3 4 ├─┬─┬─╮ - │ │ │ ○ 3b125ed6a683 4 parents: - │ │ ○ │ 1ed8c0c5be30 3 parents: + │ │ │ ◌ 3b125ed6a683 4 parents: + │ │ ◌ │ 1ed8c0c5be30 3 parents: │ │ ├─╯ - │ │ │ ○ c01d8e85ea96 2c parents: 1 2 + │ │ │ ◌ c01d8e85ea96 2c parents: 1 2 ╭─┬───╯ - │ ○ │ 7efea6c89b60 2 parents: + │ ◌ │ 7efea6c89b60 2 parents: │ ├─╯ - ○ │ 8b64ddff700d 1 parents: + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -151,31 +151,31 @@ fn test_parallelize_where_root_has_non_target_children() { } test_env.jj_cmd_ok(&workspace_path, &["new", "description(1)", "-m=1c"]); test_env.jj_cmd_ok(&workspace_path, &["new", "description(3)", "-m=4"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 9132691e6256 4 parents: 3 - ○ 4cd999dfaac0 3 parents: 2 - ○ d3902619fade 2 parents: 1 - │ ○ 6c64110df0a5 1c parents: 1 + ◌ 4cd999dfaac0 3 parents: 2 + ◌ d3902619fade 2 parents: 1 + │ ◌ 6c64110df0a5 1c parents: 1 ├─╯ - ○ 8b64ddff700d 1 parents: + ◌ 8b64ddff700d 1 parents: ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok( &workspace_path, &["parallelize", "description(1)::description(3)"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 3397916989e7 4 parents: 1 2 3 ├─┬─╮ - │ │ ○ 1f768c1bc591 3 parents: - │ ○ │ 12ef12b4640e 2 parents: + │ │ ◌ 1f768c1bc591 3 parents: + │ ◌ │ 12ef12b4640e 2 parents: │ ├─╯ - │ │ ○ 6c64110df0a5 1c parents: 1 + │ │ ◌ 6c64110df0a5 1c parents: 1 ├───╯ - ○ │ 8b64ddff700d 1 parents: + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } // One of the commits being parallelized has a child that is a merge commit. @@ -195,37 +195,37 @@ fn test_parallelize_with_merge_commit_child() { &["new", "description(2)", "description(a)", "-m", "2a-c"], ); test_env.jj_cmd_ok(&workspace_path, &["new", "description(3)", "-m", "4"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 99ffaf5b3984 4 parents: 3 - ○ 4cd999dfaac0 3 parents: 2 - │ ○ 4313cc3b476f 2a-c parents: 2 a + ◌ 4cd999dfaac0 3 parents: 2 + │ ◌ 4313cc3b476f 2a-c parents: 2 a ╭─┤ - │ ○ 1eb902150bb9 a parents: - ○ │ d3902619fade 2 parents: 1 - ○ │ 8b64ddff700d 1 parents: + │ ◌ 1eb902150bb9 a parents: + ◌ │ d3902619fade 2 parents: 1 + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); // After this finishes, child-2a will have three parents: "1", "2", and "a". test_env.jj_cmd_ok( &workspace_path, &["parallelize", "description(1)::description(3)"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 3ee9279847a6 4 parents: 1 2 3 ├─┬─╮ - │ │ ○ bb1bb465ccc2 3 parents: - │ │ │ ○ c70ee196514b 2a-c parents: 1 2 a + │ │ ◌ bb1bb465ccc2 3 parents: + │ │ │ ◌ c70ee196514b 2a-c parents: 1 2 a ╭─┬───┤ - │ │ │ ○ 1eb902150bb9 a parents: + │ │ │ ◌ 1eb902150bb9 a parents: │ │ ├─╯ - │ ○ │ 337eca1ef3a8 2 parents: + │ ◌ │ 337eca1ef3a8 2 parents: │ ├─╯ - ○ │ 8b64ddff700d 1 parents: + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -238,12 +238,12 @@ fn test_parallelize_disconnected_target_commits() { test_env.jj_cmd_ok(&workspace_path, &["commit", &format!("-m{n}")]); } test_env.jj_cmd_ok(&workspace_path, &["describe", "-m=3"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 4cd999dfaac0 3 parents: 2 - ○ d3902619fade 2 parents: 1 - ○ 8b64ddff700d 1 parents: + ◌ d3902619fade 2 parents: 1 + ◌ 8b64ddff700d 1 parents: ◆ 000000000000 parents: - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok( &workspace_path, @@ -253,12 +253,12 @@ fn test_parallelize_disconnected_target_commits() { insta::assert_snapshot!(stderr, @r###" Nothing changed. "###); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 4cd999dfaac0 3 parents: 2 - ○ d3902619fade 2 parents: 1 - ○ 8b64ddff700d 1 parents: + ◌ d3902619fade 2 parents: 1 + ◌ 8b64ddff700d 1 parents: ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -276,32 +276,32 @@ fn test_parallelize_head_is_a_merge() { &workspace_path, &["new", "description(2)", "description(b)", "-m=merged-head"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 1fb53c45237e merged-head parents: 2 b ├─╮ - │ ○ a7bf5001cfd8 b parents: a - │ ○ 6ca0450a05f5 a parents: - ○ │ 1f81bd465ed0 2 parents: 1 - ○ │ 0c058af014a6 1 parents: 0 - ○ │ 745bea8029c1 0 parents: + │ ◌ a7bf5001cfd8 b parents: a + │ ◌ 6ca0450a05f5 a parents: + ◌ │ 1f81bd465ed0 2 parents: 1 + ◌ │ 0c058af014a6 1 parents: 0 + ◌ │ 745bea8029c1 0 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok(&workspace_path, &["parallelize", "description(1)::"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 82131a679769 merged-head parents: 0 b ├─╮ - │ ○ a7bf5001cfd8 b parents: a - │ ○ 6ca0450a05f5 a parents: - │ │ ○ daef04bc3fae 2 parents: 0 + │ ◌ a7bf5001cfd8 b parents: a + │ ◌ 6ca0450a05f5 a parents: + │ │ ◌ daef04bc3fae 2 parents: 0 ├───╯ - │ │ ○ 0c058af014a6 1 parents: 0 + │ │ ◌ 0c058af014a6 1 parents: 0 ├───╯ - ○ │ 745bea8029c1 0 parents: + ◌ │ 745bea8029c1 0 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -317,30 +317,30 @@ fn test_parallelize_interior_target_is_a_merge() { &["new", "description(1)", "description(a)", "-m=2"], ); test_env.jj_cmd_ok(&workspace_path, &["new", "-m=3"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 9b77792c77ac 3 parents: 2 - ○ 1e29145c95fd 2 parents: 1 a + ◌ 1e29145c95fd 2 parents: 1 a ├─╮ - │ ○ 427890ea3f2b a parents: - ○ │ 0c058af014a6 1 parents: 0 - ○ │ 745bea8029c1 0 parents: + │ ◌ 427890ea3f2b a parents: + ◌ │ 0c058af014a6 1 parents: 0 + ◌ │ 745bea8029c1 0 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok(&workspace_path, &["parallelize", "description(1)::"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 042fc3f4315c 3 parents: 0 a ├─╮ - │ │ ○ 80603361bb48 2 parents: 0 a + │ │ ◌ 80603361bb48 2 parents: 0 a ╭─┬─╯ - │ ○ 427890ea3f2b a parents: - │ │ ○ 0c058af014a6 1 parents: 0 + │ ◌ 427890ea3f2b a parents: + │ │ ◌ 0c058af014a6 1 parents: 0 ├───╯ - ○ │ 745bea8029c1 0 parents: + ◌ │ 745bea8029c1 0 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -356,33 +356,33 @@ fn test_parallelize_root_is_a_merge() { ); test_env.jj_cmd_ok(&workspace_path, &["new", "-m=2"]); test_env.jj_cmd_ok(&workspace_path, &["new", "-m=3"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ cc239b744d01 3 parents: 2 - ○ 2bf00c2ad44c 2 parents: 1 - ○ 1c6853121f3c 1 parents: y x + ◌ 2bf00c2ad44c 2 parents: 1 + ◌ 1c6853121f3c 1 parents: y x ├─╮ - │ ○ 4035b23c8f72 x parents: - ○ │ ca57511e158f y parents: + │ ◌ 4035b23c8f72 x parents: + ◌ │ ca57511e158f y parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok( &workspace_path, &["parallelize", "description(1)::description(2)"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 2c7fdfa00b38 3 parents: 1 2 ├─╮ - │ ○ 3acbd32944d6 2 parents: y x + │ ◌ 3acbd32944d6 2 parents: y x │ ├─╮ - ○ │ │ 1c6853121f3c 1 parents: y x + ◌ │ │ 1c6853121f3c 1 parents: y x ╰─┬─╮ - │ ○ 4035b23c8f72 x parents: - ○ │ ca57511e158f y parents: + │ ◌ 4035b23c8f72 x parents: + ◌ │ ca57511e158f y parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -393,23 +393,23 @@ fn test_parallelize_multiple_heads() { test_env.jj_cmd_ok(&workspace_path, &["commit", "-m=0"]); test_env.jj_cmd_ok(&workspace_path, &["describe", "-m=1"]); test_env.jj_cmd_ok(&workspace_path, &["new", "description(0)", "-m=2"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 97d7522f40e8 2 parents: 0 - │ ○ 0c058af014a6 1 parents: 0 + │ ◌ 0c058af014a6 1 parents: 0 ├─╯ - ○ 745bea8029c1 0 parents: + ◌ 745bea8029c1 0 parents: ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok(&workspace_path, &["parallelize", "description(0)::"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ e84481c26195 2 parents: - │ ○ 6270540ee067 1 parents: + │ ◌ 6270540ee067 1 parents: ├─╯ - │ ○ 745bea8029c1 0 parents: + │ ◌ 745bea8029c1 0 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } // All heads must have the same children as the other heads, but only if they @@ -423,25 +423,25 @@ fn test_parallelize_multiple_heads_with_and_without_children() { test_env.jj_cmd_ok(&workspace_path, &["commit", "-m=0"]); test_env.jj_cmd_ok(&workspace_path, &["describe", "-m=1"]); test_env.jj_cmd_ok(&workspace_path, &["new", "description(0)", "-m=2"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 97d7522f40e8 2 parents: 0 - │ ○ 0c058af014a6 1 parents: 0 + │ ◌ 0c058af014a6 1 parents: 0 ├─╯ - ○ 745bea8029c1 0 parents: + ◌ 745bea8029c1 0 parents: ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok( &workspace_path, &["parallelize", "description(0)", "description(1)"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" - ○ 6270540ee067 1 parents: + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" + ◌ 6270540ee067 1 parents: │ @ 97d7522f40e8 2 parents: 0 - │ ○ 745bea8029c1 0 parents: + │ ◌ 745bea8029c1 0 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -456,28 +456,28 @@ fn test_parallelize_multiple_roots() { &["new", "description(1)", "description(a)", "-m=2"], ); test_env.jj_cmd_ok(&workspace_path, &["new", "-m=3"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 34da938ad94a 3 parents: 2 - ○ 85d5043b881d 2 parents: 1 a + ◌ 85d5043b881d 2 parents: 1 a ├─╮ - │ ○ 6d37472c632c a parents: - ○ │ 8b64ddff700d 1 parents: + │ ◌ 6d37472c632c a parents: + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); // Succeeds because the roots have the same parents. test_env.jj_cmd_ok(&workspace_path, &["parallelize", "root().."]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 3c90598481cd 3 parents: - │ ○ b96aa55582e5 2 parents: + │ ◌ b96aa55582e5 2 parents: ├─╯ - │ ○ 6d37472c632c a parents: + │ ◌ 6d37472c632c a parents: ├─╯ - │ ○ 8b64ddff700d 1 parents: + │ ◌ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -492,17 +492,17 @@ fn test_parallelize_multiple_heads_with_different_children() { test_env.jj_cmd_ok(&workspace_path, &["commit", "-m=a"]); test_env.jj_cmd_ok(&workspace_path, &["commit", "-m=b"]); test_env.jj_cmd_ok(&workspace_path, &["commit", "-m=c"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 4bc4dace0e65 parents: c - ○ 63b0da9212c0 c parents: b - ○ a7bf5001cfd8 b parents: a - ○ 6ca0450a05f5 a parents: - │ ○ 4cd999dfaac0 3 parents: 2 - │ ○ d3902619fade 2 parents: 1 - │ ○ 8b64ddff700d 1 parents: + ◌ 63b0da9212c0 c parents: b + ◌ a7bf5001cfd8 b parents: a + ◌ 6ca0450a05f5 a parents: + │ ◌ 4cd999dfaac0 3 parents: 2 + │ ◌ d3902619fade 2 parents: 1 + │ ◌ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok( &workspace_path, @@ -512,21 +512,21 @@ fn test_parallelize_multiple_heads_with_different_children() { "description(a)::description(b)", ], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ f6c9d9ee3db8 parents: c - ○ 62661d5f0c77 c parents: a b + ◌ 62661d5f0c77 c parents: a b ├─╮ - │ ○ c9ea9058f5c7 b parents: - ○ │ 6ca0450a05f5 a parents: + │ ◌ c9ea9058f5c7 b parents: + ◌ │ 6ca0450a05f5 a parents: ├─╯ - │ ○ dac1be696563 3 parents: 1 2 + │ ◌ dac1be696563 3 parents: 1 2 │ ├─╮ - │ │ ○ 7efea6c89b60 2 parents: + │ │ ◌ 7efea6c89b60 2 parents: ├───╯ - │ ○ 8b64ddff700d 1 parents: + │ ◌ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -543,33 +543,33 @@ fn test_parallelize_multiple_roots_with_different_parents() { &workspace_path, &["new", "description(2)", "description(b)", "-m=merged-head"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ ba4297d53c1a merged-head parents: 2 b ├─╮ - │ ○ 6577defaca2d b parents: a - │ ○ 1eb902150bb9 a parents: - ○ │ d3902619fade 2 parents: 1 - ○ │ 8b64ddff700d 1 parents: + │ ◌ 6577defaca2d b parents: a + │ ◌ 1eb902150bb9 a parents: + ◌ │ d3902619fade 2 parents: 1 + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); test_env.jj_cmd_ok( &workspace_path, &["parallelize", "description(2)::", "description(b)::"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 0943ed52b3ed merged-head parents: 1 a ├─╮ - │ │ ○ 6577defaca2d b parents: a + │ │ ◌ 6577defaca2d b parents: a │ ├─╯ - │ ○ 1eb902150bb9 a parents: - │ │ ○ d3902619fade 2 parents: 1 + │ ◌ 1eb902150bb9 a parents: + │ │ ◌ d3902619fade 2 parents: 1 ├───╯ - ○ │ 8b64ddff700d 1 parents: + ◌ │ 8b64ddff700d 1 parents: ├─╯ ◆ 000000000000 parents: - "###); + "#); } #[test] @@ -585,22 +585,22 @@ fn test_parallelize_complex_nonlinear_target() { test_env.jj_cmd_ok(&workspace_path, &["new", "-m=1c", "description(1)"]); test_env.jj_cmd_ok(&workspace_path, &["new", "-m=2c", "description(2)"]); test_env.jj_cmd_ok(&workspace_path, &["new", "-m=3c", "description(3)"]); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ b043eb81416c 3c parents: 3 - │ ○ 48277ee9afe0 4 parents: 3 2 1 + │ ◌ 48277ee9afe0 4 parents: 3 2 1 ╭─┼─╮ - ○ │ │ 944922f0c69f 3 parents: 0 - │ │ │ ○ 9d28e8e38435 2c parents: 2 + ◌ │ │ 944922f0c69f 3 parents: 0 + │ │ │ ◌ 9d28e8e38435 2c parents: 2 │ ├───╯ - │ ○ │ 97d7522f40e8 2 parents: 0 + │ ◌ │ 97d7522f40e8 2 parents: 0 ├─╯ │ - │ ○ │ 6c82c22a5e35 1c parents: 1 + │ ◌ │ 6c82c22a5e35 1c parents: 1 │ ├─╯ - │ ○ 0c058af014a6 1 parents: 0 + │ ◌ 0c058af014a6 1 parents: 0 ├─╯ - ○ 745bea8029c1 0 parents: + ◌ 745bea8029c1 0 parents: ◆ 000000000000 parents: - "###); + "#); let (_stdout, stderr) = test_env.jj_cmd_ok( &workspace_path, @@ -611,24 +611,24 @@ fn test_parallelize_complex_nonlinear_target() { Parent commit : rlvkpnrz 745bea80 (empty) 0 Parent commit : mzvwutvl cb944786 (empty) 3 "###); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ 59a216e537c4 3c parents: 0 3 ├─╮ - │ ○ cb9447869bf0 3 parents: - │ │ ○ 248ce1ffd76b 2c parents: 0 2 + │ ◌ cb9447869bf0 3 parents: + │ │ ◌ 248ce1ffd76b 2c parents: 0 2 ╭───┤ - │ │ ○ 8f4b8ef68676 2 parents: + │ │ ◌ 8f4b8ef68676 2 parents: │ ├─╯ - │ │ ○ 55c626d090e2 1c parents: 0 1 + │ │ ◌ 55c626d090e2 1c parents: 0 1 ╭───┤ - │ │ ○ 82918d78c984 1 parents: + │ │ ◌ 82918d78c984 1 parents: │ ├─╯ - ○ │ 745bea8029c1 0 parents: + ◌ │ 745bea8029c1 0 parents: ├─╯ - │ ○ 14ca4df576b3 4 parents: + │ ◌ 14ca4df576b3 4 parents: ├─╯ ◆ 000000000000 parents: - "###) + "#) } fn get_log_output(test_env: &TestEnvironment, cwd: &Path) -> String { diff --git a/cli/tests/test_rebase_command.rs b/cli/tests/test_rebase_command.rs index d5e8d74afa..0427910c25 100644 --- a/cli/tests/test_rebase_command.rs +++ b/cli/tests/test_rebase_command.rs @@ -2309,15 +2309,15 @@ fn test_rebase_skip_emptied() { test_env.jj_cmd_ok(&repo_path, &["new", "-m", "also already empty"]); // Test the setup - insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]), @r###" + insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]), @r#" @ also already empty - ○ already empty + ◌ already empty ○ will become empty │ ○ b ├─╯ ○ a ◆ - "###); + "#); let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["rebase", "-d=b", "--skip-emptied"]); insta::assert_snapshot!(stdout, @""); @@ -2329,13 +2329,13 @@ fn test_rebase_skip_emptied() { // The parent commit became empty and was dropped, but the already empty commits // were kept - insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]), @r###" + insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]), @r#" @ also already empty - ○ already empty + ◌ already empty ○ b ○ a ◆ - "###); + "#); } #[test] diff --git a/cli/tests/test_resolve_command.rs b/cli/tests/test_resolve_command.rs index 8a7dc9a9ab..8e0f81d257 100644 --- a/cli/tests/test_resolve_command.rs +++ b/cli/tests/test_resolve_command.rs @@ -433,15 +433,15 @@ fn test_baseless_conflict_input_files() { create_commit(&test_env, &repo_path, "b", &["base"], &[("file", "b\n")]); create_commit(&test_env, &repo_path, "conflict", &["a", "b"], &[]); // Test the setup - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ conflict ├─╮ │ ○ b ○ │ a ├─╯ - ○ base + ◌ base ◆ - "###); + "#); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]), @r###" file 2-sided conflict diff --git a/cli/tests/test_split_command.rs b/cli/tests/test_split_command.rs index b4a9116ea4..df2244938f 100644 --- a/cli/tests/test_split_command.rs +++ b/cli/tests/test_split_command.rs @@ -109,12 +109,12 @@ fn test_split_by_paths() { Parent commit : znkkpsqq 5b5714a3 (empty) (no description set) "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ zsuskulnrvyr false - ○ znkkpsqqskkl true + ◌ znkkpsqqskkl true ○ qpvuntsmwlqt false ◆ zzzzzzzzzzzz true - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s", "-r", "@--"]); insta::assert_snapshot!(stdout, @r###" @@ -137,12 +137,12 @@ fn test_split_by_paths() { Parent commit : lylxulpl ed55c86b (no description set) "###); - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ zsuskulnrvyr false ○ lylxulplsnyw false - ○ qpvuntsmwlqt true + ◌ qpvuntsmwlqt true ◆ zzzzzzzzzzzz true - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s", "-r", "@-"]); insta::assert_snapshot!(stdout, @r###" @@ -277,14 +277,14 @@ fn test_split_with_merge_child() { &workspace_path, &["new", "description(1)", "description(a)", "-m=2"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ zsuskulnrvyr true 2 ├─╮ │ ○ kkmpptxzrspx false a - ○ │ qpvuntsmwlqt true 1 + ◌ │ qpvuntsmwlqt true 1 ├─╯ ◆ zzzzzzzzzzzz true - "###); + "#); // Set up the editor and do the split. let edit_script = test_env.set_up_fake_editor(); @@ -304,15 +304,15 @@ fn test_split_with_merge_child() { Parent commit : qpvuntsm 8b64ddff (empty) 1 Parent commit : royxmykx 5e1b793d Add file2 "###); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ zsuskulnrvyr true 2 ├─╮ │ ○ royxmykxtrkr false Add file2 │ ○ kkmpptxzrspx false Add file1 - ○ │ qpvuntsmwlqt true 1 + ◌ │ qpvuntsmwlqt true 1 ├─╯ ◆ zzzzzzzzzzzz true - "###); + "#); } #[test] @@ -478,14 +478,14 @@ fn test_split_siblings_with_merge_child() { &workspace_path, &["new", "description(1)", "description(a)", "-m=2"], ); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ zsuskulnrvyr true 2 ├─╮ │ ○ kkmpptxzrspx false a - ○ │ qpvuntsmwlqt true 1 + ◌ │ qpvuntsmwlqt true 1 ├─╯ ◆ zzzzzzzzzzzz true - "###); + "#); // Set up the editor and do the split. let edit_script = test_env.set_up_fake_editor(); @@ -508,16 +508,16 @@ fn test_split_siblings_with_merge_child() { Parent commit : kkmpptxz e8006b47 Add file1 Parent commit : royxmykx 2cc60f3d Add file2 "###); - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" @ zsuskulnrvyr true 2 ├─┬─╮ │ │ ○ royxmykxtrkr false Add file2 │ ○ │ kkmpptxzrspx false Add file1 │ ├─╯ - ○ │ qpvuntsmwlqt true 1 + ◌ │ qpvuntsmwlqt true 1 ├─╯ ◆ zzzzzzzzzzzz true - "###); + "#); } // Make sure `jj split` would refuse to split an empty commit. diff --git a/cli/tests/test_squash_command.rs b/cli/tests/test_squash_command.rs index 5544454687..b98fbb5473 100644 --- a/cli/tests/test_squash_command.rs +++ b/cli/tests/test_squash_command.rs @@ -306,12 +306,12 @@ fn test_squash_keep_emptied() { Parent commit : kkmpptxz 9490bd7f b | (empty) (no description set) "###); // With --keep-emptied, b remains even though it is now empty. - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" @ 7ee7f18a5223 c - ○ 9490bd7f1e6a b (empty) + ◌ 9490bd7f1e6a b (empty) ○ 53bf93080518 a ◆ 000000000000 (empty) - "###); + "#); let stdout = test_env.jj_cmd_success(&repo_path, &["file", "show", "file1", "-r", "a"]); insta::assert_snapshot!(stdout, @r###" b @@ -969,14 +969,14 @@ fn test_squash_from_multiple_partial_no_op() { r#"separate(" ", commit_id.short(), description)"#, ], ); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ e178068add8c d ├─╮ │ ○ b73077b08c59 b - │ ○ a786561e909f b + │ ◌ a786561e909f b ○ b37ca1ee3306 d - ○ 1d9eb34614c9 d - "###); + ◌ 1d9eb34614c9 d + "#); // If no source commits match the paths, then the whole operation is a no-op test_env.jj_cmd_ok(&repo_path, &["undo"]); @@ -1159,21 +1159,21 @@ fn test_squash_use_destination_message() { test_env.jj_cmd_ok(&repo_path, &["commit", "-m=b"]); test_env.jj_cmd_ok(&repo_path, &["describe", "-m=c"]); // Test the setup - insta::assert_snapshot!(get_log_output_with_description(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output_with_description(&test_env, &repo_path), @r#" @ 8aac283daeac c - ○ 017c7f689ed7 b - ○ d8d5f980a897 a + ◌ 017c7f689ed7 b + ◌ d8d5f980a897 a ◆ 000000000000 - "###); + "#); // Squash the current revision using the short name for the option. test_env.jj_cmd_ok(&repo_path, &["squash", "-u"]); - insta::assert_snapshot!(get_log_output_with_description(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output_with_description(&test_env, &repo_path), @r#" @ fd33e4bc332b - ○ 3a17aa5dcce9 b - ○ d8d5f980a897 a + ◌ 3a17aa5dcce9 b + ◌ d8d5f980a897 a ◆ 000000000000 - "###); + "#); // Undo and squash again, but this time squash both "b" and "c" into "a". test_env.jj_cmd_ok(&repo_path, &["undo"]); @@ -1188,11 +1188,11 @@ fn test_squash_use_destination_message() { "description(a)", ], ); - insta::assert_snapshot!(get_log_output_with_description(&test_env, &repo_path), @r###" + insta::assert_snapshot!(get_log_output_with_description(&test_env, &repo_path), @r#" @ 7c832accbf60 - ○ 688660377651 a + ◌ 688660377651 a ◆ 000000000000 - "###); + "#); } // The --use-destination-message and --message options are incompatible. diff --git a/cli/tests/test_undo.rs b/cli/tests/test_undo.rs index 3cb99ee2ae..c1f4dd297b 100644 --- a/cli/tests/test_undo.rs +++ b/cli/tests/test_undo.rs @@ -29,21 +29,21 @@ fn test_undo_rewrite_with_child() { let op_id_hex = stdout[3..15].to_string(); test_env.jj_cmd_ok(&repo_path, &["new", "-m", "child"]); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ child - ○ modified + ◌ modified ◆ - "###); + "#); test_env.jj_cmd_ok(&repo_path, &["undo", &op_id_hex]); // Since we undid the description-change, the child commit should now be on top // of the initial commit let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ child - ○ initial + ◌ initial ◆ - "###); + "#); } #[test] diff --git a/cli/tests/test_workspaces.rs b/cli/tests/test_workspaces.rs index cd045ad485..33a594c912 100644 --- a/cli/tests/test_workspaces.rs +++ b/cli/tests/test_workspaces.rs @@ -46,20 +46,20 @@ fn test_workspaces_add_second_workspace() { // Can see the working-copy commit in each workspace in the log output. The "@" // node in the graph indicates the current workspace's working-copy commit. - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 5ed2222c28e2 second@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 5ed2222c28e2 second@ │ @ 8183d0fcaa4c default@ ├─╯ ○ 751b12b7b981 ◆ 000000000000 - "###); - insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" + "#); + insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r#" @ 5ed2222c28e2 second@ - │ ○ 8183d0fcaa4c default@ + │ ◌ 8183d0fcaa4c default@ ├─╯ ○ 751b12b7b981 ◆ 000000000000 - "###); + "#); // Both workspaces show up when we list them let stdout = test_env.jj_cmd_success(&main_path, &["workspace", "list"]); @@ -116,16 +116,16 @@ fn test_workspaces_add_second_workspace_on_merge() { ); // The new workspace's working-copy commit shares all parents with the old one. - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 7013a493bd09 second@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 7013a493bd09 second@ ├─╮ │ │ @ 35e47bff781e default@ ╭─┬─╯ - │ ○ 444b77e99d43 - ○ │ 1694f2ddf8ec + │ ◌ 444b77e99d43 + ◌ │ 1694f2ddf8ec ├─╯ ◆ 000000000000 - "###); + "#); } /// Test that --ignore-working-copy is respected @@ -254,22 +254,22 @@ fn test_workspaces_add_workspace_at_revision() { // Can see the working-copy commit in each workspace in the log output. The "@" // node in the graph indicates the current workspace's working-copy commit. - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ e374e74aa0c8 second@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ e374e74aa0c8 second@ │ @ dadeedb493e8 default@ │ ○ c420244c6398 ├─╯ ○ f6097c2f7cac ◆ 000000000000 - "###); - insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" + "#); + insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r#" @ e374e74aa0c8 second@ - │ ○ dadeedb493e8 default@ + │ ◌ dadeedb493e8 default@ │ ○ c420244c6398 ├─╯ ○ f6097c2f7cac ◆ 000000000000 - "###); + "#); } /// Test multiple `-r` flags to `workspace add` to create a workspace @@ -324,8 +324,8 @@ fn test_workspaces_add_workspace_multiple_revisions() { Added 3 files, modified 0 files, removed 0 files "###); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ f4fa64f40944 merge@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ f4fa64f40944 merge@ ├─┬─╮ │ │ ○ f6097c2f7cac │ ○ │ 544cd61f2d26 @@ -335,7 +335,7 @@ fn test_workspaces_add_workspace_multiple_revisions() { │ @ 5b36783cd11c default@ ├─╯ ◆ 000000000000 - "###); + "#); } #[test] @@ -443,13 +443,13 @@ fn test_workspaces_conflicting_edits() { test_env.jj_cmd_ok(&main_path, &["workspace", "add", "../secondary"]); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 3224de8ae048 secondary@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 3224de8ae048 secondary@ │ @ 06b57f44a3ca default@ ├─╯ ○ 506f4ec3c2c6 ◆ 000000000000 - "###); + "#); // Make changes in both working copies std::fs::write(main_path.join("file"), "changed in main\n").unwrap(); @@ -465,13 +465,13 @@ fn test_workspaces_conflicting_edits() { "###); // The secondary workspace's working-copy commit was updated - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" @ a58c9a9b19ce default@ - │ ○ e82cd4ee8faa secondary@ + │ ◌ e82cd4ee8faa secondary@ ├─╯ ○ d41244767d45 ◆ 000000000000 - "###); + "#); let stderr = test_env.jj_cmd_failure(&secondary_path, &["st"]); insta::assert_snapshot!(stderr, @r###" Error: The working copy is stale (not updated since operation 0da24da631e3). @@ -497,27 +497,27 @@ fn test_workspaces_conflicting_edits() { Added 0 files, modified 1 files, removed 0 files "###); insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), - @r###" + @r#" × a28c85ce128b (divergent) - │ ○ a58c9a9b19ce default@ + │ ◌ a58c9a9b19ce default@ ├─╯ │ @ e82cd4ee8faa secondary@ (divergent) ├─╯ ○ d41244767d45 ◆ 000000000000 - "###); + "#); // The stale working copy should have been resolved by the previous command let stdout = get_log_output(&test_env, &secondary_path); assert!(!stdout.starts_with("The working copy is stale")); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" × a28c85ce128b (divergent) - │ ○ a58c9a9b19ce default@ + │ ◌ a58c9a9b19ce default@ ├─╯ │ @ e82cd4ee8faa secondary@ (divergent) ├─╯ ○ d41244767d45 ◆ 000000000000 - "###); + "#); } /// Test a clean working copy that gets rewritten from another workspace @@ -533,13 +533,13 @@ fn test_workspaces_updated_by_other() { test_env.jj_cmd_ok(&main_path, &["workspace", "add", "../secondary"]); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 3224de8ae048 secondary@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 3224de8ae048 secondary@ │ @ 06b57f44a3ca default@ ├─╯ ○ 506f4ec3c2c6 ◆ 000000000000 - "###); + "#); // Rewrite the check-out commit in one workspace. std::fs::write(main_path.join("file"), "changed in main\n").unwrap(); @@ -552,13 +552,13 @@ fn test_workspaces_updated_by_other() { "###); // The secondary workspace's working-copy commit was updated. - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" @ a58c9a9b19ce default@ - │ ○ e82cd4ee8faa secondary@ + │ ◌ e82cd4ee8faa secondary@ ├─╯ ○ d41244767d45 ◆ 000000000000 - "###); + "#); let stderr = test_env.jj_cmd_failure(&secondary_path, &["st"]); insta::assert_snapshot!(stderr, @r###" Error: The working copy is stale (not updated since operation 0da24da631e3). @@ -574,13 +574,13 @@ fn test_workspaces_updated_by_other() { Added 0 files, modified 1 files, removed 0 files "###); insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), - @r###" - ○ a58c9a9b19ce default@ + @r#" + ◌ a58c9a9b19ce default@ │ @ e82cd4ee8faa secondary@ ├─╯ ○ d41244767d45 ◆ 000000000000 - "###); + "#); } #[test] @@ -648,13 +648,13 @@ fn test_workspaces_current_op_discarded_by_other() { test_env.jj_cmd_ok(&main_path, &["operation", "abandon", "..@-"]); test_env.jj_cmd_ok(&main_path, &["util", "gc", "--expire=now"]); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 96b31dafdc41 secondary@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 96b31dafdc41 secondary@ │ @ 6c051bd1ccd5 default@ ├─╯ ○ 7c5b25a4fc8f ◆ 000000000000 - "###); + "#); let stderr = test_env.jj_cmd_failure(&secondary_path, &["st"]); insta::assert_snapshot!(stderr, @r###" @@ -670,14 +670,14 @@ fn test_workspaces_current_op_discarded_by_other() { "###); insta::assert_snapshot!(stdout, @""); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" ○ b0b400439a82 secondary@ - ○ 96b31dafdc41 + ◌ 96b31dafdc41 │ @ 6c051bd1ccd5 default@ ├─╯ ○ 7c5b25a4fc8f ◆ 000000000000 - "###); + "#); // The sparse patterns should remain let stdout = test_env.jj_cmd_success(&secondary_path, &["sparse", "list"]); @@ -704,12 +704,12 @@ fn test_workspaces_current_op_discarded_by_other() { let (stdout, stderr) = test_env.jj_cmd_ok(&secondary_path, &["obslog"]); insta::assert_snapshot!(stderr, @""); - insta::assert_snapshot!(stdout, @r###" + insta::assert_snapshot!(stdout, @r#" @ kmkuslsw test.user@example.com 2001-02-03 08:05:18 secondary@ b0b40043 │ (no description set) - ○ kmkuslsw hidden test.user@example.com 2001-02-03 08:05:18 62f70695 + ◌ kmkuslsw hidden test.user@example.com 2001-02-03 08:05:18 62f70695 (empty) (no description set) - "###); + "#); } #[test] @@ -766,14 +766,14 @@ fn test_workspaces_update_stale_snapshot() { Nothing to do (the working copy is not stale). "###); - insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" + insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r#" @ e672fd8fefac secondary@ - │ ○ ea37b073f5ab default@ - │ ○ b13c81dedc64 + │ ◌ ea37b073f5ab default@ + │ ◌ b13c81dedc64 ├─╯ ○ e6e9989f1179 ◆ 000000000000 - "###); + "#); } /// Test forgetting workspaces @@ -808,11 +808,11 @@ fn test_workspaces_forget() { // TODO: It seems useful to still have the "secondary@" marker here even though // there's only one workspace. We should show it when the command is not run // from that workspace. - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 18463f438cc9 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 18463f438cc9 ○ 4e8f9d2be039 ◆ 000000000000 - "###); + "#); // Revision "@" cannot be used let stderr = test_env.jj_cmd_failure(&main_path, &["log", "-r", "@"]); @@ -910,31 +910,31 @@ fn test_workspaces_forget_abandon_commits() { second: uuqppmxq 57d63245 (empty) (no description set) third: uuqppmxq 57d63245 (empty) (no description set) "###); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 57d63245a308 fourth@ second@ third@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 57d63245a308 fourth@ second@ third@ │ @ 4e8f9d2be039 default@ ├─╯ ◆ 000000000000 - "###); + "#); // delete the default workspace (should not abandon commit since not empty) test_env.jj_cmd_success(&main_path, &["workspace", "forget", "default"]); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 57d63245a308 fourth@ second@ third@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 57d63245a308 fourth@ second@ third@ │ ○ 4e8f9d2be039 ├─╯ ◆ 000000000000 - "###); + "#); // delete the second workspace (should not abandon commit since other workspaces // still have commit checked out) test_env.jj_cmd_success(&main_path, &["workspace", "forget", "second"]); - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - ○ 57d63245a308 fourth@ third@ + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" + ◌ 57d63245a308 fourth@ third@ │ ○ 4e8f9d2be039 ├─╯ ◆ 000000000000 - "###); + "#); // delete the last 2 workspaces (commit should be abandoned now even though // forgotten in same tx)