Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the new graph nodes by default #4095

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
branches aren't managed by you. Therefore, untracked branches are no longer
displayed in `jj log` by default.

* Updated defaults for graph node symbol templates `templates.log_node` and
`templates.op_log_node`.

### Deprecations

### New features
Expand Down
110 changes: 55 additions & 55 deletions cli/tests/test_abandon_command.rs
algmyr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ fn test_basics() {
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] e
├─╮
[vru] d
[roy] c
│ │ [zsu] b
[vru] d
[roy] c
│ │ [zsu] b
├───╯
│ [rlv] a
│ [rlv] a
├─╯
[zzz]
[zzz]
"###);

let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["abandon", "d"]);
Expand All @@ -65,12 +65,12 @@ fn test_basics() {
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] e
├─╮
[roy] c d
│ │ [zsu] b
[roy] c d
│ │ [zsu] b
├───╯
│ [rlv] a
│ [rlv] a
├─╯
[zzz]
[zzz]
"###);

test_env.jj_cmd_ok(&repo_path, &["undo"]);
Expand All @@ -86,13 +86,13 @@ fn test_basics() {
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [nkm]
├─╮
[vru] d e??
[roy] c
│ │ [zsu] b
[vru] d e??
[roy] c
│ │ [zsu] b
├───╯
│ [rlv] a e??
│ [rlv] a e??
├─╯
[zzz]
[zzz]
"###);

test_env.jj_cmd_ok(&repo_path, &["undo"]);
Expand All @@ -110,12 +110,12 @@ fn test_basics() {
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [xtn]
├─╮
[roy] c d e??
│ │ [zsu] b
[roy] c d e??
│ │ [zsu] b
├───╯
│ [rlv] a e??
│ [rlv] a e??
├─╯
[zzz]
[zzz]
"###);

// Test abandoning the same commit twice directly
Expand All @@ -128,11 +128,11 @@ fn test_basics() {
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] e
├─╮
[vru] d
[roy] c
│ [rlv] a b
[vru] d
[roy] c
│ [rlv] a b
├─╯
[zzz]
[zzz]
"###);

// Test abandoning the same commit twice indirectly
Expand All @@ -151,12 +151,12 @@ fn test_basics() {
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [xlz]
├─╮
[roy] c d e??
│ │ [zsu] b
[roy] c d e??
│ │ [zsu] b
├───╯
│ [rlv] a e??
│ [rlv] a e??
├─╯
[zzz]
[zzz]
"###);

let (_stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["abandon", "none()"]);
Expand Down Expand Up @@ -185,13 +185,13 @@ fn test_bug_2600() {
// Test the setup
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] c
[vru] b
[vru] b
├─╮
[roy] a
[roy] a
├─╯
[zsu] base
[rlv] nottherootcommit
[zzz]
[zsu] base
[rlv] nottherootcommit
[zzz]
"###);
let setup_opid = test_env.current_operation_id(&repo_path);

Expand All @@ -209,12 +209,12 @@ fn test_bug_2600() {
// should keep "a" as second parent.
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] c
[vru] b
[vru] b
├─╮
[roy] a
[roy] a
├─╯
[rlv] base nottherootcommit
[zzz]
[rlv] base nottherootcommit
[zzz]
"###);

test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]);
Expand All @@ -232,10 +232,10 @@ fn test_bug_2600() {
// "a".
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] c
[vru] b
[zsu] a base
[rlv] nottherootcommit
[zzz]
[vru] b
[zsu] a base
[rlv] nottherootcommit
[zzz]
"###);

test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]);
Expand All @@ -253,24 +253,24 @@ fn test_bug_2600() {
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] c
├─╮
[roy] a b??
[roy] a b??
├─╯
[zsu] b?? base
[rlv] nottherootcommit
[zzz]
[zsu] b?? base
[rlv] nottherootcommit
[zzz]
"###);

test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]);
// ========= Reminder of the setup ===========
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] c
[vru] b
[vru] b
├─╮
[roy] a
[roy] a
├─╯
[zsu] base
[rlv] nottherootcommit
[zzz]
[zsu] base
[rlv] nottherootcommit
[zzz]
"###);
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["abandon", "a", "b"]);
insta::assert_snapshot!(stdout, @"");
Expand All @@ -287,9 +287,9 @@ fn test_bug_2600() {
// not have two parent pointers to the same commit.
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [znk] c
[zsu] a b base
[rlv] nottherootcommit
[zzz]
[zsu] a b base
[rlv] nottherootcommit
[zzz]
"###);
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["branch", "list", "b"]);
insta::assert_snapshot!(stdout, @r###"
Expand All @@ -313,12 +313,12 @@ fn test_bug_2600_rootcommit_special_case() {
// Setup
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
@ [vru] c
[roy] b
[roy] b
├─╮
[zsu] a
[zsu] a
├─╯
[rlv] base
[zzz]
[rlv] base
[zzz]
"###);

// Now, the test
Expand Down
Loading