-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: enable tree-level conflicts by default
I have used the tree-level conflict format for several weeks without problem (after the fix in 51b5d16). Now - right after the 0.10.0 release - seems like a good time to enable the config by default. I enabled the config in our default configs in the CLI crate to reduce impact on tests (compared to changing the default in `settings.rs`).
- Loading branch information
1 parent
ce93350
commit 0027159
Showing
11 changed files
with
56 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,7 @@ fn test_rewrite_immutable_commands() { | |
insta::assert_snapshot!(stdout, @r###" | ||
@ yqosqzyt [email protected] 2001-02-03 04:05:13.000 +07:00 3f89addf | ||
│ (empty) (no description set) | ||
│ ◉ mzvwutvl [email protected] 2001-02-03 04:05:11.000 +07:00 main d809c5d9 conflict | ||
│ ◉ mzvwutvl [email protected] 2001-02-03 04:05:11.000 +07:00 main 16ca9d80 conflict | ||
╭─┤ (empty) merge | ||
│ │ | ||
│ ~ | ||
|
@@ -115,49 +115,49 @@ fn test_rewrite_immutable_commands() { | |
// abandon | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["abandon", "main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// chmod | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["chmod", "-r=main", "x", "file"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// describe | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["describe", "main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// diffedit | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["diffedit", "-r=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// edit | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["edit", "main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// move --from | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["move", "--from=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// move --to | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["move", "--to=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// rebase -s | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["rebase", "-s=main", "-d=@"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// rebase -b | ||
|
@@ -169,43 +169,43 @@ fn test_rewrite_immutable_commands() { | |
// rebase -r | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["rebase", "-r=main", "-d=@"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// resolve | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["resolve", "-r=description(merge)", "file"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// restore -c | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["restore", "-c=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// restore --to | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["restore", "--to=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// split | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["split", "-r=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// squash | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["squash", "-r=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
// unsquash | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["unsquash", "-r=main"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: Commit d809c5d93710 is immutable | ||
Error: Commit 16ca9d800b08 is immutable | ||
Hint: Configure the set of immutable commits via `revset-aliases.immutable_heads()`. | ||
"###); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ fn test_obslog_with_or_without_diff() { | |
insta::assert_snapshot!(stdout, @r###" | ||
@ rlvkpnrz [email protected] 2001-02-03 04:05:10.000 +07:00 66b42ad3 | ||
│ my description | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 af536e5a conflict | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 5f4634a5 conflict | ||
│ my description | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 6fbba7bc | ||
│ my description | ||
|
@@ -46,7 +46,7 @@ fn test_obslog_with_or_without_diff() { | |
insta::assert_snapshot!(stdout, @r###" | ||
@ [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;[email protected][39m [38;5;14m2001-02-03 04:05:10.000 +07:00[39m [38;5;12m6[38;5;8m6b42ad3[39m[0m | ||
│ [1mmy description[0m | ||
◉ [1m[39mr[0m[38;5;8mlvkpnrz[39m hidden [38;5;[email protected][39m [38;5;6m2001-02-03 04:05:09.000 +07:00[39m [1m[38;5;4maf[0m[38;5;8m536e5a[39m [38;5;1mconflict[39m | ||
◉ [1m[39mr[0m[38;5;8mlvkpnrz[39m hidden [38;5;[email protected][39m [38;5;6m2001-02-03 04:05:09.000 +07:00[39m [1m[38;5;4m5[0m[38;5;8mf4634a5[39m [38;5;1mconflict[39m | ||
│ my description | ||
◉ [1m[39mr[0m[38;5;8mlvkpnrz[39m hidden [38;5;[email protected][39m [38;5;6m2001-02-03 04:05:09.000 +07:00[39m [1m[38;5;4m6f[0m[38;5;8mbba7bc[39m | ||
│ my description | ||
|
@@ -63,11 +63,12 @@ fn test_obslog_with_or_without_diff() { | |
│ Resolved conflict in file1: | ||
│ 1 1: <<<<<<<resolved | ||
│ 2 : %%%%%%% | ||
│ 3 : foo | ||
│ 4 : +bar | ||
│ 5 : +++++++ | ||
│ 6 : >>>>>>> | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 af536e5a conflict | ||
│ 3 : -foo | ||
│ 4 : +++++++ | ||
│ 5 : foo | ||
│ 6 : bar | ||
│ 7 : >>>>>>> | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 5f4634a5 conflict | ||
│ my description | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 6fbba7bc | ||
│ my description | ||
|
@@ -85,7 +86,7 @@ fn test_obslog_with_or_without_diff() { | |
insta::assert_snapshot!(stdout, @r###" | ||
@ rlvkpnrz [email protected] 2001-02-03 04:05:10.000 +07:00 66b42ad3 | ||
│ my description | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 af536e5a conflict | ||
◉ rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 5f4634a5 conflict | ||
│ my description | ||
"###); | ||
|
||
|
@@ -94,7 +95,7 @@ fn test_obslog_with_or_without_diff() { | |
insta::assert_snapshot!(stdout, @r###" | ||
rlvkpnrz [email protected] 2001-02-03 04:05:10.000 +07:00 66b42ad3 | ||
my description | ||
rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 af536e5a conflict | ||
rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 5f4634a5 conflict | ||
my description | ||
rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 6fbba7bc | ||
my description | ||
|
@@ -111,15 +112,16 @@ fn test_obslog_with_or_without_diff() { | |
index 0000000000...2ab19ae607 100644 | ||
--- a/file1 | ||
+++ b/file1 | ||
@@ -1,6 +1,1 @@ | ||
@@ -1,7 +1,1 @@ | ||
-<<<<<<< | ||
-%%%%%%% | ||
- foo | ||
-+bar | ||
--foo | ||
-+++++++ | ||
-foo | ||
-bar | ||
->>>>>>> | ||
+resolved | ||
rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 af536e5a conflict | ||
rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 5f4634a5 conflict | ||
my description | ||
rlvkpnrz hidden [email protected] 2001-02-03 04:05:09.000 +07:00 6fbba7bc | ||
my description | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters