-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: remove support for legacy (non-tree) conflicts
Signed-off-by: Austin Seipp <[email protected]>
- Loading branch information
1 parent
0ec426d
commit 9f0279b
Showing
13 changed files
with
117 additions
and
237 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -478,10 +478,10 @@ fn test_op_abandon_ancestors() { | |
Abandoned 2 operations and reparented 1 descendant operations. | ||
"#); | ||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["debug", "local-working-copy", "--ignore-working-copy"]), @r###" | ||
test_env.jj_cmd_success(&repo_path, &["debug", "local-working-copy", "--ignore-working-copy"]), @r#" | ||
Current operation: OperationId("8545e013752445fd845c84eb961dbfbce47e1deb628e4ef20df10f6dc9aae2ef9e47200b0fcc70ca51f050aede05d0fa6dd1db40e20ae740876775738a07d02e") | ||
Current tree: Merge(Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904"))) | ||
"###); | ||
Current tree: Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904")) | ||
"#); | ||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["op", "log"]), @r###" | ||
@ 8545e0137524 [email protected] 2001-02-03 04:05:09.000 +07:00 - 2001-02-03 04:05:09.000 +07:00 | ||
│ commit 81a4ef3dd421f3184289df1c58bd3a16ea1e3d8e | ||
|
@@ -527,10 +527,10 @@ fn test_op_abandon_ancestors() { | |
Abandoned 1 operations and reparented 1 descendant operations. | ||
"###); | ||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["debug", "local-working-copy", "--ignore-working-copy"]), @r###" | ||
test_env.jj_cmd_success(&repo_path, &["debug", "local-working-copy", "--ignore-working-copy"]), @r#" | ||
Current operation: OperationId("0699d720d0cecd80fb7d765c45955708c61b12feb1d7ed9ff2777ae719471f04ffed3c1dc24efdbf94bdb74426065d6fa9a4f0862a89db2c8c8e359eefc45462") | ||
Current tree: Merge(Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904"))) | ||
"###); | ||
Current tree: Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904")) | ||
"#); | ||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["op", "log"]), @r###" | ||
@ 0699d720d0ce [email protected] 2001-02-03 04:05:21.000 +07:00 - 2001-02-03 04:05:21.000 +07:00 | ||
│ undo operation d92d0753399f732e438bdd88fa7e5214cba2a310d120ec1714028a514c7116bcf04b4a0b26c04dbecf0a917f1d4c8eb05571b8816dd98b0502aaf321e92500b3 | ||
|
@@ -574,7 +574,7 @@ fn test_op_abandon_without_updating_working_copy() { | |
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["debug", "local-working-copy", "--ignore-working-copy"]), @r#" | ||
Current operation: OperationId("b0711a8ac91f5ac088cff9b57c9daf29dc61b1b4fedcbb9a07fe4c7f7da1e60e333c787eacf73d1e0544db048a4fe9c6c089991b4a67e25365c4f411fa8b489f") | ||
Current tree: Merge(Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904"))) | ||
Current tree: Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904")) | ||
"#); | ||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["op", "log", "-n1", "--ignore-working-copy"]), @r#" | ||
|
@@ -594,7 +594,7 @@ fn test_op_abandon_without_updating_working_copy() { | |
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["debug", "local-working-copy", "--ignore-working-copy"]), @r#" | ||
Current operation: OperationId("b0711a8ac91f5ac088cff9b57c9daf29dc61b1b4fedcbb9a07fe4c7f7da1e60e333c787eacf73d1e0544db048a4fe9c6c089991b4a67e25365c4f411fa8b489f") | ||
Current tree: Merge(Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904"))) | ||
Current tree: Resolved(TreeId("4b825dc642cb6eb9a060e54bf8d69288fbee4904")) | ||
"#); | ||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["op", "log", "-n1", "--ignore-working-copy"]), @r#" | ||
|
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 |
---|---|---|
|
@@ -658,28 +658,28 @@ fn test_workspaces_current_op_discarded_by_other() { | |
], | ||
); | ||
insta::assert_snapshot!(stdout, @r#" | ||
@ 757bc1140b abandon commit 20dd439c4bd12c6ad56c187ac490bd0141804618f638dc5c4dc92ff9aecba20f152b23160db9dcf61beb31a5cb14091d9def5a36d11c9599cc4d2e5689236af1 | ||
○ 8d4abed655 create initial working-copy commit in workspace secondary | ||
○ 3de27432e5 add workspace 'secondary' | ||
○ bcf69de808 new empty commit | ||
○ a36b99a15c snapshot working copy | ||
○ ddf023d319 new empty commit | ||
○ 829c93f6a3 snapshot working copy | ||
○ 2557266dd2 add workspace 'default' | ||
@ 28cd5cdd88 abandon commit 5eaf6e87919b87ce8078cecd6a6216606601e7372eebc1c9a791595ce8fe7963a9bdd8c56640f2e14baac9e62efb4fccc0c5b3d8e21a95e877b20bc8c20e73d5 | ||
○ 44fbe961e3 create initial working-copy commit in workspace secondary | ||
○ 114173706e add workspace 'secondary' | ||
○ 1ad55160ae new empty commit | ||
○ c9efb83077 snapshot working copy | ||
○ 243778e06d new empty commit | ||
○ 0b530a766d snapshot working copy | ||
○ ffbb23b00f add workspace 'default' | ||
○ 0000000000 | ||
"#); | ||
|
||
// Abandon ops, including the one the secondary workspace is currently on. | ||
test_env.jj_cmd_ok(&main_path, &["operation", "abandon", "..@-"]); | ||
test_env.jj_cmd_ok(&main_path, &["util", "gc", "--expire=now"]); | ||
|
||
insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" | ||
○ 96b31dafdc41 secondary@ | ||
│ @ 6c051bd1ccd5 default@ | ||
insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" | ||
@ 214eef6a63cb default@ | ||
│ ○ 1451cf1f1398 secondary@ | ||
├─╯ | ||
○ 7c5b25a4fc8f | ||
○ b431c7611a06 | ||
◆ 000000000000 | ||
"###); | ||
"#); | ||
|
||
let stderr = test_env.jj_cmd_failure(&secondary_path, &["st"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
|
@@ -690,19 +690,19 @@ fn test_workspaces_current_op_discarded_by_other() { | |
|
||
let (stdout, stderr) = test_env.jj_cmd_ok(&secondary_path, &["workspace", "update-stale"]); | ||
insta::assert_snapshot!(stderr, @r#" | ||
Failed to read working copy's current operation; attempting recovery. Error message from read attempt: Object 8d4abed655badb70b1bab62aa87136619dbc3c8015a8ce8dfb7abfeca4e2f36c713d8f84e070a0613907a6cee7e1cc05323fe1205a319b93fe978f11a060c33c of type operation not found | ||
Created and checked out recovery commit 62f70695e3b0 | ||
Failed to read working copy's current operation; attempting recovery. Error message from read attempt: Object 44fbe961e37a84af0908d31684571660b28fbe0db71d39abd16a8385200cd048b81a529a5e3988a64dad7fb5a8223545d330316e4f629cf6453b937ed2a17355 of type operation not found | ||
Created and checked out recovery commit 44b50c0d749c | ||
"#); | ||
insta::assert_snapshot!(stdout, @""); | ||
|
||
insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" | ||
○ b0b400439a82 secondary@ | ||
○ 96b31dafdc41 | ||
│ @ 6c051bd1ccd5 default@ | ||
insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r#" | ||
○ 547a8f368e77 secondary@ | ||
○ 1451cf1f1398 | ||
│ @ 214eef6a63cb default@ | ||
├─╯ | ||
○ 7c5b25a4fc8f | ||
○ b431c7611a06 | ||
◆ 000000000000 | ||
"###); | ||
"#); | ||
|
||
// The sparse patterns should remain | ||
let stdout = test_env.jj_cmd_success(&secondary_path, &["sparse", "list"]); | ||
|
@@ -713,14 +713,14 @@ fn test_workspaces_current_op_discarded_by_other() { | |
"###); | ||
let (stdout, stderr) = test_env.jj_cmd_ok(&secondary_path, &["st"]); | ||
insta::assert_snapshot!(stderr, @""); | ||
insta::assert_snapshot!(stdout, @r###" | ||
insta::assert_snapshot!(stdout, @r#" | ||
Working copy changes: | ||
A added | ||
D deleted | ||
M modified | ||
Working copy : kmkuslsw b0b40043 (no description set) | ||
Parent commit: rzvqmyuk 96b31daf (empty) (no description set) | ||
"###); | ||
Working copy : kmkuslsw 547a8f36 (no description set) | ||
Parent commit: rzvqmyuk 1451cf1f (empty) (no description set) | ||
"#); | ||
// The modified file should have the same contents it had before (not reset to | ||
// the base contents) | ||
insta::assert_snapshot!(std::fs::read_to_string(secondary_path.join("modified")).unwrap(), @r###" | ||
|
@@ -729,12 +729,12 @@ fn test_workspaces_current_op_discarded_by_other() { | |
|
||
let (stdout, stderr) = test_env.jj_cmd_ok(&secondary_path, &["evolog"]); | ||
insta::assert_snapshot!(stderr, @""); | ||
insta::assert_snapshot!(stdout, @r###" | ||
@ kmkuslsw [email protected] 2001-02-03 08:05:18 secondary@ b0b40043 | ||
insta::assert_snapshot!(stdout, @r#" | ||
@ kmkuslsw [email protected] 2001-02-03 08:05:18 secondary@ 547a8f36 | ||
│ (no description set) | ||
○ kmkuslsw hidden [email protected] 2001-02-03 08:05:18 62f70695 | ||
○ kmkuslsw hidden [email protected] 2001-02-03 08:05:18 44b50c0d | ||
(empty) (no description set) | ||
"###); | ||
"#); | ||
} | ||
|
||
#[test] | ||
|
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
Oops, something went wrong.