diff --git a/CHANGELOG.md b/CHANGELOG.md index ee236c41e..68e7e9383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Added `ui.log-word-wrap` option to wrap `jj log`/`obslog`/`op log` content based on terminal width. [#1043](https://github.com/martinvonz/jj/issues/1043) +* Nodes in the (text-based) graphical log output now use a `●` symbol instead + of the letter `o`. The ASCII-based graph styles still use `o`. + ### Fixed bugs * Modify/delete conflicts now include context lines diff --git a/demos/demo_operation_log.sh b/demos/demo_operation_log.sh index 2c33c25a4..21cd1eed6 100755 --- a/demos/demo_operation_log.sh +++ b/demos/demo_operation_log.sh @@ -30,7 +30,7 @@ is:" run_command "jj op log --color=always | head" comment "Let's undo that rebase operation:" -rebase_op=$(jj --color=never op log | grep '^o ' | sed '2q;d' | cut -b4-15) +rebase_op=$(jj --color=never op log | grep '^● ' | sed '2q;d' | cut -b4-15) run_command "jj undo $rebase_op" comment "Note that only the rebase was undone, and the diff --git a/demos/git_compat.png b/demos/git_compat.png index c523ec1ac..2fa366570 100644 Binary files a/demos/git_compat.png and b/demos/git_compat.png differ diff --git a/demos/juggle_conflicts.png b/demos/juggle_conflicts.png index b2d7ccb0e..c5a661dcf 100644 Binary files a/demos/juggle_conflicts.png and b/demos/juggle_conflicts.png differ diff --git a/demos/operation_log.png b/demos/operation_log.png index d85721352..7a4e1a3c5 100644 Binary files a/demos/operation_log.png and b/demos/operation_log.png differ diff --git a/demos/resolve_conflicts.png b/demos/resolve_conflicts.png index 289424aeb..4b96de346 100644 Binary files a/demos/resolve_conflicts.png and b/demos/resolve_conflicts.png differ diff --git a/demos/working_copy.png b/demos/working_copy.png index e0744bc35..85f25d7af 100644 Binary files a/demos/working_copy.png and b/demos/working_copy.png differ diff --git a/docs/tutorial.md b/docs/tutorial.md index b1e009d9a..46128b6d7 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -117,9 +117,9 @@ in its `jj log` command: $ jj log @ mpqrykypylvy martinvonz@google.com 2023-02-12 15:00:22.000 -08:00 aef4df99ea11 │ (empty) (no description set) -o kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 +● kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 │ Say goodbye -o orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 +● orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 │ (empty) Merge pull request #6 from Spaceghost/patch-1 ~ ``` @@ -144,13 +144,13 @@ example: $ jj log -r '@ | root | branches()' @ mpqrykypylvy martinvonz@google.com 2023-02-12 15:00:22.000 -08:00 aef4df99ea11 ╷ (empty) (no description set) -╷ o kowxouwzwxmv octocat@nowhere.com 2014-06-10 15:22:26.000 -07:00 test b3cbd5bbd7e8 +╷ ● kowxouwzwxmv octocat@nowhere.com 2014-06-10 15:22:26.000 -07:00 test b3cbd5bbd7e8 ╭─╯ Create CONTRIBUTING.md -│ o tpstlustrvsn support+octocat@github.com 2018-05-10 12:55:19.000 -05:00 octocat-patch-1 b1b3f9723831 +│ ● tpstlustrvsn support+octocat@github.com 2018-05-10 12:55:19.000 -05:00 octocat-patch-1 b1b3f9723831 ├─╯ sentence case -o orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 +● orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 ╷ (empty) Merge pull request #6 from Spaceghost/patch-1 -o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 +● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) ``` @@ -182,15 +182,15 @@ Working copy now at: 62a3c6d315cd C $ jj log @ qzvqqupxlkot martinvonz@google.com 2023-02-12 15:07:41.946 -08:00 2370ddf3fa39 │ C -o puqltuttrvzp martinvonz@google.com 2023-02-12 15:07:33.000 -08:00 daa6ffd5a09a +● puqltuttrvzp martinvonz@google.com 2023-02-12 15:07:33.000 -08:00 daa6ffd5a09a │ B2 -o ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 +● ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 │ B1 -o nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 +● nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 │ A -│ o kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 +│ ● kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 ├─╯ Say goodbye -o orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 +● orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 │ (empty) Merge pull request #6 from Spaceghost/patch-1 ~ ``` @@ -205,15 +205,15 @@ Added 0 files, modified 1 files, removed 0 files $ jj log @ qzvqqupxlkot martinvonz@google.com 2023-02-12 15:08:33.000 -08:00 1978b53430cd conflict │ C -o puqltuttrvzp martinvonz@google.com 2023-02-12 15:08:33.000 -08:00 f7fb5943ee41 conflict +● puqltuttrvzp martinvonz@google.com 2023-02-12 15:08:33.000 -08:00 f7fb5943ee41 conflict │ B2 -│ o ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 +│ ● ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 ├─╯ B1 -o nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 +● nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 │ A -│ o kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 +│ ● kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 ├─╯ Say goodbye -o orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 +● orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 │ (empty) Merge pull request #6 from Spaceghost/patch-1 ~ ``` @@ -254,17 +254,17 @@ Working copy now at: e3c279cc2043 (no description set) $ jj log @ ntxxqymrlvxu martinvonz@google.com 2023-02-12 19:34:09.000 -08:00 e3c279cc2043 │ (empty) (no description set) -│ o qzvqqupxlkot martinvonz@google.com 2023-02-12 19:34:09.000 -08:00 b9da9d28b26b +│ ● qzvqqupxlkot martinvonz@google.com 2023-02-12 19:34:09.000 -08:00 b9da9d28b26b ├─╯ C -o puqltuttrvzp martinvonz@google.com 2023-02-12 19:34:09.000 -08:00 2c7a658e2586 +● puqltuttrvzp martinvonz@google.com 2023-02-12 19:34:09.000 -08:00 2c7a658e2586 │ B2 -│ o ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 +│ ● ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 ├─╯ B1 -o nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 +● nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 │ A -│ o kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 +│ ● kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 ├─╯ Say goodbye -o orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 +● orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 │ (empty) Merge pull request #6 from Spaceghost/patch-1 ~ ``` @@ -286,12 +286,12 @@ $ jj op log @ d3b77addea49 martinvonz@vonz.svl.corp.google.com 2023-02-12 19:34:09.549 -08:00 - 2023-02-12 19:34:09.552 -08:00 │ squash commit 63874fe6c4fba405ffc38b0dd926f03b715cf7ef │ args: jj squash -o 6fc1873c1180 martinvonz@vonz.svl.corp.google.com 2023-02-12 19:34:09.548 -08:00 - 2023-02-12 19:34:09.549 -08:00 +● 6fc1873c1180 martinvonz@vonz.svl.corp.google.com 2023-02-12 19:34:09.548 -08:00 - 2023-02-12 19:34:09.549 -08:00 │ snapshot working copy -o ed91f7bcc1fb martinvonz@vonz.svl.corp.google.com 2023-02-12 19:32:46.007 -08:00 - 2023-02-12 19:32:46.008 -08:00 +● ed91f7bcc1fb martinvonz@vonz.svl.corp.google.com 2023-02-12 19:32:46.007 -08:00 - 2023-02-12 19:32:46.008 -08:00 │ new empty commit │ args: jj new puqltuttrvzp -o 367400773f87 martinvonz@vonz.svl.corp.google.com 2023-02-12 15:08:33.917 -08:00 - 2023-02-12 15:08:33.920 -08:00 +● 367400773f87 martinvonz@vonz.svl.corp.google.com 2023-02-12 15:08:33.917 -08:00 - 2023-02-12 15:08:33.920 -08:00 │ rebase commit daa6ffd5a09a8a7d09a65796194e69b7ed0a566d and descendants │ args: jj rebase -s puqltuttrvzp -d nuvyytnqlquo [many more lines] @@ -305,17 +305,17 @@ Working copy now at: 63874fe6c4fb (no description set) $ jj log @ zxoosnnpvvpn martinvonz@google.com 2023-02-12 19:34:09.000 -08:00 63874fe6c4fb │ (no description set) -│ o qzvqqupxlkot martinvonz@google.com 2023-02-12 15:08:33.000 -08:00 1978b53430cd conflict +│ ● qzvqqupxlkot martinvonz@google.com 2023-02-12 15:08:33.000 -08:00 1978b53430cd conflict ├─╯ C -o puqltuttrvzp martinvonz@google.com 2023-02-12 15:08:33.000 -08:00 f7fb5943ee41 conflict +● puqltuttrvzp martinvonz@google.com 2023-02-12 15:08:33.000 -08:00 f7fb5943ee41 conflict │ B2 -│ o ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 +│ ● ovknlmrokpkl martinvonz@google.com 2023-02-12 15:07:24.000 -08:00 7d7c6e6bd0b4 ├─╯ B1 -o nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 +● nuvyytnqlquo martinvonz@google.com 2023-02-12 15:07:05.000 -08:00 5dda2f097aa9 │ A -│ o kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 +│ ● kntqzsqtnspv martinvonz@google.com 2023-02-12 14:56:59.000 -08:00 5d39e19dac36 ├─╯ Say goodbye -o orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 +● orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 │ (empty) Merge pull request #6 from Spaceghost/patch-1 ~ ``` @@ -351,11 +351,11 @@ Working copy now at: a67491542e10 ABCD $ jj log -r master:@ @ mrxqplykzpkw martinvonz@google.com 2023-02-12 19:38:21.000 -08:00 b98c607bf87f │ ABCD -o kwtuwqnmqyqp martinvonz@google.com 2023-02-12 19:38:12.000 -08:00 30aecc0871ea +● kwtuwqnmqyqp martinvonz@google.com 2023-02-12 19:38:12.000 -08:00 30aecc0871ea │ ABC -o ztqrpvnwqqnq martinvonz@google.com 2023-02-12 19:38:03.000 -08:00 510022615871 +● ztqrpvnwqqnq martinvonz@google.com 2023-02-12 19:38:03.000 -08:00 510022615871 │ abc -o orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 +● orrkosyozysx octocat@nowhere.com 2012-03-06 15:06:50.000 -08:00 master 7fd1a60b01f9 │ (empty) Merge pull request #6 from Spaceghost/patch-1 ~ ``` diff --git a/src/graphlog.rs b/src/graphlog.rs index 918c4e980..020ca4485 100644 --- a/src/graphlog.rs +++ b/src/graphlog.rs @@ -138,11 +138,11 @@ pub fn get_graphlog<'a, K: Clone + Eq + Hash + 'a>( let builder = GraphRowRenderer::new().output().with_min_row_height(0); match settings.graph_style().as_str() { - "curved" => SaplingGraphLog::create(builder.build_box_drawing(), formatter, "o"), + "curved" => SaplingGraphLog::create(builder.build_box_drawing(), formatter, "●"), "square" => SaplingGraphLog::create( builder.build_box_drawing().with_square_glyphs(), formatter, - "o", + "●", ), "ascii" => SaplingGraphLog::create(builder.build_ascii(), formatter, "o"), "ascii-large" => SaplingGraphLog::create(builder.build_ascii_large(), formatter, "o"), diff --git a/tests/test_abandon_command.rs b/tests/test_abandon_command.rs index b48274592..66f8ab078 100644 --- a/tests/test_abandon_command.rs +++ b/tests/test_abandon_command.rs @@ -45,13 +45,13 @@ fn test_rebase_branch_with_merge() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e ├─╮ - o │ d - o │ c - │ │ o b + ● │ d + ● │ c + │ │ ● b │ ├─╯ - │ o a + │ ● a ├─╯ - o + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["abandon", "d"]); @@ -64,12 +64,12 @@ fn test_rebase_branch_with_merge() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e ├─╮ - o │ c d - │ │ o b + ● │ c d + │ │ ● b │ ├─╯ - │ o a + │ ● a ├─╯ - o + ● "###); test_env.jj_cmd_success(&repo_path, &["undo"]); @@ -81,13 +81,13 @@ fn test_rebase_branch_with_merge() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ - │ o d e?? - │ o c - │ │ o b + │ ● d e?? + │ ● c + │ │ ● b ├───╯ - o │ a e?? + ● │ a e?? ├─╯ - o + ● "###); test_env.jj_cmd_success(&repo_path, &["undo"]); @@ -102,10 +102,10 @@ fn test_rebase_branch_with_merge() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ - │ o b + │ ● b ├─╯ - o a e?? - o c d e?? + ● a e?? + ● c d e?? "###); // Test abandoning the same commit twice directly @@ -117,11 +117,11 @@ fn test_rebase_branch_with_merge() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e ├─╮ - o │ d - o │ c - │ o a b + ● │ d + ● │ c + │ ● a b ├─╯ - o + ● "###); // Test abandoning the same commit twice indirectly @@ -138,9 +138,9 @@ fn test_rebase_branch_with_merge() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ - │ o c d e?? + │ ● c d e?? ├─╯ - o a b e?? + ● a b e?? "###); let stderr = test_env.jj_cmd_failure(&repo_path, &["abandon", "root"]); diff --git a/tests/test_alias.rs b/tests/test_alias.rs index a6f490b56..55a170090 100644 --- a/tests/test_alias.rs +++ b/tests/test_alias.rs @@ -137,7 +137,7 @@ fn test_alias_cannot_override_builtin() { // Alias should be ignored let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-r", "root"]); insta::assert_snapshot!(stdout, @r###" - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); } @@ -177,28 +177,28 @@ fn test_alias_global_args_before_and_after() { let stdout = test_env.jj_cmd_success(&repo_path, &["l"]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Can pass global args before let stdout = test_env.jj_cmd_success(&repo_path, &["l", "--at-op", "@-"]); insta::assert_snapshot!(stdout, @r###" - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Can pass global args after let stdout = test_env.jj_cmd_success(&repo_path, &["--at-op", "@-", "l"]); insta::assert_snapshot!(stdout, @r###" - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Test passing global args both before and after let stdout = test_env.jj_cmd_success(&repo_path, &["--at-op", "abc123", "l", "--at-op", "@-"]); insta::assert_snapshot!(stdout, @r###" - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["-R", "../nonexistent", "l", "-R", "."]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); } @@ -214,7 +214,7 @@ fn test_alias_global_args_in_definition() { // The global argument in the alias is respected let stdout = test_env.jj_cmd_success(&repo_path, &["l"]); insta::assert_snapshot!(stdout, @r###" - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); } diff --git a/tests/test_branch_command.rs b/tests/test_branch_command.rs index e0ab0e9e8..df96a1ee2 100644 --- a/tests/test_branch_command.rs +++ b/tests/test_branch_command.rs @@ -34,14 +34,14 @@ fn test_branch_multiple_names() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ bar foo 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["branch", "delete", "foo", "bar"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); } @@ -71,13 +71,13 @@ fn test_branch_forget_glob() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ bar-2 foo-1 foo-3 foo-4 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["branch", "forget", "--glob", "foo-[1-3]"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ bar-2 foo-4 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); // Forgetting a branch via both explicit name and glob pattern, or with @@ -91,7 +91,7 @@ fn test_branch_forget_glob() { insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ bar-2 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); // Malformed glob diff --git a/tests/test_checkout.rs b/tests/test_checkout.rs index 9f789eabc..9e9447242 100644 --- a/tests/test_checkout.rs +++ b/tests/test_checkout.rs @@ -34,19 +34,19 @@ fn test_checkout() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 05ce7118568d3007efc9163b055f9cb4a6becfde - o 5c52832c3483e0ace06d047a806024984f28f1d7 second - o 69542c1984c1f9d91f7c6c9c9e6941782c944bd9 first - o 0000000000000000000000000000000000000000 + ● 5c52832c3483e0ace06d047a806024984f28f1d7 second + ● 69542c1984c1f9d91f7c6c9c9e6941782c944bd9 first + ● 0000000000000000000000000000000000000000 "###); // Can provide a description test_env.jj_cmd_success(&repo_path, &["checkout", "@--", "-m", "my message"]); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 1191baaf276e3d0b96b1747e885b3a517be80d6f my message - │ o 5c52832c3483e0ace06d047a806024984f28f1d7 second + │ ● 5c52832c3483e0ace06d047a806024984f28f1d7 second ├─╯ - o 69542c1984c1f9d91f7c6c9c9e6941782c944bd9 first - o 0000000000000000000000000000000000000000 + ● 69542c1984c1f9d91f7c6c9c9e6941782c944bd9 first + ● 0000000000000000000000000000000000000000 "###); } diff --git a/tests/test_commit_command.rs b/tests/test_commit_command.rs index c0490545d..ac9bcafe4 100644 --- a/tests/test_commit_command.rs +++ b/tests/test_commit_command.rs @@ -28,8 +28,8 @@ fn test_commit_with_description_from_cli() { test_env.jj_cmd_success(&workspace_path, &["commit", "-m=first"]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" @ b88fb4e51bdd - o 69542c1984c1 first - o 000000000000 + ● 69542c1984c1 first + ● 000000000000 "###); } @@ -47,8 +47,8 @@ fn test_commit_with_editor() { test_env.jj_cmd_success(&workspace_path, &["commit"]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" @ 3df78bc2b9b5 - o 30a8c2b3d6eb modified - o 000000000000 + ● 30a8c2b3d6eb modified + ● 000000000000 "###); insta::assert_snapshot!( std::fs::read_to_string(test_env.env_root().join("editor0")).unwrap(), @r###" diff --git a/tests/test_commit_template.rs b/tests/test_commit_template.rs index 1a45013aa..e40c6215e 100644 --- a/tests/test_commit_template.rs +++ b/tests/test_commit_template.rs @@ -32,11 +32,11 @@ fn test_log_parent_commit_ids() { insta::assert_snapshot!(stdout, @r###" @ c067170d4ca1bc6162b64f7550617ec809647f84 ├─╮ P: 4db490c88528133d579540b6900b8098f0c17701 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o │ 4db490c88528133d579540b6900b8098f0c17701 + ● │ 4db490c88528133d579540b6900b8098f0c17701 ├─╯ P: 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 230dd059e1b059aefc0da06a2e5a7dbf22362f22 + ● 230dd059e1b059aefc0da06a2e5a7dbf22362f22 │ P: 0000000000000000000000000000000000000000 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 P: "###); } @@ -53,8 +53,8 @@ fn test_log_author_timestamp() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "author.timestamp()"]); insta::assert_snapshot!(stdout, @r###" @ 2001-02-03 04:05:09.000 +07:00 - o 2001-02-03 04:05:07.000 +07:00 - o 1970-01-01 00:00:00.000 +00:00 + ● 2001-02-03 04:05:07.000 +07:00 + ● 1970-01-01 00:00:00.000 +00:00 "###); } @@ -92,9 +92,9 @@ fn test_log_default() { insta::assert_snapshot!(stdout, @r###" @ kkmpptxzrspx test.user@example.com 2001-02-03 04:05:09.000 +07:00 my-branch 9de54178d59d │ (empty) description 1 - o qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 4291e264ae97 + ● qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 4291e264ae97 │ add a file - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); @@ -103,9 +103,9 @@ fn test_log_default() { insta::assert_snapshot!(stdout, @r###" @ kkmpptxzrspx test.user@example.com 2001-02-03 04:05:09.000 +07:00 my-branch 9de54178d59d │ (empty) description 1 - o qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 4291e264ae97 + ● qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 4291e264ae97 │ add a file - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); @@ -134,7 +134,7 @@ fn test_log_default_divergence() { insta::assert_snapshot!(stdout, @r###" @ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 7a17d52e633c │ description 1 - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); @@ -146,22 +146,22 @@ fn test_log_default_divergence() { let stdout = test_env.jj_cmd_success(&repo_path, &["log"]); insta::assert_snapshot!(stdout, @r###" Concurrent modification detected, resolving automatically. - o qpvuntsmwlqt?? test.user@example.com 2001-02-03 04:05:10.000 +07:00 8979953d4c67 + ● qpvuntsmwlqt?? test.user@example.com 2001-02-03 04:05:10.000 +07:00 8979953d4c67 │ description 2 │ @ qpvuntsmwlqt?? test.user@example.com 2001-02-03 04:05:08.000 +07:00 7a17d52e633c ├─╯ description 1 - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); // Color let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always"]); insta::assert_snapshot!(stdout, @r###" - o qpvuntsmwlqt?? test.user@example.com 2001-02-03 04:05:10.000 +07:00 8979953d4c67 + ● qpvuntsmwlqt?? test.user@example.com 2001-02-03 04:05:10.000 +07:00 8979953d4c67 │ description 2 │ @ qpvuntsmwlqt?? test.user@example.com 2001-02-03 04:05:08.000 +07:00 7a17d52e633c ├─╯ description 1 - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); } @@ -179,9 +179,9 @@ fn test_log_git_head() { insta::assert_snapshot!(stdout, @r###" @ rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 50aaf4754c1e │ initial - o qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 master HEAD@git 230dd059e1b0 + ● qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 master HEAD@git 230dd059e1b0 │ (empty) (no description set) - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); } @@ -207,7 +207,7 @@ fn test_log_customize_short_id() { insta::assert_snapshot!(stdout, @r###" @ Q_pvun test.user@example.com 2001-02-03 04:05:08.000 +07:00 6_9542 │ (empty) first - o Z_zzzz 1970-01-01 00:00:00.000 +00:00 0_0000 + ● Z_zzzz 1970-01-01 00:00:00.000 +00:00 0_0000 (empty) (no description set) "###); @@ -226,7 +226,7 @@ fn test_log_customize_short_id() { insta::assert_snapshot!(stdout, @r###" @ QPVUNTSMWLQT test.user@example.com 2001-02-03 04:05:08.000 +07:00 69542c1984c1 │ (empty) first - o ZZZZZZZZZZZZ 1970-01-01 00:00:00.000 +00:00 000000000000 + ● ZZZZZZZZZZZZ 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); } diff --git a/tests/test_concurrent_operations.rs b/tests/test_concurrent_operations.rs index 5a7c82a7e..a3c349ecf 100644 --- a/tests/test_concurrent_operations.rs +++ b/tests/test_concurrent_operations.rs @@ -34,10 +34,10 @@ fn test_concurrent_operation_divergence() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]); insta::assert_snapshot!(stdout, @r###" Concurrent modification detected, resolving automatically. - o message 2 + ● message 2 │ @ message 1 ├─╯ - o + ● "###); } @@ -54,12 +54,12 @@ fn test_concurrent_operations_auto_rebase() { @ cde29280d4a9 test-username@host.example.com 22 years ago, lasted less than a microsecond │ describe commit 123ed18e4c4c0d77428df41112bc02ffc83fb935 │ args: jj describe -m initial - o 7c212e0863fd test-username@host.example.com 22 years ago, lasted less than a microsecond + ● 7c212e0863fd test-username@host.example.com 22 years ago, lasted less than a microsecond │ snapshot working copy │ args: jj describe -m initial - o a99a3fd5c51e test-username@host.example.com 22 years ago, lasted less than a microsecond + ● a99a3fd5c51e test-username@host.example.com 22 years ago, lasted less than a microsecond │ add workspace 'default' - o 56b94dfc38e7 test-username@host.example.com 22 years ago, lasted less than a microsecond + ● 56b94dfc38e7 test-username@host.example.com 22 years ago, lasted less than a microsecond initialize repo "###); let op_id_hex = stdout[3..15].to_string(); @@ -74,9 +74,9 @@ fn test_concurrent_operations_auto_rebase() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" Concurrent modification detected, resolving automatically. Rebased 1 descendant commits onto commits rewritten by other operation - o 3f06323826b4a293a9ee6d24cc0e07ad2961b5d5 new child + ● 3f06323826b4a293a9ee6d24cc0e07ad2961b5d5 new child @ d91437157468ec86bbbc9e6a14a60d3e8d1790ac rewritten - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); } @@ -105,10 +105,10 @@ fn test_concurrent_operations_wc_modified() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" Concurrent modification detected, resolving automatically. @ 4eb0610031b7cd148ff9f729a673a3f815033170 new child1 - │ o 4b20e61d23ee7d7c4d5e61e11e97c26e716f9c30 new child2 + │ ● 4b20e61d23ee7d7c4d5e61e11e97c26e716f9c30 new child2 ├─╯ - o 52c893bf3cd201e215b23e084e8a871244ca14d5 initial - o 0000000000000000000000000000000000000000 + ● 52c893bf3cd201e215b23e084e8a871244ca14d5 initial + ● 0000000000000000000000000000000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "--git"]); insta::assert_snapshot!(stdout, @r###" @@ -125,15 +125,15 @@ fn test_concurrent_operations_wc_modified() { let stdout = test_env.jj_cmd_success(&repo_path, &["op", "log", "-Tdescription"]); insta::assert_snapshot!(stdout, @r###" @ snapshot working copy - o resolve concurrent operations + ● resolve concurrent operations ├─╮ - o │ new empty commit - │ o new empty commit + ● │ new empty commit + │ ● new empty commit ├─╯ - o describe commit cf911c223d3e24e001fc8264d6dbf0610804fc40 - o snapshot working copy - o add workspace 'default' - o initialize repo + ● describe commit cf911c223d3e24e001fc8264d6dbf0610804fc40 + ● snapshot working copy + ● add workspace 'default' + ● initialize repo "###); } diff --git a/tests/test_duplicate_command.rs b/tests/test_duplicate_command.rs index a502c9183..76fa811f5 100644 --- a/tests/test_duplicate_command.rs +++ b/tests/test_duplicate_command.rs @@ -43,10 +43,10 @@ fn test_duplicate() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 17a00fc21654 c ├─╮ - o │ d370aee184ba b - │ o 2443ea76b0b1 a + ● │ d370aee184ba b + │ ● 2443ea76b0b1 a ├─╯ - o 000000000000 + ● 000000000000 "###); let stderr = test_env.jj_cmd_failure(&repo_path, &["duplicate", "root"]); @@ -59,14 +59,14 @@ fn test_duplicate() { Duplicated 2443ea76b0b1 as 2f6dc5a1ffc2 a "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 2f6dc5a1ffc2 a + ● 2f6dc5a1ffc2 a │ @ 17a00fc21654 c │ ├─╮ - │ o │ d370aee184ba b + │ ● │ d370aee184ba b ├─╯ │ - │ o 2443ea76b0b1 a + │ ● 2443ea76b0b1 a ├───╯ - o 000000000000 + ● 000000000000 "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["undo"]), @""); @@ -75,14 +75,14 @@ fn test_duplicate() { Duplicated 17a00fc21654 as 1dd099ea963c c "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 1dd099ea963c c + ● 1dd099ea963c c ├─╮ │ │ @ 17a00fc21654 c ╭─┬─╯ - o │ d370aee184ba b - │ o 2443ea76b0b1 a + ● │ d370aee184ba b + │ ● 2443ea76b0b1 a ├─╯ - o 000000000000 + ● 000000000000 "###); } @@ -101,12 +101,12 @@ fn test_duplicate_many() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 921dde6e55c0 e ├─╮ - o │ ebd06dba20ec d - o │ c0cb3a0b73e7 c - │ o 1394f625cbbd b + ● │ ebd06dba20ec d + ● │ c0cb3a0b73e7 c + │ ● 1394f625cbbd b ├─╯ - o 2443ea76b0b1 a - o 000000000000 + ● 2443ea76b0b1 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["duplicate", "b:"]); @@ -115,18 +115,18 @@ fn test_duplicate_many() { Duplicated 921dde6e55c0 as 8348ddcec733 e "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 8348ddcec733 e + ● 8348ddcec733 e ├─╮ - o │ 3b74d9691015 b + ● │ 3b74d9691015 b │ │ @ 921dde6e55c0 e │ ╭─┤ - │ o │ ebd06dba20ec d - │ o │ c0cb3a0b73e7 c + │ ● │ ebd06dba20ec d + │ ● │ c0cb3a0b73e7 c ├─╯ │ - │ o 1394f625cbbd b + │ ● 1394f625cbbd b ├───╯ - o 2443ea76b0b1 a - o 000000000000 + ● 2443ea76b0b1 a + ● 000000000000 "###); // Try specifying the same commit twice directly @@ -136,16 +136,16 @@ fn test_duplicate_many() { Duplicated 1394f625cbbd as 0276d3d7c24d b "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 0276d3d7c24d b + ● 0276d3d7c24d b │ @ 921dde6e55c0 e │ ├─╮ - │ o │ ebd06dba20ec d - │ o │ c0cb3a0b73e7 c + │ ● │ ebd06dba20ec d + │ ● │ c0cb3a0b73e7 c ├─╯ │ - │ o 1394f625cbbd b + │ ● 1394f625cbbd b ├───╯ - o 2443ea76b0b1 a - o 000000000000 + ● 2443ea76b0b1 a + ● 000000000000 "###); // Try specifying the same commit twice indirectly @@ -157,20 +157,20 @@ fn test_duplicate_many() { Duplicated 921dde6e55c0 as 0f7430f2727a e "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 0f7430f2727a e + ● 0f7430f2727a e ├─╮ - o │ 2181781b4f81 d - │ o fa167d18a83a b + ● │ 2181781b4f81 d + │ ● fa167d18a83a b │ │ @ 921dde6e55c0 e │ │ ├─╮ - │ │ o │ ebd06dba20ec d + │ │ ● │ ebd06dba20ec d ├───╯ │ - o │ │ c0cb3a0b73e7 c + ● │ │ c0cb3a0b73e7 c ├─╯ │ - │ o 1394f625cbbd b + │ ● 1394f625cbbd b ├─────╯ - o 2443ea76b0b1 a - o 000000000000 + ● 2443ea76b0b1 a + ● 000000000000 "###); test_env.jj_cmd_success(&repo_path, &["undo"]); @@ -178,12 +178,12 @@ fn test_duplicate_many() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 921dde6e55c0 e ├─╮ - o │ ebd06dba20ec d - o │ c0cb3a0b73e7 c - │ o 1394f625cbbd b + ● │ ebd06dba20ec d + ● │ c0cb3a0b73e7 c + │ ● 1394f625cbbd b ├─╯ - o 2443ea76b0b1 a - o 000000000000 + ● 2443ea76b0b1 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["duplicate", "d:", "a"]); insta::assert_snapshot!(stdout, @r###" @@ -192,20 +192,20 @@ fn test_duplicate_many() { Duplicated 921dde6e55c0 as 9bd4389f5d47 e "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 9bd4389f5d47 e + ● 9bd4389f5d47 e ├─╮ - o │ d94e4c55a68b d - │ │ o c6f7f8c4512e a + ● │ d94e4c55a68b d + │ │ ● c6f7f8c4512e a │ │ │ @ 921dde6e55c0 e │ ╭───┤ - │ │ │ o ebd06dba20ec d + │ │ │ ● ebd06dba20ec d ├─────╯ - o │ │ c0cb3a0b73e7 c - │ o │ 1394f625cbbd b + ● │ │ c0cb3a0b73e7 c + │ ● │ 1394f625cbbd b ├─╯ │ - o │ 2443ea76b0b1 a + ● │ 2443ea76b0b1 a ├───╯ - o 000000000000 + ● 000000000000 "###); // Check for BUG -- makes too many 'a'-s, etc. @@ -219,22 +219,22 @@ fn test_duplicate_many() { Duplicated 921dde6e55c0 as ee8fe64ed254 e "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o ee8fe64ed254 e + ● ee8fe64ed254 e ├─╮ - o │ 2f2442db08eb d - o │ df53fa589286 c - │ o e13ac0adabdf b + ● │ 2f2442db08eb d + ● │ df53fa589286 c + │ ● e13ac0adabdf b ├─╯ - o 0fe67a05989e a + ● 0fe67a05989e a │ @ 921dde6e55c0 e │ ├─╮ - │ o │ ebd06dba20ec d - │ o │ c0cb3a0b73e7 c - │ │ o 1394f625cbbd b + │ ● │ ebd06dba20ec d + │ ● │ c0cb3a0b73e7 c + │ │ ● 1394f625cbbd b │ ├─╯ - │ o 2443ea76b0b1 a + │ ● 2443ea76b0b1 a ├─╯ - o 000000000000 + ● 000000000000 "###); } @@ -248,7 +248,7 @@ fn test_undo_after_duplicate() { create_commit(&test_env, &repo_path, "a", &[]); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 2443ea76b0b1 a - o 000000000000 + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["duplicate", "a"]); @@ -256,16 +256,16 @@ fn test_undo_after_duplicate() { Duplicated 2443ea76b0b1 as f5cefcbb65a4 a "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o f5cefcbb65a4 a + ● f5cefcbb65a4 a │ @ 2443ea76b0b1 a ├─╯ - o 000000000000 + ● 000000000000 "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["undo"]), @""); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 2443ea76b0b1 a - o 000000000000 + ● 000000000000 "###); } @@ -281,8 +281,8 @@ fn test_rebase_duplicates() { // Test the setup insta::assert_snapshot!(get_log_output_with_ts(&test_env, &repo_path), @r###" @ 1394f625cbbd b @ 2001-02-03 04:05:11.000 +07:00 - o 2443ea76b0b1 a @ 2001-02-03 04:05:09.000 +07:00 - o 000000000000 @ 1970-01-01 00:00:00.000 +00:00 + ● 2443ea76b0b1 a @ 2001-02-03 04:05:09.000 +07:00 + ● 000000000000 @ 1970-01-01 00:00:00.000 +00:00 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["duplicate", "b"]); @@ -294,13 +294,13 @@ fn test_rebase_duplicates() { Duplicated 1394f625cbbd as 870cf438ccbb b "###); insta::assert_snapshot!(get_log_output_with_ts(&test_env, &repo_path), @r###" - o 870cf438ccbb b @ 2001-02-03 04:05:14.000 +07:00 - │ o fdaaf3950f07 b @ 2001-02-03 04:05:13.000 +07:00 + ● 870cf438ccbb b @ 2001-02-03 04:05:14.000 +07:00 + │ ● fdaaf3950f07 b @ 2001-02-03 04:05:13.000 +07:00 ├─╯ │ @ 1394f625cbbd b @ 2001-02-03 04:05:11.000 +07:00 ├─╯ - o 2443ea76b0b1 a @ 2001-02-03 04:05:09.000 +07:00 - o 000000000000 @ 1970-01-01 00:00:00.000 +00:00 + ● 2443ea76b0b1 a @ 2001-02-03 04:05:09.000 +07:00 + ● 000000000000 @ 1970-01-01 00:00:00.000 +00:00 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["rebase", "-s", "a", "-d", "a-"]); @@ -311,13 +311,13 @@ fn test_rebase_duplicates() { // Some of the duplicate commits' timestamps were changed a little to make them // have distinct commit ids. insta::assert_snapshot!(get_log_output_with_ts(&test_env, &repo_path), @r###" - o b43fe7354758 b @ 2001-02-03 04:05:14.000 +07:00 - │ o 08beb14c3ead b @ 2001-02-03 04:05:15.000 +07:00 + ● b43fe7354758 b @ 2001-02-03 04:05:14.000 +07:00 + │ ● 08beb14c3ead b @ 2001-02-03 04:05:15.000 +07:00 ├─╯ │ @ 29bd36b60e60 b @ 2001-02-03 04:05:16.000 +07:00 ├─╯ - o 2f6dc5a1ffc2 a @ 2001-02-03 04:05:16.000 +07:00 - o 000000000000 @ 1970-01-01 00:00:00.000 +00:00 + ● 2f6dc5a1ffc2 a @ 2001-02-03 04:05:16.000 +07:00 + ● 000000000000 @ 1970-01-01 00:00:00.000 +00:00 "###); } diff --git a/tests/test_edit_command.rs b/tests/test_edit_command.rs index 8cb6ab219..6c5e837f7 100644 --- a/tests/test_edit_command.rs +++ b/tests/test_edit_command.rs @@ -46,9 +46,9 @@ fn test_edit() { Added 0 files, modified 1 files, removed 0 files "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o b2f7e9c549aa second + ● b2f7e9c549aa second @ f41390a5efbf first - o 000000000000 + ● 000000000000 "###); insta::assert_snapshot!(read_file(&repo_path.join("file1")), @"0"); @@ -56,9 +56,9 @@ fn test_edit() { std::fs::write(repo_path.join("file2"), "0").unwrap(); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" Rebased 1 descendant commits onto updated working copy - o 51d937a3eeb4 second + ● 51d937a3eeb4 second @ 409306de8f44 first - o 000000000000 + ● 000000000000 "###); } @@ -75,9 +75,9 @@ fn test_edit_current_wc_commit_missing() { test_env.jj_cmd_success(&repo_path, &["describe", "-m", "second"]); test_env.jj_cmd_success(&repo_path, &["edit", "@-"]); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 5c52832c3483 second + ● 5c52832c3483 second @ 69542c1984c1 first - o 000000000000 + ● 000000000000 "###); // Make the Git backend fail to read the current working copy commit diff --git a/tests/test_git_colocated.rs b/tests/test_git_colocated.rs index f76a9d73c..c9edefd51 100644 --- a/tests/test_git_colocated.rs +++ b/tests/test_git_colocated.rs @@ -60,8 +60,8 @@ fn test_git_colocated() { test_env.jj_cmd_success(&workspace_root, &["init", "--git-repo", "."]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ 3e9369cd54227eb88455e1834dbc08aad6a16ac4 - o e61b6729ff4292870702f2f72b2a60165679ef37 master - o 0000000000000000000000000000000000000000 + ● e61b6729ff4292870702f2f72b2a60165679ef37 master + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!( git_repo.head().unwrap().peel_to_commit().unwrap().id().to_string(), @@ -73,8 +73,8 @@ fn test_git_colocated() { std::fs::write(workspace_root.join("file"), "modified").unwrap(); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ b26951a9c6f5c270e4d039880208952fd5faae5e - o e61b6729ff4292870702f2f72b2a60165679ef37 master - o 0000000000000000000000000000000000000000 + ● e61b6729ff4292870702f2f72b2a60165679ef37 master + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!( git_repo.head().unwrap().peel_to_commit().unwrap().id().to_string(), @@ -85,9 +85,9 @@ fn test_git_colocated() { test_env.jj_cmd_success(&workspace_root, &["new"]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ 9dbb23ff2ff5e66c43880f1042369d704f7a321e - o b26951a9c6f5c270e4d039880208952fd5faae5e - o e61b6729ff4292870702f2f72b2a60165679ef37 master - o 0000000000000000000000000000000000000000 + ● b26951a9c6f5c270e4d039880208952fd5faae5e + ● e61b6729ff4292870702f2f72b2a60165679ef37 master + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!( git_repo.head().unwrap().target().unwrap().to_string(), @@ -110,7 +110,7 @@ fn test_git_colocated_export_branches_on_snapshot() { test_env.jj_cmd_success(&workspace_root, &["branch", "create", "foo"]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ 438471f3fbf1004298d8fb01eeb13663a051a643 foo - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // The branch gets updated when we modify the working copy, and it should get @@ -118,7 +118,7 @@ fn test_git_colocated_export_branches_on_snapshot() { std::fs::write(workspace_root.join("file"), "modified").unwrap(); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ fab22d1acf5bb9c5aa48cb2c3dd2132072a359ca foo - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!(git_repo .find_reference("refs/heads/foo") @@ -159,8 +159,8 @@ fn test_git_colocated_rebase_on_import() { git_repo.set_head("refs/heads/master").unwrap(); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ 7f96185cfbe36341d0f9a86ebfaeab67a5922c7e - o 4bcbeaba9a4b309c5f45a8807fbf5499b9714315 master - o 0000000000000000000000000000000000000000 + ● 4bcbeaba9a4b309c5f45a8807fbf5499b9714315 master + ● 0000000000000000000000000000000000000000 "###); } @@ -174,10 +174,10 @@ fn test_git_colocated_branches() { test_env.jj_cmd_success(&workspace_root, &["new", "@-", "-m", "bar"]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ 3560559274ab431feea00b7b7e0b9250ecce951f - │ o 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda + │ ● 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda ├─╯ - o 230dd059e1b059aefc0da06a2e5a7dbf22362f22 master - o 0000000000000000000000000000000000000000 + ● 230dd059e1b059aefc0da06a2e5a7dbf22362f22 master + ● 0000000000000000000000000000000000000000 "###); // Create a branch in jj. It should be exported to Git even though it points to @@ -204,10 +204,10 @@ fn test_git_colocated_branches() { insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" Working copy now at: eb08b363bb5e (no description set) @ eb08b363bb5ef8ee549314260488980d7bbe8f63 - │ o 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda master + │ ● 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda master ├─╯ - o 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 230dd059e1b059aefc0da06a2e5a7dbf22362f22 + ● 0000000000000000000000000000000000000000 "###); } @@ -249,9 +249,9 @@ fn test_git_colocated_fetch_deleted_branch() { test_env.jj_cmd_success(&clone_path, &["init", "--git-repo=."]); insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r###" @ bc7d08e8de9b7bc248b9358a05e96f1671bbd4d9 - o e1f4268fabd2c84e880c5eb5bd87e076180fc8e3 B - o a86754f975f953fa25da4265764adc0c62e9ce6b A master - o 0000000000000000000000000000000000000000 + ● e1f4268fabd2c84e880c5eb5bd87e076180fc8e3 B + ● a86754f975f953fa25da4265764adc0c62e9ce6b A master + ● 0000000000000000000000000000000000000000 "###); test_env.jj_cmd_success(&origin_path, &["branch", "delete", "B"]); @@ -260,9 +260,9 @@ fn test_git_colocated_fetch_deleted_branch() { // TODO: e1f4 should have been abandoned (#864) insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r###" @ bc7d08e8de9b7bc248b9358a05e96f1671bbd4d9 - o e1f4268fabd2c84e880c5eb5bd87e076180fc8e3 - o a86754f975f953fa25da4265764adc0c62e9ce6b A master - o 0000000000000000000000000000000000000000 + ● e1f4268fabd2c84e880c5eb5bd87e076180fc8e3 + ● a86754f975f953fa25da4265764adc0c62e9ce6b A master + ● 0000000000000000000000000000000000000000 "###); } @@ -276,25 +276,25 @@ fn test_git_colocated_squash_undo() { // Test the setup insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###" @ rlvkpnrzqnoo 8f71e3b6a3be - o qpvuntsmwlqt a86754f975f9 A master - o zzzzzzzzzzzz 000000000000 + ● qpvuntsmwlqt a86754f975f9 A master + ● zzzzzzzzzzzz 000000000000 "###); test_env.jj_cmd_success(&repo_path, &["squash"]); insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###" @ zsuskulnrvyr f0c12b0396d9 - o qpvuntsmwlqt 2f376ea1478c A master - o zzzzzzzzzzzz 000000000000 + ● qpvuntsmwlqt 2f376ea1478c A master + ● zzzzzzzzzzzz 000000000000 "###); test_env.jj_cmd_success(&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###" - o qpvuntsmwlqt 2f376ea1478c A master !divergence! + ● qpvuntsmwlqt 2f376ea1478c A master !divergence! │ @ rlvkpnrzqnoo 8f71e3b6a3be - │ o qpvuntsmwlqt a86754f975f9 A !divergence! + │ ● qpvuntsmwlqt a86754f975f9 A !divergence! ├─╯ - o zzzzzzzzzzzz 000000000000 + ● zzzzzzzzzzzz 000000000000 "###); } @@ -373,8 +373,8 @@ fn test_git_colocated_unreachable_commits() { test_env.jj_cmd_success(&workspace_root, &["init", "--git-repo", "."]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###" @ 66ae47cee4f8c28ee8d7e4f5d9401b03c07e22f2 - o 2ee37513d2b5e549f7478c671a780053614bff19 master - o 0000000000000000000000000000000000000000 + ● 2ee37513d2b5e549f7478c671a780053614bff19 master + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!( git_repo.head().unwrap().peel_to_commit().unwrap().id().to_string(), diff --git a/tests/test_git_fetch.rs b/tests/test_git_fetch.rs index 4021390b6..dbbf54aa3 100644 --- a/tests/test_git_fetch.rs +++ b/tests/test_git_fetch.rs @@ -308,18 +308,18 @@ fn test_git_fetch_all() { insta::assert_snapshot!(source_log, @r###" ===== Source git repo contents ===== @ c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 - o 000000000000 + ● ff36dc55760e descr_for_trunk1 master trunk1 + ● 000000000000 "###); // Nothing in our repo before the fetch insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" @ 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); insta::assert_snapshot!(get_branch_output(&test_env, &target_jj_repo_path), @""); insta::assert_snapshot!(test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch"]), @""); @@ -331,15 +331,15 @@ fn test_git_fetch_all() { trunk1: ff36dc55760e descr_for_trunk1 "###); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + ● c7d4bdcbc215 descr_for_b b + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 + ● ff36dc55760e descr_for_trunk1 master trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // ==== Change both repos ==== @@ -347,14 +347,14 @@ fn test_git_fetch_all() { let source_log = create_trunk2_and_rebase_branches(&test_env, &source_git_repo_path); insta::assert_snapshot!(source_log, @r###" ===== Source git repo contents ===== - o babc49226c14 descr_for_b b - │ o 91e46b4b2653 descr_for_a2 a2 + ● babc49226c14 descr_for_b b + │ ● 91e46b4b2653 descr_for_a2 a2 ├─╯ - │ o 0424f6dfc1ff descr_for_a1 a1 + │ ● 0424f6dfc1ff descr_for_a1 a1 ├─╯ @ 8f1f14fbbf42 descr_for_trunk2 trunk2 - o ff36dc55760e descr_for_trunk1 master trunk1 - o 000000000000 + ● ff36dc55760e descr_for_trunk1 master trunk1 + ● 000000000000 "###); // Change a branch in the source repo as well, so that it becomes conflicted. test_env.jj_cmd_success( @@ -364,15 +364,15 @@ fn test_git_fetch_all() { // Our repo before and after fetch insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o 061eddbb43ab new_descr_for_b_to_create_conflict b* - │ o decaa3966c83 descr_for_a2 a2 + ● 061eddbb43ab new_descr_for_b_to_create_conflict b* + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 + ● ff36dc55760e descr_for_trunk1 master trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); insta::assert_snapshot!(get_branch_output(&test_env, &target_jj_repo_path), @r###" a1: 359a9a02457d descr_for_a1 @@ -396,18 +396,18 @@ fn test_git_fetch_all() { trunk2: 8f1f14fbbf42 descr_for_trunk2 "###); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o babc49226c14 descr_for_b b?? b@origin - │ o 91e46b4b2653 descr_for_a2 a2 + ● babc49226c14 descr_for_b b?? b@origin + │ ● 91e46b4b2653 descr_for_a2 a2 ├─╯ - │ o 0424f6dfc1ff descr_for_a1 a1 + │ ● 0424f6dfc1ff descr_for_a1 a1 ├─╯ - o 8f1f14fbbf42 descr_for_trunk2 trunk2 - │ o 061eddbb43ab new_descr_for_b_to_create_conflict b?? + ● 8f1f14fbbf42 descr_for_trunk2 trunk2 + │ ● 061eddbb43ab new_descr_for_b_to_create_conflict b?? ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 + ● ff36dc55760e descr_for_trunk1 master trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); } @@ -431,12 +431,12 @@ fn test_git_fetch_some_of_many_branches() { insta::assert_snapshot!(source_log, @r###" ===== Source git repo contents ===== @ c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 - o 000000000000 + ● ff36dc55760e descr_for_trunk1 master trunk1 + ● 000000000000 "###); // Test an error message @@ -449,17 +449,17 @@ fn test_git_fetch_some_of_many_branches() { // Nothing in our repo before the fetch insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" @ 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); // Fetch one branch... let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch", "--branch", "b"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - o ff36dc55760e descr_for_trunk1 + ● c7d4bdcbc215 descr_for_b b + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // ...check what the intermediate state looks like... insta::assert_snapshot!(get_branch_output(&test_env, &target_jj_repo_path), @r###" @@ -469,15 +469,15 @@ fn test_git_fetch_some_of_many_branches() { let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch", "--branch", "a*"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o decaa3966c83 descr_for_a2 a2 - │ o 359a9a02457d descr_for_a1 a1 + ● decaa3966c83 descr_for_a2 a2 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - │ o c7d4bdcbc215 descr_for_b b + │ ● c7d4bdcbc215 descr_for_b b ├─╯ - o ff36dc55760e descr_for_trunk1 + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // Fetching the same branch again let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch", "--branch", "a1"]); @@ -485,15 +485,15 @@ fn test_git_fetch_some_of_many_branches() { Nothing changed. "###); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o decaa3966c83 descr_for_a2 a2 - │ o 359a9a02457d descr_for_a1 a1 + ● decaa3966c83 descr_for_a2 a2 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - │ o c7d4bdcbc215 descr_for_b b + │ ● c7d4bdcbc215 descr_for_b b ├─╯ - o ff36dc55760e descr_for_trunk1 + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // ==== Change both repos ==== @@ -501,14 +501,14 @@ fn test_git_fetch_some_of_many_branches() { let source_log = create_trunk2_and_rebase_branches(&test_env, &source_git_repo_path); insta::assert_snapshot!(source_log, @r###" ===== Source git repo contents ===== - o 13ac032802f1 descr_for_b b - │ o 010977d69c5b descr_for_a2 a2 + ● 13ac032802f1 descr_for_b b + │ ● 010977d69c5b descr_for_a2 a2 ├─╯ - │ o 6f4e1c4dfe29 descr_for_a1 a1 + │ ● 6f4e1c4dfe29 descr_for_a1 a1 ├─╯ @ 09430ba04a82 descr_for_trunk2 trunk2 - o ff36dc55760e descr_for_trunk1 master trunk1 - o 000000000000 + ● ff36dc55760e descr_for_trunk1 master trunk1 + ● 000000000000 "###); // Change a branch in the source repo as well, so that it becomes conflicted. test_env.jj_cmd_success( @@ -518,15 +518,15 @@ fn test_git_fetch_some_of_many_branches() { // Our repo before and after fetch of two branches insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o 2be688d8c664 new_descr_for_b_to_create_conflict b* - │ o decaa3966c83 descr_for_a2 a2 + ● 2be688d8c664 new_descr_for_b_to_create_conflict b* + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); let stdout = test_env.jj_cmd_success( &target_jj_repo_path, @@ -534,18 +534,18 @@ fn test_git_fetch_some_of_many_branches() { ); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o 13ac032802f1 descr_for_b b?? b@origin - │ o 6f4e1c4dfe29 descr_for_a1 a1 + ● 13ac032802f1 descr_for_b b?? b@origin + │ ● 6f4e1c4dfe29 descr_for_a1 a1 ├─╯ - o 09430ba04a82 descr_for_trunk2 - │ o 2be688d8c664 new_descr_for_b_to_create_conflict b?? + ● 09430ba04a82 descr_for_trunk2 + │ ● 2be688d8c664 new_descr_for_b_to_create_conflict b?? ├─╯ - │ o decaa3966c83 descr_for_a2 a2 + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - o ff36dc55760e descr_for_trunk1 + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // We left a2 where it was before, let's see how `jj branch list` sees this. @@ -566,18 +566,18 @@ fn test_git_fetch_some_of_many_branches() { ); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o 010977d69c5b descr_for_a2 a2 - │ o 13ac032802f1 descr_for_b b?? b@origin + ● 010977d69c5b descr_for_a2 a2 + │ ● 13ac032802f1 descr_for_b b?? b@origin ├─╯ - │ o 6f4e1c4dfe29 descr_for_a1 a1 + │ ● 6f4e1c4dfe29 descr_for_a1 a1 ├─╯ - o 09430ba04a82 descr_for_trunk2 - │ o 2be688d8c664 new_descr_for_b_to_create_conflict b?? + ● 09430ba04a82 descr_for_trunk2 + │ ● 2be688d8c664 new_descr_for_b_to_create_conflict b?? ├─╯ - o ff36dc55760e descr_for_trunk1 + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); insta::assert_snapshot!(get_branch_output(&test_env, &target_jj_repo_path), @r###" a1: 6f4e1c4dfe29 descr_for_a1 @@ -610,12 +610,12 @@ fn test_git_fetch_undo() { insta::assert_snapshot!(source_log, @r###" ===== Source git repo contents ===== @ c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 - o 000000000000 + ● ff36dc55760e descr_for_trunk1 master trunk1 + ● 000000000000 "###); // Fetch 2 branches @@ -625,29 +625,29 @@ fn test_git_fetch_undo() { ); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - │ o 359a9a02457d descr_for_a1 a1 + ● c7d4bdcbc215 descr_for_b b + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); insta::assert_snapshot!(test_env.jj_cmd_success(&target_jj_repo_path, &["undo"]), @""); // The undo works as expected insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" @ 230dd059e1b0 - o 000000000000 + ● 000000000000 "###); // Now try to fetch just one branch let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch", "--branch", "b"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - o ff36dc55760e descr_for_trunk1 + ● c7d4bdcbc215 descr_for_b b + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); } @@ -749,27 +749,27 @@ fn test_git_fetch_removed_branch() { insta::assert_snapshot!(source_log, @r###" ===== Source git repo contents ===== @ c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 - o 000000000000 + ● ff36dc55760e descr_for_trunk1 master trunk1 + ● 000000000000 "###); // Fetch all branches let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + ● c7d4bdcbc215 descr_for_b b + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 + ● ff36dc55760e descr_for_trunk1 master trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // Remove a2 branch in origin @@ -781,28 +781,28 @@ fn test_git_fetch_removed_branch() { Nothing changed. "###); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + ● c7d4bdcbc215 descr_for_b b + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 + ● ff36dc55760e descr_for_trunk1 master trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // Fetch branches a2 from origin, and check that it has been removed locally let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch", "--branch", "a2"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - │ o 359a9a02457d descr_for_a1 a1 + ● c7d4bdcbc215 descr_for_b b + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 + ● ff36dc55760e descr_for_trunk1 master trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); } @@ -826,27 +826,27 @@ fn test_git_fetch_removed_parent_branch() { insta::assert_snapshot!(source_log, @r###" ===== Source git repo contents ===== @ c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 - o 000000000000 + ● ff36dc55760e descr_for_trunk1 master trunk1 + ● 000000000000 "###); // Fetch all branches let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + ● c7d4bdcbc215 descr_for_b b + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - │ o 359a9a02457d descr_for_a1 a1 + │ ● 359a9a02457d descr_for_a1 a1 ├─╯ - o ff36dc55760e descr_for_trunk1 master trunk1 + ● ff36dc55760e descr_for_trunk1 master trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); // Remove all branches in origin. @@ -863,12 +863,12 @@ fn test_git_fetch_removed_parent_branch() { ); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" - o c7d4bdcbc215 descr_for_b b - │ o decaa3966c83 descr_for_a2 a2 + ● c7d4bdcbc215 descr_for_b b + │ ● decaa3966c83 descr_for_a2 a2 ├─╯ - o ff36dc55760e descr_for_trunk1 + ● ff36dc55760e descr_for_trunk1 │ @ 230dd059e1b0 ├─╯ - o 000000000000 + ● 000000000000 "###); } diff --git a/tests/test_global_opts.rs b/tests/test_global_opts.rs index 05c8e96b4..d51d7f1a9 100644 --- a/tests/test_global_opts.rs +++ b/tests/test_global_opts.rs @@ -74,7 +74,7 @@ fn test_ignore_working_copy() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ 438471f3fbf1004298d8fb01eeb13663a051a643 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Modify the file. With --ignore-working-copy, we still get the same commit @@ -90,7 +90,7 @@ fn test_ignore_working_copy() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ fab22d1acf5bb9c5aa48cb2c3dd2132072a359ca - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); } @@ -214,7 +214,7 @@ fn test_color_config() { let stdout = test_env.jj_cmd_success(&repo_path, &["--color=always", "log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Test that color is used if it's requested in the config file @@ -222,21 +222,21 @@ fn test_color_config() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Test that --color=never overrides the config. let stdout = test_env.jj_cmd_success(&repo_path, &["--color=never", "log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Test that --color=auto overrides the config. let stdout = test_env.jj_cmd_success(&repo_path, &["--color=auto", "log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Test that --config-toml 'ui.color="never"' overrides the config. @@ -252,7 +252,7 @@ fn test_color_config() { ); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // --color overrides --config-toml 'ui.color=...'. @@ -270,7 +270,7 @@ fn test_color_config() { ); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Test that NO_COLOR does NOT override the request for color in the config file @@ -278,7 +278,7 @@ fn test_color_config() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // Test that per-repo config overrides the user config. @@ -290,7 +290,7 @@ fn test_color_config() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id"]); insta::assert_snapshot!(stdout, @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); } diff --git a/tests/test_init_command.rs b/tests/test_init_command.rs index 08ed41c5c..34536ba3c 100644 --- a/tests/test_init_command.rs +++ b/tests/test_init_command.rs @@ -107,7 +107,7 @@ fn test_init_git_external() { // Check that the Git repo's HEAD got checked out let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-r", "@-"]); insta::assert_snapshot!(stdout, @r###" - o mwrttmoslwzp git.user@example.com 1970-01-01 01:02:03.000 +01:00 my-branch HEAD@git 8d698d4a8ee1 + ● mwrttmoslwzp git.user@example.com 1970-01-01 01:02:03.000 +01:00 my-branch HEAD@git 8d698d4a8ee1 │ My commit message ~ "###); @@ -151,7 +151,7 @@ fn test_init_git_colocated() { // Check that the Git repo's HEAD got checked out let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-r", "@-"]); insta::assert_snapshot!(stdout, @r###" - o mwrttmoslwzp git.user@example.com 1970-01-01 01:02:03.000 +01:00 my-branch HEAD@git 8d698d4a8ee1 + ● mwrttmoslwzp git.user@example.com 1970-01-01 01:02:03.000 +01:00 my-branch HEAD@git 8d698d4a8ee1 │ My commit message ~ "###); diff --git a/tests/test_log_command.rs b/tests/test_log_command.rs index dfb7b1149..dc45dea61 100644 --- a/tests/test_log_command.rs +++ b/tests/test_log_command.rs @@ -44,8 +44,8 @@ fn test_log_with_or_without_diff() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]); insta::assert_snapshot!(stdout, @r###" @ a new commit - o add a file - o + ● add a file + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description", "-p"]); @@ -54,10 +54,10 @@ fn test_log_with_or_without_diff() { │ Modified regular file file1: │ 1 1: foo │ 2: bar - o add a file + ● add a file │ Added regular file file1: │ 1: foo - o + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description", "--no-graph"]); @@ -74,11 +74,11 @@ fn test_log_with_or_without_diff() { │ Modified regular file file1: │ 1 1: foo │ 2: bar - o add a file + ● add a file │ A file1 │ Added regular file file1: │ 1: foo - o + ● "###); // `-s` for summary, `--git` for git diff (which implies `-p`) @@ -93,7 +93,7 @@ fn test_log_with_or_without_diff() { │ @@ -1,1 +1,2 @@ │ foo │ +bar - o add a file + ● add a file │ A file1 │ diff --git a/file1 b/file1 │ new file mode 100644 @@ -102,7 +102,7 @@ fn test_log_with_or_without_diff() { │ +++ b/file1 │ @@ -1,0 +1,1 @@ │ +foo - o + ● "###); // `-p` enables default "summary" output, so `-s` is noop @@ -120,9 +120,9 @@ fn test_log_with_or_without_diff() { insta::assert_snapshot!(stdout, @r###" @ a new commit │ M file1 - o add a file + ● add a file │ A file1 - o + ● "###); // `-p` enables default "color-words" diff output, so `--color-words` is noop @@ -135,10 +135,10 @@ fn test_log_with_or_without_diff() { │ Modified regular file file1: │ 1 1: foo │ 2: bar - o add a file + ● add a file │ Added regular file file1: │ 1: foo - o + ● "###); // `--git` enables git diff, so `-p` is noop @@ -207,9 +207,9 @@ fn test_log_with_or_without_diff() { insta::assert_snapshot!(stdout, @r###" @ a new commit │ M file1 - o add a file + ● add a file │ A file1 - o + ● "###); let stdout = test_env.jj_cmd_success( &repo_path, @@ -401,7 +401,7 @@ fn test_log_prefix_highlight_styled() { insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["log", "-r", "original", "-T", &prefix_format(Some(12))]), @r###" - o Change qpvuntsmwlqt initial ba1a30916d29 original + ● Change qpvuntsmwlqt initial ba1a30916d29 original │ ~ "### @@ -420,16 +420,16 @@ fn test_log_prefix_highlight_styled() { insta::assert_snapshot!(stdout, @r###" @ Change wqnwkozpkust commit9 03f51310b83e - o Change kmkuslswpqwq commit8 f77fb1909080 - o Change kpqxywonksrl commit7 e715ad5db646 - o Change znkkpsqqskkl commit6 38622e54e2e5 - o Change yostqsxwqrlt commit5 0cf42f60199c - o Change vruxwmqvtpmx commit4 9e6015e4e622 - o Change yqosqzytrlsw commit3 06f34d9b1475 - o Change royxmykxtrkr commit2 1f99a5e19891 - o Change mzvwutvlkqwt commit1 7b1f7dee65b4 - o Change qpvuntsmwlqt initial ba1a30916d29 original - o Change zzzzzzzzzzzz 000000000000 + ● Change kmkuslswpqwq commit8 f77fb1909080 + ● Change kpqxywonksrl commit7 e715ad5db646 + ● Change znkkpsqqskkl commit6 38622e54e2e5 + ● Change yostqsxwqrlt commit5 0cf42f60199c + ● Change vruxwmqvtpmx commit4 9e6015e4e622 + ● Change yqosqzytrlsw commit3 06f34d9b1475 + ● Change royxmykxtrkr commit2 1f99a5e19891 + ● Change mzvwutvlkqwt commit1 7b1f7dee65b4 + ● Change qpvuntsmwlqt initial ba1a30916d29 original + ● Change zzzzzzzzzzzz 000000000000 "### ); let stdout = test_env.jj_cmd_success( @@ -446,16 +446,16 @@ fn test_log_prefix_highlight_styled() { insta::assert_snapshot!(stdout, @r###" @ Change wqn commit9 03f - o Change kmk commit8 f77 - o Change kpq commit7 e71 - o Change znk commit6 386 - o Change yos commit5 0cf - o Change vru commit4 9e6 - o Change yqo commit3 06f - o Change roy commit2 1f9 - o Change mzv commit1 7b1 - o Change qpv initial ba1 original - o Change zzz 000 + ● Change kmk commit8 f77 + ● Change kpq commit7 e71 + ● Change znk commit6 386 + ● Change yos commit5 0cf + ● Change vru commit4 9e6 + ● Change yqo commit3 06f + ● Change roy commit2 1f9 + ● Change mzv commit1 7b1 + ● Change qpv initial ba1 original + ● Change zzz 000 "### ); let stdout = test_env.jj_cmd_success( @@ -472,16 +472,16 @@ fn test_log_prefix_highlight_styled() { insta::assert_snapshot!(stdout, @r###" @ Change wq commit9 03 - o Change km commit8 f7 - o Change kp commit7 e7 - o Change zn commit6 38 - o Change yo commit5 0cf - o Change vr commit4 9e - o Change yq commit3 06f - o Change ro commit2 1f - o Change mz commit1 7b - o Change qpv initial ba1 original - o Change zzz 00 + ● Change km commit8 f7 + ● Change kp commit7 e7 + ● Change zn commit6 38 + ● Change yo commit5 0cf + ● Change vr commit4 9e + ● Change yq commit3 06f + ● Change ro commit2 1f + ● Change mz commit1 7b + ● Change qpv initial ba1 original + ● Change zzz 00 "### ); } @@ -515,7 +515,7 @@ fn test_log_prefix_highlight_counts_hidden_commits() { test_env.jj_cmd_success(&repo_path, &["log", "-r", "all()", "-T", prefix_format]), @r###" @ Change q[pvuntsmwlqt] initial b[a1a30916d29] original - o Change z[zzzzzzzzzzz] 0[00000000000] + ● Change z[zzzzzzzzzzz] 0[00000000000] "### ); @@ -531,9 +531,9 @@ fn test_log_prefix_highlight_counts_hidden_commits() { test_env.jj_cmd_success(&repo_path, &["log", "-T", prefix_format]), @r###" @ Change w[qnwkozpkust] 44[4c3c5066d3] - │ o Change q[pvuntsmwlqt] initial ba[1a30916d29] original + │ ● Change q[pvuntsmwlqt] initial ba[1a30916d29] original ├─╯ - o Change z[zzzzzzzzzzz] 00[0000000000] + ● Change z[zzzzzzzzzzz] 00[0000000000] "### ); insta::assert_snapshot!( @@ -545,7 +545,7 @@ fn test_log_prefix_highlight_counts_hidden_commits() { insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["log", "-r", "d0", "-T", prefix_format]), @r###" - o Change p[szsrknsmxqw] extra d0[947f34cec4] + ● Change p[szsrknsmxqw] extra d0[947f34cec4] │ ~ "### @@ -561,12 +561,12 @@ fn test_log_shortest_length_parameter() { insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id.shortest(0)"]), @r###" @ 2 - o 0 + ● 0 "###); insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id.shortest(100)"]), @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); } @@ -617,7 +617,7 @@ fn test_log_divergence() { // No divergence insta::assert_snapshot!(stdout, @r###" @ description 1 - o + ● "###); // Create divergence @@ -628,10 +628,10 @@ fn test_log_divergence() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", template]); insta::assert_snapshot!(stdout, @r###" Concurrent modification detected, resolving automatically. - o description 2 !divergence! + ● description 2 !divergence! │ @ description 1 !divergence! ├─╯ - o + ● "###); } @@ -646,8 +646,8 @@ fn test_log_reversed() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description", "--reversed"]); insta::assert_snapshot!(stdout, @r###" - o - o first + ● + ● first @ second "###); @@ -676,7 +676,7 @@ fn test_log_filtered_by_path() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description", "file1"]); insta::assert_snapshot!(stdout, @r###" @ second - o first + ● first │ ~ "###); @@ -692,7 +692,7 @@ fn test_log_filtered_by_path() { insta::assert_snapshot!(stdout, @r###" @ second │ M file1 - o first + ● first │ A file1 ~ "###); @@ -869,18 +869,18 @@ fn test_graph_template_color() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", template]); insta::assert_snapshot!(stdout, @r###" @ single line - o first line + ● first line │ second line │ third line - o + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["--color=always", "log", "-T", template]); insta::assert_snapshot!(stdout, @r###" @ single line - o first line + ● first line │ second line │ third line - o + ● "###); } @@ -908,15 +908,15 @@ fn test_graph_styles() { insta::assert_snapshot!(stdout, @r###" @ merge ├─╮ - o │ side branch + ● │ side branch │ │ with │ │ long │ │ description - o │ main branch 2 + ● │ main branch 2 ├─╯ - o main branch 1 - o initial - o + ● main branch 1 + ● initial + ● "###); // ASCII style @@ -961,15 +961,15 @@ fn test_graph_styles() { insta::assert_snapshot!(stdout, @r###" @ merge ├─╮ - o │ side branch + ● │ side branch │ │ with │ │ long │ │ description - o │ main branch 2 + ● │ main branch 2 ├─╯ - o main branch 1 - o initial - o + ● main branch 1 + ● initial + ● "###); // Square style @@ -978,15 +978,15 @@ fn test_graph_styles() { insta::assert_snapshot!(stdout, @r###" @ merge ├─┐ - o │ side branch + ● │ side branch │ │ with │ │ long │ │ description - o │ main branch 2 + ● │ main branch 2 ├─┘ - o main branch 1 - o initial - o + ● main branch 1 + ● initial + ● "###); } @@ -1052,18 +1052,18 @@ fn test_log_word_wrap() { ├─╮ 3 4 5 │ │ 6 7 8 │ │ 9 - o │ 0 1 2 + ● │ 0 1 2 │ │ 3 4 5 │ │ 6 7 8 │ │ 9 - o │ 0 1 2 + ● │ 0 1 2 ├─╯ 3 4 5 │ 6 7 8 │ 9 - o 0 1 2 3 + ● 0 1 2 3 │ 4 5 6 7 │ 8 9 - o 0 1 2 3 + ● 0 1 2 3 4 5 6 7 8 9 "###); diff --git a/tests/test_move_command.rs b/tests/test_move_command.rs index 32e087adc..fce85db01 100644 --- a/tests/test_move_command.rs +++ b/tests/test_move_command.rs @@ -58,13 +58,13 @@ fn test_move() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 0d7353584003 f - o e9515f21068c e - o bdd835cae844 d - │ o caa4d0b23201 c - │ o 55171e33db26 b + ● e9515f21068c e + ● bdd835cae844 d + │ ● caa4d0b23201 c + │ ● 55171e33db26 b ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); // Errors out without arguments @@ -91,12 +91,12 @@ fn test_move() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 1c03e3d3c63f f - o e9515f21068c e - o bdd835cae844 d - │ o 55171e33db26 b c + ● e9515f21068c e + ● bdd835cae844 d + │ ● 55171e33db26 b c ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); // The change from the source has been applied let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); @@ -119,12 +119,12 @@ fn test_move() { // became empty and was abandoned) insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ c8d83075e8c2 f - o 2c50bfc59c68 e - │ o caa4d0b23201 c - │ o 55171e33db26 b + ● 2c50bfc59c68 e + │ ● caa4d0b23201 c + │ ● 55171e33db26 b ├─╯ - o 3db0a2f5b535 a d - o 000000000000 + ● 3db0a2f5b535 a d + ● 000000000000 "###); // The change from the source has been applied (the file contents were already // "f", as is typically the case when moving changes from an ancestor) @@ -144,12 +144,12 @@ fn test_move() { // became empty and was abandoned) insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 2b723b1d6033 f - o 4293930d6333 d e - │ o caa4d0b23201 c - │ o 55171e33db26 b + ● 4293930d6333 d e + │ ● caa4d0b23201 c + │ ● 55171e33db26 b ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); // The change from the source has been applied let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file2", "-r", "d"]); @@ -188,11 +188,11 @@ fn test_move_partial() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ bdd835cae844 d - │ o 5028db694b6b c - │ o 55171e33db26 b + │ ● 5028db694b6b c + │ ● 55171e33db26 b ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); let edit_script = test_env.set_up_fake_diff_editor(); @@ -205,10 +205,10 @@ fn test_move_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 71b69e433fbc d - │ o 55171e33db26 b c + │ ● 55171e33db26 b c ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); // The changes from the source has been applied let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); @@ -235,11 +235,11 @@ fn test_move_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 63f1a6e96edb d - │ o d027c6e3e6bc c - │ o 55171e33db26 b + │ ● d027c6e3e6bc c + │ ● 55171e33db26 b ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); // The selected change from the source has been applied let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); @@ -268,11 +268,11 @@ fn test_move_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 17c2e6632cc5 d - │ o 6a3ae047a03e c - │ o 55171e33db26 b + │ ● 6a3ae047a03e c + │ ● 55171e33db26 b ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); // The selected change from the source has been applied let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); @@ -300,12 +300,12 @@ fn test_move_partial() { Rebased 1 descendant commits "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o 21253406d416 c - o e1cf08aae711 b + ● 21253406d416 c + ● e1cf08aae711 b │ @ bdd835cae844 d ├─╯ - o 3db0a2f5b535 a - o 000000000000 + ● 3db0a2f5b535 a + ● 000000000000 "###); // The selected change from the source has been applied let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "b"]); diff --git a/tests/test_new_command.rs b/tests/test_new_command.rs index 53ca0fe46..88bd4be04 100644 --- a/tests/test_new_command.rs +++ b/tests/test_new_command.rs @@ -29,18 +29,18 @@ fn test_new() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 4f2d6e0a3482a6a34e4856a4a63869c0df109e79 a new commit - o 5d5c60b2aa96b8dbf55710656c50285c66cdcd74 add a file - o 0000000000000000000000000000000000000000 + ● 5d5c60b2aa96b8dbf55710656c50285c66cdcd74 add a file + ● 0000000000000000000000000000000000000000 "###); // Start a new change off of a specific commit (the root commit in this case). test_env.jj_cmd_success(&repo_path, &["new", "-m", "off of root", "root"]); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 026537ddb96b801b9cb909985d5443aab44616c1 off of root - │ o 4f2d6e0a3482a6a34e4856a4a63869c0df109e79 a new commit - │ o 5d5c60b2aa96b8dbf55710656c50285c66cdcd74 add a file + │ ● 4f2d6e0a3482a6a34e4856a4a63869c0df109e79 a new commit + │ ● 5d5c60b2aa96b8dbf55710656c50285c66cdcd74 add a file ├─╯ - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); } @@ -61,10 +61,10 @@ fn test_new_merge() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 0c4e5b9b68ae0cbe7ce3c61042619513d09005bf ├─╮ - o │ f399209d9dda06e8a25a0c8e9a0cde9f421ff35d add file2 - │ o 38e8e2f6c92ffb954961fc391b515ff551b41636 add file1 + ● │ f399209d9dda06e8a25a0c8e9a0cde9f421ff35d add file2 + │ ● 38e8e2f6c92ffb954961fc391b515ff551b41636 add file1 ├─╯ - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); insta::assert_snapshot!(stdout, @"a"); @@ -77,10 +77,10 @@ fn test_new_merge() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 200ed1a14c8acf09783dafefe5bebf2ff58f12fd ├─╮ - o │ f399209d9dda06e8a25a0c8e9a0cde9f421ff35d add file2 - │ o 38e8e2f6c92ffb954961fc391b515ff551b41636 add file1 + ● │ f399209d9dda06e8a25a0c8e9a0cde9f421ff35d add file2 + │ ● 38e8e2f6c92ffb954961fc391b515ff551b41636 add file1 ├─╯ - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // `jj merge` with less than two arguments is an error @@ -115,14 +115,14 @@ fn test_new_insert_after() { insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" @ F ├─╮ - o │ E - │ o D + ● │ E + │ ● D ├─╯ - │ o C - │ o B - │ o A + │ ● C + │ ● B + │ ● A ├─╯ - o root + ● root "###); let stdout = @@ -132,18 +132,18 @@ fn test_new_insert_after() { Working copy now at: ca7c6481a8dd G "###); insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - o C - │ o F + ● C + │ ● F ╭─┤ @ │ G ├───╮ - │ o │ E - o │ │ D + │ ● │ E + ● │ │ D ├─╯ │ - │ o B - │ o A + │ ● B + │ ● A ├───╯ - o root + ● root "###); let stdout = test_env.jj_cmd_success(&repo_path, &["new", "--insert-after", "-m", "H", "D"]); @@ -152,19 +152,19 @@ fn test_new_insert_after() { Working copy now at: fcf8281b4135 H "###); insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - o C - │ o F + ● C + │ ● F ╭─┤ - o │ G + ● │ G ├───╮ @ │ │ H - │ o │ E - o │ │ D + │ ● │ E + ● │ │ D ├─╯ │ - │ o B - │ o A + │ ● B + │ ● A ├───╯ - o root + ● root "###); } @@ -177,14 +177,14 @@ fn test_new_insert_after_children() { insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" @ F ├─╮ - o │ E - │ o D + ● │ E + │ ● D ├─╯ - │ o C - │ o B - │ o A + │ ● C + │ ● B + │ ● A ├─╯ - o root + ● root "###); // Check that inserting G after A and C doesn't try to rebase B (which is @@ -198,17 +198,17 @@ fn test_new_insert_after_children() { insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" @ G ├─╮ - │ │ o F + │ │ ● F │ │ ├─╮ - │ │ o │ E - │ │ │ o D + │ │ ● │ E + │ │ │ ● D │ │ ├─╯ - o │ │ C - o │ │ B + ● │ │ C + ● │ │ B ├─╯ │ - o │ A + ● │ A ├───╯ - o root + ● root "###); } @@ -221,14 +221,14 @@ fn test_new_insert_before() { insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" @ F ├─╮ - o │ E - │ o D + ● │ E + │ ● D ├─╯ - │ o C - │ o B - │ o A + │ ● C + │ ● B + │ ● A ├─╯ - o root + ● root "###); let stdout = @@ -238,18 +238,18 @@ fn test_new_insert_before() { Working copy now at: ff6bbbc7b8df G "###); insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - o F - │ o C + ● F + │ ● C ├─╯ @ G ├─┬─╮ - o │ │ E - │ o │ D + ● │ │ E + │ ● │ D ├─╯ │ - │ o B - │ o A + │ ● B + │ ● A ├───╯ - o root + ● root "###); } @@ -262,14 +262,14 @@ fn test_new_insert_before_root_successors() { insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" @ F ├─╮ - o │ E - │ o D + ● │ E + │ ● D ├─╯ - │ o C - │ o B - │ o A + │ ● C + │ ● B + │ ● A ├─╯ - o root + ● root "###); let stdout = @@ -279,17 +279,17 @@ fn test_new_insert_before_root_successors() { Working copy now at: 3654197754f8 G "###); insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - o F + ● F ├─╮ - │ │ o C - │ │ o B - o │ │ D - │ │ o A + │ │ ● C + │ │ ● B + ● │ │ D + │ │ ● A ├───╯ @ │ G - │ o E + │ ● E ├─╯ - o root + ● root "###); } @@ -304,14 +304,14 @@ fn test_new_insert_before_no_loop() { insta::assert_snapshot!(stdout, @r###" @ 7705d353bf5d F ├─╮ - o │ 41a89ffcbba2 E - │ o c9257eff5bf9 D + ● │ 41a89ffcbba2 E + │ ● c9257eff5bf9 D ├─╯ - │ o ec18c57d72d8 C - │ o 6041917ceeb5 B - │ o 65b1ef43c737 A + │ ● ec18c57d72d8 C + │ ● 6041917ceeb5 B + │ ● 65b1ef43c737 A ├─╯ - o 000000000000 root + ● 000000000000 root "###); let stderr = @@ -330,14 +330,14 @@ fn test_new_insert_before_no_root_merge() { insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" @ F ├─╮ - o │ E - │ o D + ● │ E + │ ● D ├─╯ - │ o C - │ o B - │ o A + │ ● C + │ ● B + │ ● A ├─╯ - o root + ● root "###); let stdout = @@ -347,17 +347,17 @@ fn test_new_insert_before_no_root_merge() { Working copy now at: bf9fc49331de G "###); insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" - o F + ● F ├─╮ - │ │ o C - o │ │ D - │ │ o B + │ │ ● C + ● │ │ D + │ │ ● B ├───╯ @ │ G - │ o E - o │ A + │ ● E + ● │ A ├─╯ - o root + ● root "###); } @@ -370,14 +370,14 @@ fn test_new_insert_before_root() { insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###" @ F ├─╮ - o │ E - │ o D + ● │ E + │ ● D ├─╯ - │ o C - │ o B - │ o A + │ ● C + │ ● B + │ ● A ├─╯ - o root + ● root "###); let stderr = diff --git a/tests/test_obslog_command.rs b/tests/test_obslog_command.rs index 878756225..938ff2cc2 100644 --- a/tests/test_obslog_command.rs +++ b/tests/test_obslog_command.rs @@ -33,11 +33,11 @@ fn test_obslog_with_or_without_diff() { insta::assert_snapshot!(stdout, @r###" @ rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:10.000 +07:00 66b42ad36073 │ my description - o rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 af536e5af67e conflict + ● rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 af536e5af67e conflict │ my description - o rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 6fbba7bcb590 + ● rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 6fbba7bcb590 │ my description - o rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:08.000 +07:00 eac0d0dae082 + ● rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:08.000 +07:00 eac0d0dae082 (empty) my description "###); @@ -54,16 +54,16 @@ fn test_obslog_with_or_without_diff() { │ 4 : +bar │ 5 : +++++++ │ 6 : >>>>>>> - o rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 af536e5af67e conflict + ● rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 af536e5af67e conflict │ my description - o rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 6fbba7bcb590 + ● rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:09.000 +07:00 6fbba7bcb590 │ my description │ Modified regular file file1: │ 1 1: foo │ 2: bar │ Added regular file file2: │ 1: foo - o rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:08.000 +07:00 eac0d0dae082 + ● rlvkpnrzqnoo test.user@example.com 2001-02-03 04:05:08.000 +07:00 eac0d0dae082 (empty) my description "###); @@ -145,7 +145,7 @@ fn test_obslog_word_wrap() { insta::assert_snapshot!(render(&["obslog"], 40, false), @r###" @ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 69542c1984c1 │ (empty) first - o qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 230dd059e1b0 + ● qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 230dd059e1b0 (empty) (no description set) "###); insta::assert_snapshot!(render(&["obslog"], 40, true), @r###" @@ -153,7 +153,7 @@ fn test_obslog_word_wrap() { │ 2001-02-03 04:05:08.000 +07:00 │ 69542c1984c1 │ (empty) first - o qpvuntsmwlqt test.user@example.com + ● qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 230dd059e1b0 (empty) (no description set) @@ -193,25 +193,25 @@ fn test_obslog_squash() { let stdout = test_env.jj_cmd_success(&repo_path, &["obslog", "-p", "-r", "@-"]); insta::assert_snapshot!(stdout, @r###" - o qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:10.000 +07:00 27e721a5ba72 + ● qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:10.000 +07:00 27e721a5ba72 ├─╮ squashed │ │ Modified regular file file1: │ │ 1 1: foo │ │ 2: bar - o │ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:09.000 +07:00 9764e503e1a9 + ● │ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:09.000 +07:00 9764e503e1a9 │ │ first │ │ Added regular file file1: │ │ 1: foo - o │ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 69542c1984c1 + ● │ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:08.000 +07:00 69542c1984c1 │ │ (empty) first - o │ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 230dd059e1b0 + ● │ qpvuntsmwlqt test.user@example.com 2001-02-03 04:05:07.000 +07:00 230dd059e1b0 │ (empty) (no description set) - o kkmpptxzrspx test.user@example.com 2001-02-03 04:05:10.000 +07:00 f09a38899f2b + ● kkmpptxzrspx test.user@example.com 2001-02-03 04:05:10.000 +07:00 f09a38899f2b │ second │ Modified regular file file1: │ 1 1: foo │ 2: bar - o kkmpptxzrspx test.user@example.com 2001-02-03 04:05:09.000 +07:00 579965369703 + ● kkmpptxzrspx test.user@example.com 2001-02-03 04:05:09.000 +07:00 579965369703 (empty) second "###); } diff --git a/tests/test_operations.rs b/tests/test_operations.rs index 7c42c101f..b664ac5a5 100644 --- a/tests/test_operations.rs +++ b/tests/test_operations.rs @@ -40,9 +40,9 @@ fn test_op_log() { @ 45108169c0f8 test-username@host.example.com 2001-02-03 04:05:08.000 +07:00 - 2001-02-03 04:05:08.000 +07:00 │ describe commit 230dd059e1b059aefc0da06a2e5a7dbf22362f22 │ args: jj describe -m 'description 0' - o a99a3fd5c51e test-username@host.example.com 2001-02-03 04:05:07.000 +07:00 - 2001-02-03 04:05:07.000 +07:00 + ● a99a3fd5c51e test-username@host.example.com 2001-02-03 04:05:07.000 +07:00 - 2001-02-03 04:05:07.000 +07:00 │ add workspace 'default' - o 56b94dfc38e7 test-username@host.example.com 2001-02-03 04:05:07.000 +07:00 - 2001-02-03 04:05:07.000 +07:00 + ● 56b94dfc38e7 test-username@host.example.com 2001-02-03 04:05:07.000 +07:00 - 2001-02-03 04:05:07.000 +07:00 initialize repo "###); // Test op log with relative dates @@ -52,9 +52,9 @@ fn test_op_log() { @ 45108169c0f8 test-username@host.example.com NN years ago, lasted less than a microsecond │ describe commit 230dd059e1b059aefc0da06a2e5a7dbf22362f22 │ args: jj describe -m 'description 0' - o a99a3fd5c51e test-username@host.example.com NN years ago, lasted less than a microsecond + ● a99a3fd5c51e test-username@host.example.com NN years ago, lasted less than a microsecond │ add workspace 'default' - o 56b94dfc38e7 test-username@host.example.com NN years ago, lasted less than a microsecond + ● 56b94dfc38e7 test-username@host.example.com NN years ago, lasted less than a microsecond initialize repo "###); let add_workspace_id = "a99a3fd5c51e"; @@ -62,24 +62,24 @@ fn test_op_log() { // Can load the repo at a specific operation ID insta::assert_snapshot!(get_log_output(&test_env, &repo_path, initialize_repo_id), @r###" - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path, add_workspace_id), @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // "@" resolves to the head operation insta::assert_snapshot!(get_log_output(&test_env, &repo_path, "@"), @r###" @ bc8f18aa6f396a93572811632313cbb5625d475d - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // "@-" resolves to the parent of the head operation insta::assert_snapshot!(get_log_output(&test_env, &repo_path, "@-"), @r###" @ 230dd059e1b059aefc0da06a2e5a7dbf22362f22 - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path, "@--"), @r###" - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!( test_env.jj_cmd_failure(&repo_path, &["log", "--at-op", "@---"]), @r###" @@ -88,7 +88,7 @@ fn test_op_log() { // "ID-" also resolves to the parent. insta::assert_snapshot!( get_log_output(&test_env, &repo_path, &format!("{add_workspace_id}-")), @r###" - o 0000000000000000000000000000000000000000 + ● 0000000000000000000000000000000000000000 "###); // We get a reasonable message if an invalid operation ID is specified @@ -137,13 +137,13 @@ fn test_op_log_template() { insta::assert_snapshot!(render(r#"id ++ "\n""#), @r###" @ a99a3fd5c51e8f7ccb9ae2f9fb749612a23f0a7cf25d8c644f36c35c077449ce3c66f49d098a5a704ca5e47089a7f019563a5b8cbc7d451619e0f90c82241ceb - o 56b94dfc38e7d54340377f566e96ab97dc6163ea7841daf49fb2e1d1ceb27e26274db1245835a1a421fb9d06e6e0fe1e4f4aa1b0258c6e86df676ad9111d0dab + ● 56b94dfc38e7d54340377f566e96ab97dc6163ea7841daf49fb2e1d1ceb27e26274db1245835a1a421fb9d06e6e0fe1e4f4aa1b0258c6e86df676ad9111d0dab "###); insta::assert_snapshot!( render(r#"separate(" ", id.short(5), current_operation, user, time.start(), time.end(), time.duration()) ++ "\n""#), @r###" @ a99a3 true test-username@host.example.com 2001-02-03 04:05:07.000 +07:00 2001-02-03 04:05:07.000 +07:00 less than a microsecond - o 56b94 false test-username@host.example.com 2001-02-03 04:05:07.000 +07:00 2001-02-03 04:05:07.000 +07:00 less than a microsecond + ● 56b94 false test-username@host.example.com 2001-02-03 04:05:07.000 +07:00 2001-02-03 04:05:07.000 +07:00 less than a microsecond "###); } @@ -170,7 +170,7 @@ fn test_op_log_word_wrap() { insta::assert_snapshot!(render(&["op", "log"], 40, false), @r###" @ a99a3fd5c51e test-username@host.example.com 22 years ago, lasted less than a microsecond │ add workspace 'default' - o 56b94dfc38e7 test-username@host.example.com 22 years ago, lasted less than a microsecond + ● 56b94dfc38e7 test-username@host.example.com 22 years ago, lasted less than a microsecond initialize repo "###); insta::assert_snapshot!(render(&["op", "log"], 40, true), @r###" @@ -179,7 +179,7 @@ fn test_op_log_word_wrap() { │ years ago, lasted less than a │ microsecond │ add workspace 'default' - o 56b94dfc38e7 + ● 56b94dfc38e7 test-username@host.example.com 22 years ago, lasted less than a microsecond diff --git a/tests/test_rebase_command.rs b/tests/test_rebase_command.rs index 3541cf146..85bb548f3 100644 --- a/tests/test_rebase_command.rs +++ b/tests/test_rebase_command.rs @@ -99,13 +99,13 @@ fn test_rebase_branch() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e - │ o d - │ │ o c + │ ● d + │ │ ● c │ ├─╯ - │ o b + │ ● b ├─╯ - o a - o + ● a + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["rebase", "-b", "c", "-d", "e"]); @@ -113,13 +113,13 @@ fn test_rebase_branch() { Rebased 3 commits "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o d - │ o c + ● d + │ ● c ├─╯ - o b + ● b @ e - o a - o + ● a + ● "###); // Test rebasing multiple branches at once @@ -131,14 +131,14 @@ fn test_rebase_branch() { Added 1 files, modified 0 files, removed 0 files "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o d + ● d │ @ e ├─╯ - │ o c + │ ● c ├─╯ - o b - o a - o + ● b + ● a + ● "###); // Same test but with more than one revision per argument and same revision @@ -162,14 +162,14 @@ fn test_rebase_branch() { Added 1 files, modified 0 files, removed 0 files "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o d + ● d │ @ e ├─╯ - │ o c + │ ● c ├─╯ - o b - o a - o + ● b + ● a + ● "###); } @@ -188,13 +188,13 @@ fn test_rebase_branch_with_merge() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e ├─╮ - o │ d - o │ c - │ │ o b + ● │ d + ● │ c + │ │ ● b │ ├─╯ - │ o a + │ ● a ├─╯ - o + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["rebase", "-b", "d", "-d", "b"]); @@ -205,11 +205,11 @@ fn test_rebase_branch_with_merge() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e - o d - o c - o b - o a - o + ● d + ● c + ● b + ● a + ● "###); test_env.jj_cmd_success(&repo_path, &["undo"]); @@ -221,11 +221,11 @@ fn test_rebase_branch_with_merge() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e - o d - o c - o b - o a - o + ● d + ● c + ● b + ● a + ● "###); } @@ -242,12 +242,12 @@ fn test_rebase_single_revision() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d - o c + ● c ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o + ● "###); // Descendants of the rebased commit "b" should be rebased onto parents. First @@ -264,11 +264,11 @@ fn test_rebase_single_revision() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d - o c - │ o b + ● c + │ ● b ├─╯ - o a - o + ● a + ● "###); test_env.jj_cmd_success(&repo_path, &["undo"]); @@ -283,12 +283,12 @@ fn test_rebase_single_revision() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d ├─╮ - │ │ o c - o │ │ b + │ │ ● c + ● │ │ b ├───╯ - │ o a + │ ● a ├─╯ - o + ● "###); } @@ -306,11 +306,11 @@ fn test_rebase_single_revision_merge_parent() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d ├─╮ - o │ c - o │ b - │ o a + ● │ c + ● │ b + │ ● a ├─╯ - o + ● "###); // Descendants of the rebased commit should be rebased onto parents, and if @@ -324,12 +324,12 @@ fn test_rebase_single_revision_merge_parent() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d ├─╮ - │ │ o c + │ │ ● c │ ├─╯ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o + ● "###); } @@ -345,22 +345,22 @@ fn test_rebase_multiple_destinations() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ c - │ o b + │ ● b ├─╯ - │ o a + │ ● a ├─╯ - o + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["rebase", "-r", "a", "-d", "b", "-d", "c"]); insta::assert_snapshot!(stdout, @r###""###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o a + ● a ├─╮ @ │ c - │ o b + │ ● b ├─╯ - o + ● "###); let stderr = test_env.jj_cmd_failure(&repo_path, &["rebase", "-r", "a", "-d", "b|c"]); @@ -377,12 +377,12 @@ fn test_rebase_multiple_destinations() { ); insta::assert_snapshot!(stdout, @r###""###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o a + ● a ├─╮ @ │ c - │ o b + │ ● b ├─╯ - o + ● "###); let stderr = test_env.jj_cmd_failure(&repo_path, &["rebase", "-r", "a", "-d", "b", "-d", "b"]); @@ -407,11 +407,11 @@ fn test_rebase_multiple_destinations() { ); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o a + ● a │ @ c - o │ b + ● │ b ├─╯ - o + ● "###); let stdout = test_env.jj_cmd_success( &repo_path, @@ -428,12 +428,12 @@ fn test_rebase_multiple_destinations() { ); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o a + ● a ├─╮ @ │ c - │ o b + │ ● b ├─╯ - o + ● "###); let stderr = @@ -456,12 +456,12 @@ fn test_rebase_with_descendants() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d - o c + ● c ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o + ● "###); let stdout = test_env.jj_cmd_success(&repo_path, &["rebase", "-s", "b", "-d", "a"]); @@ -471,10 +471,10 @@ fn test_rebase_with_descendants() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d - o c - o b - o a - o + ● c + ● b + ● a + ● "###); // Rebase several subtrees at once. @@ -487,24 +487,24 @@ fn test_rebase_with_descendants() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d - │ o c + │ ● c ├─╯ - │ o b - o │ a + │ ● b + ● │ a ├─╯ - o + ● "###); test_env.jj_cmd_success(&repo_path, &["undo"]); // Reminder of the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d - o c + ● c ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o + ● "###); // `d` was a descendant of `b`, and both are moved to be direct descendants of @@ -516,12 +516,12 @@ fn test_rebase_with_descendants() { Added 0 files, modified 0 files, removed 2 files "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o c + ● c │ @ d - o │ b + ● │ b ├─╯ - o a - o + ● a + ● "###); // Same test as above, but with duplicate commits and multiple commits per @@ -545,12 +545,12 @@ fn test_rebase_with_descendants() { Added 0 files, modified 0 files, removed 2 files "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" - o c - o b + ● c + ● b │ @ d ├─╯ - o a - o + ● a + ● "###); } diff --git a/tests/test_resolve_command.rs b/tests/test_resolve_command.rs index 90c5c0f66..30f446fb2 100644 --- a/tests/test_resolve_command.rs +++ b/tests/test_resolve_command.rs @@ -56,11 +56,11 @@ fn test_resolution() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o base - o + ● base + ● "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]), @r###" @@ -301,11 +301,11 @@ fn test_normal_conflict_input_files() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o base - o + ● base + ● "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]), @r###" @@ -342,11 +342,11 @@ fn test_baseless_conflict_input_files() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o base - o + ● base + ● "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]), @r###" @@ -411,11 +411,11 @@ fn test_edit_delete_conflict_input_files() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o base - o + ● base + ● "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]), @r###" @@ -454,11 +454,11 @@ fn test_file_vs_dir() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o base - o + ● base + ● "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]), @@ -501,13 +501,13 @@ fn test_description_with_dir_and_deletion() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─┬─╮ - o │ │ del - │ o │ dir + ● │ │ del + │ ● │ dir ├─╯ │ - │ o edit + │ ● edit ├───╯ - o base - o + ● base + ● "###); insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]), @@ -581,11 +581,11 @@ fn test_multiple_conflicts() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o base - o + ● base + ● "###); insta::assert_snapshot!( std::fs::read_to_string(repo_path.join("this_file_has_a_very_long_name_to_test_padding")).unwrap() diff --git a/tests/test_restore_command.rs b/tests/test_restore_command.rs index 95e55c58f..666924e32 100644 --- a/tests/test_restore_command.rs +++ b/tests/test_restore_command.rs @@ -118,11 +118,11 @@ fn test_restore_conflicted_merge() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ conflict ├─╮ - o │ b - │ o a + ● │ b + │ ● a ├─╯ - o base - o + ● base + ● "###); insta::assert_snapshot!( std::fs::read_to_string(repo_path.join("file")).unwrap() diff --git a/tests/test_revset_output.rs b/tests/test_revset_output.rs index 54965e15c..631cfe150 100644 --- a/tests/test_revset_output.rs +++ b/tests/test_revset_output.rs @@ -205,13 +205,13 @@ fn test_alias() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-r", "my-root"]); insta::assert_snapshot!(stdout, @r###" - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-r", "identity(my-root)"]); insta::assert_snapshot!(stdout, @r###" - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); @@ -307,7 +307,7 @@ fn test_bad_alias_decl() { .assert() .success(); insta::assert_snapshot!(get_stdout_string(&assert), @r###" - o zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 + ● zzzzzzzzzzzz 1970-01-01 00:00:00.000 +00:00 000000000000 (empty) (no description set) "###); insta::assert_snapshot!(get_stderr_string(&assert), @r###" diff --git a/tests/test_split_command.rs b/tests/test_split_command.rs index 3609bd143..92503db7b 100644 --- a/tests/test_split_command.rs +++ b/tests/test_split_command.rs @@ -30,7 +30,7 @@ fn test_split_by_paths() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ qpvuntsmwlqt false - o zzzzzzzzzzzz true + ● zzzzzzzzzzzz true "###); let edit_script = test_env.set_up_fake_editor(); @@ -67,8 +67,8 @@ fn test_split_by_paths() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ kkmpptxzrspx false - o qpvuntsmwlqt false - o zzzzzzzzzzzz true + ● qpvuntsmwlqt false + ● zzzzzzzzzzzz true "###); let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s", "-r", "@-"]); @@ -93,9 +93,9 @@ fn test_split_by_paths() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ kkmpptxzrspx false - o yqosqzytrlsw true - o qpvuntsmwlqt false - o zzzzzzzzzzzz true + ● yqosqzytrlsw true + ● qpvuntsmwlqt false + ● zzzzzzzzzzzz true "###); let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s", "-r", "@--"]); @@ -124,9 +124,9 @@ fn test_split_by_paths() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ kkmpptxzrspx false - o kpqxywonksrl false - o qpvuntsmwlqt true - o zzzzzzzzzzzz true + ● kpqxywonksrl false + ● qpvuntsmwlqt true + ● zzzzzzzzzzzz true "###); let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s", "-r", "@-"]); diff --git a/tests/test_squash_command.rs b/tests/test_squash_command.rs index a0afc17dd..a53960c04 100644 --- a/tests/test_squash_command.rs +++ b/tests/test_squash_command.rs @@ -35,9 +35,9 @@ fn test_squash() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 90fe0a96fc90 c - o fa5efbdf533c b - o 90aeefd03044 a - o 000000000000 + ● fa5efbdf533c b + ● 90aeefd03044 a + ● 000000000000 "###); // Squashes the working copy into the parent by default @@ -47,9 +47,9 @@ fn test_squash() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ b9280a9898cb - o 6ca29c9d2e7c b c - o 90aeefd03044 a - o 000000000000 + ● 6ca29c9d2e7c b c + ● 90aeefd03044 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); insta::assert_snapshot!(stdout, @r###" @@ -65,8 +65,8 @@ fn test_squash() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e87cf8ebc7e1 c - o 893c93ae2a87 a b - o 000000000000 + ● 893c93ae2a87 a b + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "b"]); insta::assert_snapshot!(stdout, @r###" @@ -89,12 +89,12 @@ fn test_squash() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ c7a11b36d333 e ├─╮ - o │ 5658521e0f8b d - │ o 90fe0a96fc90 c + ● │ 5658521e0f8b d + │ ● 90fe0a96fc90 c ├─╯ - o fa5efbdf533c b - o 90aeefd03044 a - o 000000000000 + ● fa5efbdf533c b + ● 90aeefd03044 a + ● 000000000000 "###); let stderr = test_env.jj_cmd_failure(&repo_path, &["squash"]); insta::assert_snapshot!(stderr, @r###" @@ -110,14 +110,14 @@ fn test_squash() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 959145c11426 - o 80960125bb96 e + ● 80960125bb96 e ├─╮ - o │ 5658521e0f8b d - │ o 90fe0a96fc90 c + ● │ 5658521e0f8b d + │ ● 90fe0a96fc90 c ├─╯ - o fa5efbdf533c b - o 90aeefd03044 a - o 000000000000 + ● fa5efbdf533c b + ● 90aeefd03044 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "e"]); insta::assert_snapshot!(stdout, @r###" @@ -145,9 +145,9 @@ fn test_squash_partial() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d989314f3df0 c - o 2a2d19a3283f b - o 47a1e795d146 a - o 000000000000 + ● 2a2d19a3283f b + ● 47a1e795d146 a + ● 000000000000 "###); // If we don't make any changes in the diff-editor, the whole change is moved @@ -160,8 +160,8 @@ fn test_squash_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ f03d5ce4a973 c - o c9f931cd78af a b - o 000000000000 + ● c9f931cd78af a b + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "a"]); insta::assert_snapshot!(stdout, @r###" @@ -178,9 +178,9 @@ fn test_squash_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ e7a40106bee6 c - o 05d951646873 b - o 0c5ddc685260 a - o 000000000000 + ● 05d951646873 b + ● 0c5ddc685260 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "a"]); insta::assert_snapshot!(stdout, @r###" @@ -210,9 +210,9 @@ fn test_squash_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ a911fa1d0627 c - o fb73ad17899f b - o 70621f4c7a42 a - o 000000000000 + ● fb73ad17899f b + ● 70621f4c7a42 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "a"]); insta::assert_snapshot!(stdout, @r###" diff --git a/tests/test_templater.rs b/tests/test_templater.rs index c3c6ebbad..22152fa55 100644 --- a/tests/test_templater.rs +++ b/tests/test_templater.rs @@ -66,13 +66,13 @@ fn test_templater_branches() { let template = r#"commit_id.short() ++ " " ++ branches"#; let output = test_env.jj_cmd_success(&workspace_root, &["log", "-T", template]); insta::assert_snapshot!(output, @r###" - o b1bb3766d584 branch3?? + ● b1bb3766d584 branch3?? │ @ a5b4d15489cc branch2* new-branch - │ │ o 21c33875443e branch1* + │ │ ● 21c33875443e branch1* ├───╯ - │ o 8476341eb395 branch2@origin + │ ● 8476341eb395 branch2@origin ├─╯ - o 000000000000 + ● 000000000000 "###); } diff --git a/tests/test_undo.rs b/tests/test_undo.rs index 4513661e3..e2462e23e 100644 --- a/tests/test_undo.rs +++ b/tests/test_undo.rs @@ -32,8 +32,8 @@ fn test_undo_rewrite_with_child() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]); insta::assert_snapshot!(stdout, @r###" @ child - o modified - o + ● modified + ● "###); test_env.jj_cmd_success(&repo_path, &["undo", &op_id_hex]); @@ -42,7 +42,7 @@ fn test_undo_rewrite_with_child() { let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "description"]); insta::assert_snapshot!(stdout, @r###" @ child - o initial - o + ● initial + ● "###); } diff --git a/tests/test_unsquash_command.rs b/tests/test_unsquash_command.rs index 273dbe1b2..aa02ec618 100644 --- a/tests/test_unsquash_command.rs +++ b/tests/test_unsquash_command.rs @@ -35,9 +35,9 @@ fn test_unsquash() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 90fe0a96fc90 c - o fa5efbdf533c b - o 90aeefd03044 a - o 000000000000 + ● fa5efbdf533c b + ● 90aeefd03044 a + ● 000000000000 "###); // Unsquashes into the working copy from its parent by default @@ -47,8 +47,8 @@ fn test_unsquash() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 1b10d78f6136 c - o 90aeefd03044 a b - o 000000000000 + ● 90aeefd03044 a b + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); insta::assert_snapshot!(stdout, @r###" @@ -64,8 +64,8 @@ fn test_unsquash() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 45b8b3ddc25a c - o 9146bcc8d996 b - o 000000000000 a + ● 9146bcc8d996 b + ● 000000000000 a "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "b"]); insta::assert_snapshot!(stdout, @r###" @@ -88,12 +88,12 @@ fn test_unsquash() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 1f8f152ff48e e ├─╮ - o │ 5658521e0f8b d - │ o 90fe0a96fc90 c + ● │ 5658521e0f8b d + │ ● 90fe0a96fc90 c ├─╯ - o fa5efbdf533c b - o 90aeefd03044 a - o 000000000000 + ● fa5efbdf533c b + ● 90aeefd03044 a + ● 000000000000 "###); let stderr = test_env.jj_cmd_failure(&repo_path, &["unsquash"]); insta::assert_snapshot!(stderr, @r###" @@ -110,12 +110,12 @@ fn test_unsquash() { insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 3217340cb761 ├─╮ - o │ 5658521e0f8b d e?? - │ o 90fe0a96fc90 c e?? + ● │ 5658521e0f8b d e?? + │ ● 90fe0a96fc90 c e?? ├─╯ - o fa5efbdf533c b - o 90aeefd03044 a - o 000000000000 + ● fa5efbdf533c b + ● 90aeefd03044 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1"]); insta::assert_snapshot!(stdout, @r###" @@ -143,9 +143,9 @@ fn test_unsquash_partial() { // Test the setup insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ d989314f3df0 c - o 2a2d19a3283f b - o 47a1e795d146 a - o 000000000000 + ● 2a2d19a3283f b + ● 47a1e795d146 a + ● 000000000000 "###); // If we don't make any changes in the diff-editor, the whole change is moved @@ -158,9 +158,9 @@ fn test_unsquash_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ 37c961d0d1e2 c - o 000af22057b9 b - o ee67504598b6 a - o 000000000000 + ● 000af22057b9 b + ● ee67504598b6 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "a"]); insta::assert_snapshot!(stdout, @r###" @@ -176,9 +176,9 @@ fn test_unsquash_partial() { "###); insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" @ a8e8fded1021 c - o 46cc06672a99 b - o 47a1e795d146 a - o 000000000000 + ● 46cc06672a99 b + ● 47a1e795d146 a + ● 000000000000 "###); let stdout = test_env.jj_cmd_success(&repo_path, &["print", "file1", "-r", "b"]); insta::assert_snapshot!(stdout, @r###" diff --git a/tests/test_workspaces.rs b/tests/test_workspaces.rs index b86afa16d..4fb873d2f 100644 --- a/tests/test_workspaces.rs +++ b/tests/test_workspaces.rs @@ -47,18 +47,18 @@ 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###" - o 397eac932ad3c349b2659fd2eb035a4dd3da4193 second@ + ● 397eac932ad3c349b2659fd2eb035a4dd3da4193 second@ │ @ e0e6d5672858dc9a57ec5b772b7c4f3270ed0223 default@ ├─╯ - o 7d308bc9d934c53c6cc52935192e2d6ac5d78cfd - o 0000000000000000000000000000000000000000 + ● 7d308bc9d934c53c6cc52935192e2d6ac5d78cfd + ● 0000000000000000000000000000000000000000 "###); insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" @ 397eac932ad3c349b2659fd2eb035a4dd3da4193 second@ - │ o e0e6d5672858dc9a57ec5b772b7c4f3270ed0223 default@ + │ ● e0e6d5672858dc9a57ec5b772b7c4f3270ed0223 default@ ├─╯ - o 7d308bc9d934c53c6cc52935192e2d6ac5d78cfd - o 0000000000000000000000000000000000000000 + ● 7d308bc9d934c53c6cc52935192e2d6ac5d78cfd + ● 0000000000000000000000000000000000000000 "###); // Both workspaces show up when we list them @@ -84,11 +84,11 @@ fn test_workspaces_conflicting_edits() { test_env.jj_cmd_success(&main_path, &["workspace", "add", "../secondary"]); insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - o 265af0cdbcc7bb33e3734ad72565c943ce3fb0d4 secondary@ + ● 265af0cdbcc7bb33e3734ad72565c943ce3fb0d4 secondary@ │ @ 351099fa72cfbb1b34e410e89821efc623295974 default@ ├─╯ - o cf911c223d3e24e001fc8264d6dbf0610804fc40 - o 0000000000000000000000000000000000000000 + ● cf911c223d3e24e001fc8264d6dbf0610804fc40 + ● 0000000000000000000000000000000000000000 "###); // Make changes in both working copies @@ -105,10 +105,10 @@ 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###" @ fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ - │ o a1896a17282f19089a5cec44358d6609910e0513 secondary@ + │ ● a1896a17282f19089a5cec44358d6609910e0513 secondary@ ├─╯ - o c0d4a99ef98ada7da8dc73a778bbb747c4178385 - o 0000000000000000000000000000000000000000 + ● c0d4a99ef98ada7da8dc73a778bbb747c4178385 + ● 0000000000000000000000000000000000000000 "###); let stderr = test_env.jj_cmd_failure(&secondary_path, &["st"]); insta::assert_snapshot!(stderr, @r###" @@ -133,25 +133,25 @@ fn test_workspaces_conflicting_edits() { "###); insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" - o 8d90dc175c874af0dff032d611029dc722d4e108 (divergent) - │ o fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ + ● 8d90dc175c874af0dff032d611029dc722d4e108 (divergent) + │ ● fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ ├─╯ │ @ a1896a17282f19089a5cec44358d6609910e0513 secondary@ (divergent) ├─╯ - o c0d4a99ef98ada7da8dc73a778bbb747c4178385 - o 0000000000000000000000000000000000000000 + ● c0d4a99ef98ada7da8dc73a778bbb747c4178385 + ● 0000000000000000000000000000000000000000 "###); // 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###" - o 8d90dc175c874af0dff032d611029dc722d4e108 (divergent) - │ o fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ + ● 8d90dc175c874af0dff032d611029dc722d4e108 (divergent) + │ ● fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ ├─╯ │ @ a1896a17282f19089a5cec44358d6609910e0513 secondary@ (divergent) ├─╯ - o c0d4a99ef98ada7da8dc73a778bbb747c4178385 - o 0000000000000000000000000000000000000000 + ● c0d4a99ef98ada7da8dc73a778bbb747c4178385 + ● 0000000000000000000000000000000000000000 "###); } @@ -169,11 +169,11 @@ fn test_workspaces_updated_by_other() { test_env.jj_cmd_success(&main_path, &["workspace", "add", "../secondary"]); insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" - o 265af0cdbcc7bb33e3734ad72565c943ce3fb0d4 secondary@ + ● 265af0cdbcc7bb33e3734ad72565c943ce3fb0d4 secondary@ │ @ 351099fa72cfbb1b34e410e89821efc623295974 default@ ├─╯ - o cf911c223d3e24e001fc8264d6dbf0610804fc40 - o 0000000000000000000000000000000000000000 + ● cf911c223d3e24e001fc8264d6dbf0610804fc40 + ● 0000000000000000000000000000000000000000 "###); // Rewrite the check-out commit in one workspace. @@ -187,10 +187,10 @@ 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###" @ fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ - │ o a1896a17282f19089a5cec44358d6609910e0513 secondary@ + │ ● a1896a17282f19089a5cec44358d6609910e0513 secondary@ ├─╯ - o c0d4a99ef98ada7da8dc73a778bbb747c4178385 - o 0000000000000000000000000000000000000000 + ● c0d4a99ef98ada7da8dc73a778bbb747c4178385 + ● 0000000000000000000000000000000000000000 "###); let stderr = test_env.jj_cmd_failure(&secondary_path, &["st"]); insta::assert_snapshot!(stderr, @r###" @@ -206,11 +206,11 @@ fn test_workspaces_updated_by_other() { "###); insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" - o fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ + ● fe8f41ed01d693b2d4365cd89e42ad9c531a939b default@ │ @ a1896a17282f19089a5cec44358d6609910e0513 secondary@ ├─╯ - o c0d4a99ef98ada7da8dc73a778bbb747c4178385 - o 0000000000000000000000000000000000000000 + ● c0d4a99ef98ada7da8dc73a778bbb747c4178385 + ● 0000000000000000000000000000000000000000 "###); } @@ -237,7 +237,7 @@ fn test_workspaces_update_stale_noop() { let stdout = test_env.jj_cmd_success(&main_path, &["op", "log", "-Tdescription"]); insta::assert_snapshot!(stdout, @r###" @ add workspace 'default' - o initialize repo + ● initialize repo "###); } @@ -267,11 +267,11 @@ fn test_workspaces_update_stale_snapshot() { insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" @ 4976dfa88529814c4dd8c06253fbd82d076b79f8 secondary@ - │ o 8357b22214ba8adb6d2d378fa5b85274f1c7967c default@ - │ o 1a769966ed69fa7abadbd2d899e2be1025cb04fb + │ ● 8357b22214ba8adb6d2d378fa5b85274f1c7967c default@ + │ ● 1a769966ed69fa7abadbd2d899e2be1025cb04fb ├─╯ - o b4a6c25e777817db67fdcbd50f1dd3b74b46b5f1 - o 0000000000000000000000000000000000000000 + ● b4a6c25e777817db67fdcbd50f1dd3b74b46b5f1 + ● 0000000000000000000000000000000000000000 "###); } @@ -307,11 +307,11 @@ fn test_workspaces_forget() { // 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###" - o feda1c4e5ffe63fb16818ccdd8c21483537e31f2 - │ o e949be04e93e830fcce23fefac985c1deee52eea + ● feda1c4e5ffe63fb16818ccdd8c21483537e31f2 + │ ● e949be04e93e830fcce23fefac985c1deee52eea ├─╯ - o 123ed18e4c4c0d77428df41112bc02ffc83fb935 - o 0000000000000000000000000000000000000000 + ● 123ed18e4c4c0d77428df41112bc02ffc83fb935 + ● 0000000000000000000000000000000000000000 "###); // Revision "@" cannot be used