just playing with tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

log: emit working-copy branch first if included in the revset

The working-copy revision is usually the latest commit, but it's not always
true. This patch ensures that the wc branch is emitted first so the graph node
order is less dependent on rewrites.

+1309 -988
+2
CHANGELOG.md
··· 43 43 `--insert-before` options to customize the location of the duplicated 44 44 revisions. 45 45 46 + * `jj log` now displays the working-copy branch first. 47 + 46 48 * New `fork_point()` revset function can be used to obtain the fork point 47 49 of multiple commits. 48 50
+15 -5
cli/src/commands/log.rs
··· 187 187 if !args.no_graph { 188 188 let mut raw_output = formatter.raw()?; 189 189 let mut graph = get_graphlog(graph_style, raw_output.as_mut()); 190 - let forward_iter = TopoGroupedGraphIterator::new(revset.iter_graph()); 191 - let iter: Box<dyn Iterator<Item = _>> = if args.reversed { 192 - Box::new(ReverseGraphIterator::new(forward_iter)?) 193 - } else { 194 - Box::new(forward_iter) 190 + let iter: Box<dyn Iterator<Item = _>> = { 191 + let mut forward_iter = TopoGroupedGraphIterator::new(revset.iter_graph()); 192 + // Emit the working-copy branch first, which is usually most 193 + // interesting. This also helps stabilize output order. 194 + if let Some(id) = workspace_command.get_wc_commit_id() { 195 + let has_commit = revset.containing_fn(); 196 + if has_commit(id)? { 197 + forward_iter.prioritize_branch(id.clone()); 198 + } 199 + } 200 + if args.reversed { 201 + Box::new(ReverseGraphIterator::new(forward_iter)?) 202 + } else { 203 + Box::new(forward_iter) 204 + } 195 205 }; 196 206 for node in iter.take(limit) { 197 207 let (commit_id, edges) = node?;
+22 -22
cli/tests/test_bookmark_command.rs
··· 940 940 feature2@origin: sptzoqmo 7b33f629 commit 1 941 941 main@origin: sptzoqmo 7b33f629 commit 1 942 942 "###); 943 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 944 - ◆ feature1@origin feature2@origin main@origin 7b33f6295eda 945 - │ @ 230dd059e1b0 943 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 944 + @ 230dd059e1b0 945 + │ ◆ feature1@origin feature2@origin main@origin 7b33f6295eda 946 946 ├─╯ 947 947 ◆ 000000000000 948 - "###); 948 + "#); 949 949 950 950 // Track new bookmark. Local bookmark should be created. 951 951 test_env.jj_cmd_ok( ··· 988 988 main: sptzoqmo 7b33f629 commit 1 989 989 @origin: sptzoqmo 7b33f629 commit 1 990 990 "###); 991 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 992 - ◆ feature1 feature1@origin feature2@origin main 7b33f6295eda 993 - │ @ 230dd059e1b0 991 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 992 + @ 230dd059e1b0 993 + │ ◆ feature1 feature1@origin feature2@origin main 7b33f6295eda 994 994 ├─╯ 995 995 ◆ 000000000000 996 - "###); 996 + "#); 997 997 998 998 // Fetch new commit. Only tracking bookmark "main" should be merged. 999 999 create_remote_commit( ··· 1018 1018 main: mmqqkyyt 40dabdaf commit 2 1019 1019 @origin: mmqqkyyt 40dabdaf commit 2 1020 1020 "###); 1021 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 1022 - ◆ feature1@origin feature2@origin main 40dabdaf4abe 1023 - │ ○ feature1 7b33f6295eda 1021 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1022 + @ 230dd059e1b0 1023 + │ ◆ feature1@origin feature2@origin main 40dabdaf4abe 1024 1024 ├─╯ 1025 - │ @ 230dd059e1b0 1025 + │ ○ feature1 7b33f6295eda 1026 1026 ├─╯ 1027 1027 ◆ 000000000000 1028 - "###); 1028 + "#); 1029 1029 1030 1030 // Fetch new commit with auto tracking. Tracking bookmark "main" and new 1031 1031 // bookmark "feature3" should be merged. ··· 1057 1057 main: wwnpyzpo 3f0f86fa commit 3 1058 1058 @origin: wwnpyzpo 3f0f86fa commit 3 1059 1059 "###); 1060 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 1061 - ◆ feature1@origin feature2@origin feature3 main 3f0f86fa0e57 1062 - │ ○ feature1 7b33f6295eda 1060 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1061 + @ 230dd059e1b0 1062 + │ ◆ feature1@origin feature2@origin feature3 main 3f0f86fa0e57 1063 1063 ├─╯ 1064 - │ @ 230dd059e1b0 1064 + │ ○ feature1 7b33f6295eda 1065 1065 ├─╯ 1066 1066 ◆ 000000000000 1067 - "###); 1067 + "#); 1068 1068 } 1069 1069 1070 1070 #[test] ··· 1447 1447 &local_path, 1448 1448 &["log", "-r::(bookmarks() | remote_bookmarks())", "-T", template], 1449 1449 ), 1450 - @r###" 1451 - ○ e31634b64294 remote-rewrite* 1452 - │ @ c7b4c09cd77c local-keep 1450 + @r#" 1451 + @ c7b4c09cd77c local-keep 1452 + │ ○ e31634b64294 remote-rewrite* 1453 1453 ├─╯ 1454 1454 │ ○ 3e9a5af6ef15 remote-rewrite@origin (hidden) 1455 1455 ├─╯ ··· 1458 1458 │ ○ 911e912015fb remote-keep 1459 1459 ├─╯ 1460 1460 ◆ 000000000000 1461 - "###); 1461 + "#); 1462 1462 1463 1463 // All bookmarks are listed by default. 1464 1464 let (stdout, stderr) = test_env.jj_cmd_ok(&local_path, &["bookmark", "list"]);
+30 -30
cli/tests/test_commit_template.rs
··· 503 503 &["describe", "-m", "description 2", "--at-operation", "@-"], 504 504 ); 505 505 let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["log"]); 506 - insta::assert_snapshot!(stdout, @r###" 507 - ○ qpvuntsm?? test.user@example.com 2001-02-03 08:05:10 6ba70e00 508 - │ description 2 509 - │ @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 ff309c29 510 - ├─╯ description 1 506 + insta::assert_snapshot!(stdout, @r#" 507 + @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 ff309c29 508 + │ description 1 509 + │ ○ qpvuntsm?? test.user@example.com 2001-02-03 08:05:10 6ba70e00 510 + ├─╯ description 2 511 511 ◆ zzzzzzzz root() 00000000 512 - "###); 512 + "#); 513 513 insta::assert_snapshot!(stderr, @r###" 514 514 Concurrent modification detected, resolving automatically. 515 515 "###); 516 516 517 517 // Color 518 518 let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always"]); 519 - insta::assert_snapshot!(stdout, @r###" 520 - ○ qpvuntsm?? test.user@example.com 2001-02-03 08:05:10 6ba70e00 521 - │ description 2 522 - │ @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 ff309c29 523 - ├─╯ description 1 519 + insta::assert_snapshot!(stdout, @r#" 520 + @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 ff309c29 521 + │ description 1 522 + │ ○ qpvuntsm?? test.user@example.com 2001-02-03 08:05:10 6ba70e00 523 + ├─╯ description 2 524 524 ◆ zzzzzzzz root() 00000000 525 - "###); 525 + "#); 526 526 527 527 // Evolog and hidden divergent 528 528 let stdout = test_env.jj_cmd_success(&repo_path, &["evolog"]); ··· 599 599 600 600 let template = r#"commit_id.short() ++ " " ++ if(bookmarks, bookmarks, "(no bookmarks)")"#; 601 601 let output = test_env.jj_cmd_success(&workspace_root, &["log", "-T", template]); 602 - insta::assert_snapshot!(output, @r###" 603 - ○ fed794e2ba44 bookmark3?? bookmark3@origin 602 + insta::assert_snapshot!(output, @r#" 603 + @ a5b4d15489cc bookmark2* new-bookmark 604 + ○ 8476341eb395 bookmark2@origin unchanged 605 + │ ○ fed794e2ba44 bookmark3?? bookmark3@origin 606 + ├─╯ 604 607 │ ○ b1bb3766d584 bookmark3?? 605 608 ├─╯ 606 609 │ ○ 4a7e4246fc4d bookmark1* 607 610 ├─╯ 608 - │ @ a5b4d15489cc bookmark2* new-bookmark 609 - │ ○ 8476341eb395 bookmark2@origin unchanged 610 - ├─╯ 611 611 ◆ 000000000000 (no bookmarks) 612 - "###); 612 + "#); 613 613 614 614 let template = r#"bookmarks.map(|b| separate("/", b.remote(), b.name())).join(", ")"#; 615 615 let output = test_env.jj_cmd_success(&workspace_root, &["log", "-T", template]); 616 - insta::assert_snapshot!(output, @r###" 617 - ○ bookmark3, origin/bookmark3 616 + insta::assert_snapshot!(output, @r#" 617 + @ bookmark2, new-bookmark 618 + ○ origin/bookmark2, unchanged 619 + │ ○ bookmark3, origin/bookmark3 620 + ├─╯ 618 621 │ ○ bookmark3 619 622 ├─╯ 620 623 │ ○ bookmark1 621 624 ├─╯ 622 - │ @ bookmark2, new-bookmark 623 - │ ○ origin/bookmark2, unchanged 624 - ├─╯ 625 625 626 - "###); 626 + "#); 627 627 628 628 let template = r#"separate(" ", "L:", local_bookmarks, "R:", remote_bookmarks)"#; 629 629 let output = test_env.jj_cmd_success(&workspace_root, &["log", "-T", template]); 630 - insta::assert_snapshot!(output, @r###" 631 - ○ L: bookmark3?? R: bookmark3@origin 630 + insta::assert_snapshot!(output, @r#" 631 + @ L: bookmark2* new-bookmark R: 632 + ○ L: unchanged R: bookmark2@origin unchanged@origin 633 + │ ○ L: bookmark3?? R: bookmark3@origin 634 + ├─╯ 632 635 │ ○ L: bookmark3?? R: 633 636 ├─╯ 634 637 │ ○ L: bookmark1* R: 635 638 ├─╯ 636 - │ @ L: bookmark2* new-bookmark R: 637 - │ ○ L: unchanged R: bookmark2@origin unchanged@origin 638 - ├─╯ 639 639 ◆ L: R: 640 - "###); 640 + "#); 641 641 642 642 let template = r#" 643 643 remote_bookmarks.map(|ref| concat(
+4 -4
cli/tests/test_concurrent_operations.rs
··· 50 50 51 51 // We should be informed about the concurrent modification 52 52 let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["log", "-T", "description"]); 53 - insta::assert_snapshot!(stdout, @r###" 54 - ○ message 2 55 - │ @ message 1 53 + insta::assert_snapshot!(stdout, @r#" 54 + @ message 1 55 + │ ○ message 2 56 56 ├─╯ 57 57 58 - "###); 58 + "#); 59 59 insta::assert_snapshot!(stderr, @r###" 60 60 Concurrent modification detected, resolving automatically. 61 61 "###);
+649 -649
cli/tests/test_duplicate_command.rs
··· 62 62 insta::assert_snapshot!(stderr, @r###" 63 63 Duplicated 2443ea76b0b1 as kpqxywon f5b1e687 a 64 64 "###); 65 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 66 - ○ f5b1e68729d6 a 67 - │ @ 17a00fc21654 c 68 - │ ├─╮ 69 - │ │ ○ d370aee184ba b 70 - ├───╯ 71 - │ ○ 2443ea76b0b1 a 65 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 66 + @ 17a00fc21654 c 67 + ├─╮ 68 + │ ○ d370aee184ba b 69 + ○ │ 2443ea76b0b1 a 70 + ├─╯ 71 + │ ○ f5b1e68729d6 a 72 72 ├─╯ 73 73 ◆ 000000000000 74 - "###); 74 + "#); 75 75 76 76 let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["undo"]); 77 77 insta::assert_snapshot!(stdout, @""); ··· 83 83 insta::assert_snapshot!(stderr, @r###" 84 84 Duplicated 17a00fc21654 as lylxulpl ef3b0f3d c 85 85 "###); 86 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 87 - ○ ef3b0f3d1046 c 86 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 87 + @ 17a00fc21654 c 88 88 ├─╮ 89 - │ │ @ 17a00fc21654 c 89 + │ │ ○ ef3b0f3d1046 c 90 90 ╭─┬─╯ 91 91 │ ○ d370aee184ba b 92 92 ○ │ 2443ea76b0b1 a 93 93 ├─╯ 94 94 ◆ 000000000000 95 - "###); 95 + "#); 96 96 } 97 97 98 98 #[test] ··· 124 124 Duplicated 1394f625cbbd as wqnwkozp 3b74d969 b 125 125 Duplicated 921dde6e55c0 as mouksmqu 8348ddce e 126 126 "###); 127 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 128 - ○ 8348ddcec733 e 127 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 128 + @ 921dde6e55c0 e 129 129 ├─╮ 130 - ○ │ 3b74d9691015 b 131 - │ │ @ 921dde6e55c0 e 130 + ○ │ 1394f625cbbd b 131 + │ │ ○ 8348ddcec733 e 132 132 │ ╭─┤ 133 133 │ ○ │ ebd06dba20ec d 134 134 │ ○ │ c0cb3a0b73e7 c 135 135 ├─╯ │ 136 - │ ○ 1394f625cbbd b 136 + │ ○ 3b74d9691015 b 137 137 ├───╯ 138 138 ○ 2443ea76b0b1 a 139 139 ◆ 000000000000 140 - "###); 140 + "#); 141 141 142 142 // Try specifying the same commit twice directly 143 143 test_env.jj_cmd_ok(&repo_path, &["undo"]); ··· 146 146 insta::assert_snapshot!(stderr, @r###" 147 147 Duplicated 1394f625cbbd as nkmrtpmo 0276d3d7 b 148 148 "###); 149 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 150 - ○ 0276d3d7c24d b 151 - │ @ 921dde6e55c0 e 152 - │ ├─╮ 153 - │ │ ○ ebd06dba20ec d 154 - │ │ ○ c0cb3a0b73e7 c 155 - ├───╯ 156 - │ ○ 1394f625cbbd b 149 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 150 + @ 921dde6e55c0 e 151 + ├─╮ 152 + │ ○ ebd06dba20ec d 153 + │ ○ c0cb3a0b73e7 c 154 + ○ │ 1394f625cbbd b 155 + ├─╯ 156 + │ ○ 0276d3d7c24d b 157 157 ├─╯ 158 158 ○ 2443ea76b0b1 a 159 159 ◆ 000000000000 160 - "###); 160 + "#); 161 161 162 162 // Try specifying the same commit twice indirectly 163 163 test_env.jj_cmd_ok(&repo_path, &["undo"]); ··· 168 168 Duplicated ebd06dba20ec as pqrnrkux 2181781b d 169 169 Duplicated 921dde6e55c0 as ztxkyksq 0f7430f2 e 170 170 "###); 171 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 172 - ○ 0f7430f2727a e 171 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 172 + @ 921dde6e55c0 e 173 173 ├─╮ 174 - │ ○ 2181781b4f81 d 175 - ○ │ fa167d18a83a b 176 - │ │ @ 921dde6e55c0 e 174 + │ ○ ebd06dba20ec d 175 + ○ │ 1394f625cbbd b 176 + │ │ ○ 0f7430f2727a e 177 177 │ │ ├─╮ 178 - │ │ │ ○ ebd06dba20ec d 178 + │ │ │ ○ 2181781b4f81 d 179 179 │ ├───╯ 180 180 │ ○ │ c0cb3a0b73e7 c 181 181 ├─╯ │ 182 - │ ○ 1394f625cbbd b 182 + │ ○ fa167d18a83a b 183 183 ├───╯ 184 184 ○ 2443ea76b0b1 a 185 185 ◆ 000000000000 186 - "###); 186 + "#); 187 187 188 188 test_env.jj_cmd_ok(&repo_path, &["undo"]); 189 189 // Reminder of the setup ··· 204 204 Duplicated ebd06dba20ec as plymsszl d94e4c55 d 205 205 Duplicated 921dde6e55c0 as urrlptpw 9bd4389f e 206 206 "###); 207 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 208 - ○ 9bd4389f5d47 e 207 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 208 + @ 921dde6e55c0 e 209 209 ├─╮ 210 - │ ○ d94e4c55a68b d 211 - │ │ @ 921dde6e55c0 e 210 + │ ○ ebd06dba20ec d 211 + │ │ ○ 9bd4389f5d47 e 212 212 ╭───┤ 213 - │ │ ○ ebd06dba20ec d 213 + │ │ ○ d94e4c55a68b d 214 214 │ ├─╯ 215 215 │ ○ c0cb3a0b73e7 c 216 216 ○ │ 1394f625cbbd b ··· 219 219 │ ○ c6f7f8c4512e a 220 220 ├─╯ 221 221 ◆ 000000000000 222 - "###); 222 + "#); 223 223 224 224 // Check for BUG -- makes too many 'a'-s, etc. 225 225 test_env.jj_cmd_ok(&repo_path, &["undo"]); ··· 232 232 Duplicated ebd06dba20ec as yxrlprzz 2f2442db d 233 233 Duplicated 921dde6e55c0 as mvkzkxrl ee8fe64e e 234 234 "###); 235 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 236 - ○ ee8fe64ed254 e 235 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 236 + @ 921dde6e55c0 e 237 237 ├─╮ 238 - │ ○ 2f2442db08eb d 239 - │ ○ df53fa589286 c 240 - ○ │ e13ac0adabdf b 238 + │ ○ ebd06dba20ec d 239 + │ ○ c0cb3a0b73e7 c 240 + ○ │ 1394f625cbbd b 241 241 ├─╯ 242 - ○ 0fe67a05989e a 243 - │ @ 921dde6e55c0 e 242 + ○ 2443ea76b0b1 a 243 + │ ○ ee8fe64ed254 e 244 244 │ ├─╮ 245 - │ │ ○ ebd06dba20ec d 246 - │ │ ○ c0cb3a0b73e7 c 247 - │ ○ │ 1394f625cbbd b 245 + │ │ ○ 2f2442db08eb d 246 + │ │ ○ df53fa589286 c 247 + │ ○ │ e13ac0adabdf b 248 248 │ ├─╯ 249 - │ ○ 2443ea76b0b1 a 249 + │ ○ 0fe67a05989e a 250 250 ├─╯ 251 251 ◆ 000000000000 252 - "###); 252 + "#); 253 253 } 254 254 255 255 #[test] ··· 286 286 insta::assert_snapshot!(stderr, @r#" 287 287 Duplicated 9e85a474f005 as nkmrtpmo 4587e554 a1 288 288 "#); 289 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 290 - ○ 4587e554fef9 a1 291 - ○ b75b7aa4b90e c 292 - │ @ f7550bb42c6f d 289 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 290 + @ f7550bb42c6f d 291 + │ ○ 4587e554fef9 a1 292 + │ ○ b75b7aa4b90e c 293 293 ├─╯ 294 294 │ ○ 9a27d5939bef b 295 295 ├─╯ ··· 298 298 │ ○ 9e85a474f005 a1 299 299 ├─╯ 300 300 ◆ 000000000000 301 - "#); 301 + "); 302 302 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 303 303 304 304 // Duplicate a single commit onto multiple destinations. ··· 331 331 Warning: Duplicating commit 9e85a474f005 as a descendant of itself 332 332 Duplicated 9e85a474f005 as wvuyspvk 5b3cf5a5 a1 333 333 "#); 334 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 335 - ○ 5b3cf5a5cbc2 a1 336 - ○ 17072aa2b823 a3 337 - ○ 47df67757a64 a2 338 - ○ 9e85a474f005 a1 339 - │ @ f7550bb42c6f d 340 - ├─╯ 334 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 335 + @ f7550bb42c6f d 341 336 │ ○ b75b7aa4b90e c 342 337 ├─╯ 343 338 │ ○ 9a27d5939bef b 344 339 ├─╯ 340 + │ ○ 5b3cf5a5cbc2 a1 341 + │ ○ 17072aa2b823 a3 342 + │ ○ 47df67757a64 a2 343 + │ ○ 9e85a474f005 a1 344 + ├─╯ 345 345 ◆ 000000000000 346 - "#); 346 + "); 347 347 348 348 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 349 349 // Duplicate multiple commits without a direct ancestry relationship onto a ··· 354 354 Duplicated 9e85a474f005 as xlzxqlsl 30bff9b1 a1 355 355 Duplicated 9a27d5939bef as vnkwvqxw c7016240 b 356 356 "#); 357 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 358 - ○ c7016240cc66 b 359 - │ ○ 30bff9b13575 a1 360 - ├─╯ 361 - ○ b75b7aa4b90e c 362 - │ @ f7550bb42c6f d 357 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 358 + @ f7550bb42c6f d 359 + │ ○ c7016240cc66 b 360 + │ │ ○ 30bff9b13575 a1 361 + │ ├─╯ 362 + │ ○ b75b7aa4b90e c 363 363 ├─╯ 364 364 │ ○ 9a27d5939bef b 365 365 ├─╯ ··· 368 368 │ ○ 9e85a474f005 a1 369 369 ├─╯ 370 370 ◆ 000000000000 371 - "#); 371 + "); 372 372 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 373 373 374 374 // Duplicate multiple commits without a direct ancestry relationship onto ··· 406 406 Duplicated 9e85a474f005 as wtszoswq 58411bed a1 407 407 Duplicated 17072aa2b823 as qmykwtmu 86842c96 a3 408 408 "#); 409 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 410 - ○ 86842c96d8c8 a3 411 - ○ 58411bed3598 a1 412 - ○ b75b7aa4b90e c 413 - │ @ f7550bb42c6f d 409 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 410 + @ f7550bb42c6f d 411 + │ ○ 86842c96d8c8 a3 412 + │ ○ 58411bed3598 a1 413 + │ ○ b75b7aa4b90e c 414 414 ├─╯ 415 415 │ ○ 9a27d5939bef b 416 416 ├─╯ ··· 419 419 │ ○ 9e85a474f005 a1 420 420 ├─╯ 421 421 ◆ 000000000000 422 - "#); 422 + "); 423 423 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 424 424 425 425 // Duplicate multiple commits with an ancestry relationship onto ··· 491 491 Duplicated 9e85a474f005 as pzsxstzt b34eead0 a1 492 492 Rebased 1 commits onto duplicated commits 493 493 "#); 494 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 495 - ○ a384ab7ad1f6 b2 496 - ○ b34eead0fdf5 a1 497 - ○ dcc98bc8bbea b1 498 - │ @ 0cdd923e993a d2 499 - │ ○ 0f21c5e185c5 d1 500 - ├─╯ 494 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 495 + @ 0cdd923e993a d2 496 + ○ 0f21c5e185c5 d1 501 497 │ ○ 09560d60cac4 c2 502 498 │ ○ b27346e9a9bd c1 503 499 ├─╯ 500 + │ ○ a384ab7ad1f6 b2 501 + │ ○ b34eead0fdf5 a1 502 + │ ○ dcc98bc8bbea b1 503 + ├─╯ 504 504 │ ○ 196bc1f0efc1 a4 505 505 │ ○ 17072aa2b823 a3 506 506 │ ○ 47df67757a64 a2 507 507 │ ○ 9e85a474f005 a1 508 508 ├─╯ 509 509 ◆ 000000000000 510 - "#); 510 + "); 511 511 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 512 512 513 513 // Duplicate a single commit after a single ancestor commit. ··· 518 518 Duplicated 17072aa2b823 as qmkrwlvp c167d08f a3 519 519 Rebased 3 commits onto duplicated commits 520 520 "#); 521 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 522 - ○ 8746d17a44cb a4 523 - ○ 15a695f5bf13 a3 524 - ○ 73e26c9e22e7 a2 525 - ○ c167d08f8d9f a3 526 - ○ 9e85a474f005 a1 527 - │ @ 0cdd923e993a d2 528 - │ ○ 0f21c5e185c5 d1 529 - ├─╯ 521 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 522 + @ 0cdd923e993a d2 523 + ○ 0f21c5e185c5 d1 530 524 │ ○ 09560d60cac4 c2 531 525 │ ○ b27346e9a9bd c1 532 526 ├─╯ 533 527 │ ○ 7b44470918f4 b2 534 528 │ ○ dcc98bc8bbea b1 535 529 ├─╯ 530 + │ ○ 8746d17a44cb a4 531 + │ ○ 15a695f5bf13 a3 532 + │ ○ 73e26c9e22e7 a2 533 + │ ○ c167d08f8d9f a3 534 + │ ○ 9e85a474f005 a1 535 + ├─╯ 536 536 ◆ 000000000000 537 - "#); 537 + "); 538 538 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 539 539 540 540 // Duplicate a single commit after a single descendant commit. ··· 545 545 Duplicated 9e85a474f005 as qwyusntz 074debdf a1 546 546 Rebased 1 commits onto duplicated commits 547 547 "#); 548 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 549 - ○ 3fcf9fdec8f3 a4 550 - ○ 074debdf330b a1 551 - ○ 17072aa2b823 a3 552 - ○ 47df67757a64 a2 553 - ○ 9e85a474f005 a1 554 - │ @ 0cdd923e993a d2 555 - │ ○ 0f21c5e185c5 d1 556 - ├─╯ 548 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 549 + @ 0cdd923e993a d2 550 + ○ 0f21c5e185c5 d1 557 551 │ ○ 09560d60cac4 c2 558 552 │ ○ b27346e9a9bd c1 559 553 ├─╯ 560 554 │ ○ 7b44470918f4 b2 561 555 │ ○ dcc98bc8bbea b1 562 556 ├─╯ 557 + │ ○ 3fcf9fdec8f3 a4 558 + │ ○ 074debdf330b a1 559 + │ ○ 17072aa2b823 a3 560 + │ ○ 47df67757a64 a2 561 + │ ○ 9e85a474f005 a1 562 + ├─╯ 563 563 ◆ 000000000000 564 - "#); 564 + "); 565 565 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 566 566 567 567 // Duplicate a single commit after multiple commits with no direct ··· 575 575 Duplicated 9e85a474f005 as soqnvnyz 671da6dc a1 576 576 Rebased 2 commits onto duplicated commits 577 577 "#); 578 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 579 - ○ 35ccc31b58bd c2 580 - │ ○ 7951d1641b4b b2 581 - ├─╯ 582 - ○ 671da6dc2d2e a1 583 - ├─╮ 584 - │ ○ b27346e9a9bd c1 585 - ○ │ dcc98bc8bbea b1 586 - ├─╯ 587 - │ @ 0cdd923e993a d2 588 - │ ○ 0f21c5e185c5 d1 578 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 579 + @ 0cdd923e993a d2 580 + ○ 0f21c5e185c5 d1 581 + │ ○ 35ccc31b58bd c2 582 + │ │ ○ 7951d1641b4b b2 583 + │ ├─╯ 584 + │ ○ 671da6dc2d2e a1 585 + │ ├─╮ 586 + │ │ ○ b27346e9a9bd c1 587 + ├───╯ 588 + │ ○ dcc98bc8bbea b1 589 589 ├─╯ 590 590 │ ○ 196bc1f0efc1 a4 591 591 │ ○ 17072aa2b823 a3 ··· 593 593 │ ○ 9e85a474f005 a1 594 594 ├─╯ 595 595 ◆ 000000000000 596 - "#); 596 + "); 597 597 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 598 598 599 599 // Duplicate a single commit after multiple commits including an ancestor. ··· 607 607 Duplicated 17072aa2b823 as nsrwusvy 727c43ec a3 608 608 Rebased 2 commits onto duplicated commits 609 609 "#); 610 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 611 - ○ 5ae709b39efb a4 612 - ○ ecb0aa61feab a3 613 - ○ 727c43ec8eaa a3 614 - ├─╮ 615 - │ ○ 7b44470918f4 b2 616 - │ ○ dcc98bc8bbea b1 617 - ○ │ 47df67757a64 a2 618 - ○ │ 9e85a474f005 a1 619 - ├─╯ 620 - │ @ 0cdd923e993a d2 621 - │ ○ 0f21c5e185c5 d1 622 - ├─╯ 610 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 611 + @ 0cdd923e993a d2 612 + ○ 0f21c5e185c5 d1 623 613 │ ○ 09560d60cac4 c2 624 614 │ ○ b27346e9a9bd c1 625 615 ├─╯ 616 + │ ○ 5ae709b39efb a4 617 + │ ○ ecb0aa61feab a3 618 + │ ○ 727c43ec8eaa a3 619 + │ ├─╮ 620 + │ │ ○ 7b44470918f4 b2 621 + │ │ ○ dcc98bc8bbea b1 622 + ├───╯ 623 + │ ○ 47df67757a64 a2 624 + │ ○ 9e85a474f005 a1 625 + ├─╯ 626 626 ◆ 000000000000 627 - "#); 627 + "); 628 628 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 629 629 630 630 // Duplicate a single commit after multiple commits including a descendant. ··· 638 638 Duplicated 9e85a474f005 as xpnwykqz 6944eeac a1 639 639 Rebased 1 commits onto duplicated commits 640 640 "#); 641 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 642 - ○ 4fa1dfb1735f a4 643 - ○ 6944eeac206a a1 644 - ├─╮ 645 - │ ○ 7b44470918f4 b2 646 - │ ○ dcc98bc8bbea b1 647 - ○ │ 17072aa2b823 a3 648 - ○ │ 47df67757a64 a2 649 - ○ │ 9e85a474f005 a1 650 - ├─╯ 651 - │ @ 0cdd923e993a d2 652 - │ ○ 0f21c5e185c5 d1 653 - ├─╯ 641 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 642 + @ 0cdd923e993a d2 643 + ○ 0f21c5e185c5 d1 654 644 │ ○ 09560d60cac4 c2 655 645 │ ○ b27346e9a9bd c1 656 646 ├─╯ 647 + │ ○ 4fa1dfb1735f a4 648 + │ ○ 6944eeac206a a1 649 + │ ├─╮ 650 + │ │ ○ 7b44470918f4 b2 651 + │ │ ○ dcc98bc8bbea b1 652 + ├───╯ 653 + │ ○ 17072aa2b823 a3 654 + │ ○ 47df67757a64 a2 655 + │ ○ 9e85a474f005 a1 656 + ├─╯ 657 657 ◆ 000000000000 658 - "#); 658 + "); 659 659 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 660 660 661 661 // Duplicate multiple commits without a direct ancestry relationship after a ··· 668 668 Duplicated dcc98bc8bbea as pxnqtknr 21b26c06 b1 669 669 Rebased 1 commits onto duplicated commits 670 670 "#); 671 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 672 - ○ e9f2b664654b c2 673 - ├─╮ 674 - │ ○ 21b26c06639f b1 675 - ○ │ d3dda93b8e6f a1 676 - ├─╯ 677 - ○ b27346e9a9bd c1 678 - │ @ 0cdd923e993a d2 679 - │ ○ 0f21c5e185c5 d1 671 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 672 + @ 0cdd923e993a d2 673 + ○ 0f21c5e185c5 d1 674 + │ ○ e9f2b664654b c2 675 + │ ├─╮ 676 + │ │ ○ 21b26c06639f b1 677 + │ ○ │ d3dda93b8e6f a1 678 + │ ├─╯ 679 + │ ○ b27346e9a9bd c1 680 680 ├─╯ 681 681 │ ○ 7b44470918f4 b2 682 682 │ ○ dcc98bc8bbea b1 ··· 687 687 │ ○ 9e85a474f005 a1 688 688 ├─╯ 689 689 ◆ 000000000000 690 - "#); 690 + "); 691 691 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 692 692 693 693 // Duplicate multiple commits without a direct ancestry relationship after a ··· 701 701 Duplicated dcc98bc8bbea as yqnpwwmq f18498f2 b1 702 702 Rebased 2 commits onto duplicated commits 703 703 "#); 704 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 705 - ○ 5b30b2d24181 a4 706 - ○ 2725567328bd a3 707 - ├─╮ 708 - │ ○ f18498f24737 b1 709 - ○ │ 0d11d4667aa9 a3 710 - ├─╯ 711 - ○ 47df67757a64 a2 712 - ○ 9e85a474f005 a1 713 - │ @ 0cdd923e993a d2 714 - │ ○ 0f21c5e185c5 d1 715 - ├─╯ 704 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 705 + @ 0cdd923e993a d2 706 + ○ 0f21c5e185c5 d1 716 707 │ ○ 09560d60cac4 c2 717 708 │ ○ b27346e9a9bd c1 718 709 ├─╯ 719 710 │ ○ 7b44470918f4 b2 720 711 │ ○ dcc98bc8bbea b1 721 712 ├─╯ 713 + │ ○ 5b30b2d24181 a4 714 + │ ○ 2725567328bd a3 715 + │ ├─╮ 716 + │ │ ○ f18498f24737 b1 717 + │ ○ │ 0d11d4667aa9 a3 718 + │ ├─╯ 719 + │ ○ 47df67757a64 a2 720 + │ ○ 9e85a474f005 a1 721 + ├─╯ 722 722 ◆ 000000000000 723 - "#); 723 + "); 724 724 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 725 725 726 726 // Duplicate multiple commits without a direct ancestry relationship after a ··· 734 734 Duplicated dcc98bc8bbea as uukzylyy 7366036f b1 735 735 Rebased 1 commits onto duplicated commits 736 736 "#); 737 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 738 - ○ b19d9559f21a a4 739 - ├─╮ 740 - │ ○ 7366036f148d b1 741 - ○ │ b7458ffedb08 a1 742 - ├─╯ 743 - ○ 17072aa2b823 a3 744 - ○ 47df67757a64 a2 745 - ○ 9e85a474f005 a1 746 - │ @ 0cdd923e993a d2 747 - │ ○ 0f21c5e185c5 d1 748 - ├─╯ 737 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 738 + @ 0cdd923e993a d2 739 + ○ 0f21c5e185c5 d1 749 740 │ ○ 09560d60cac4 c2 750 741 │ ○ b27346e9a9bd c1 751 742 ├─╯ 752 743 │ ○ 7b44470918f4 b2 753 744 │ ○ dcc98bc8bbea b1 754 745 ├─╯ 746 + │ ○ b19d9559f21a a4 747 + │ ├─╮ 748 + │ │ ○ 7366036f148d b1 749 + │ ○ │ b7458ffedb08 a1 750 + │ ├─╯ 751 + │ ○ 17072aa2b823 a3 752 + │ ○ 47df67757a64 a2 753 + │ ○ 9e85a474f005 a1 754 + ├─╯ 755 755 ◆ 000000000000 756 - "#); 756 + "); 757 757 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 758 758 759 759 // Duplicate multiple commits without a direct ancestry relationship after ··· 809 809 Duplicated dcc98bc8bbea as musouqkq 560e532e b1 810 810 Rebased 4 commits onto duplicated commits 811 811 "#); 812 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 813 - ○ c1d222b0e288 c2 814 - ├─╮ 815 - │ │ ○ 0a31f366f5a2 a4 816 - │ │ ○ 06750de0d803 a3 817 - │ │ ○ 031778a0e9f3 a2 818 - ╭─┬─╯ 819 - │ ○ 560e532ebd75 b1 812 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 813 + @ 0cdd923e993a d2 814 + ○ 0f21c5e185c5 d1 815 + │ ○ c1d222b0e288 c2 820 816 │ ├─╮ 821 - ○ │ │ ccda812e23c4 a3 822 - ╰─┬─╮ 823 - │ ○ b27346e9a9bd c1 824 - ○ │ 9e85a474f005 a1 825 - ├─╯ 826 - @ │ 0cdd923e993a d2 827 - ○ │ 0f21c5e185c5 d1 828 - ├─╯ 817 + │ │ │ ○ 0a31f366f5a2 a4 818 + │ │ │ ○ 06750de0d803 a3 819 + │ │ │ ○ 031778a0e9f3 a2 820 + │ ╭─┬─╯ 821 + │ │ ○ 560e532ebd75 b1 822 + │ │ ├─╮ 823 + │ ○ │ │ ccda812e23c4 a3 824 + │ ╰─┬─╮ 825 + │ │ ○ b27346e9a9bd c1 826 + ├─────╯ 827 + │ ○ 9e85a474f005 a1 828 + ├───╯ 829 829 │ ○ 7b44470918f4 b2 830 830 │ ○ dcc98bc8bbea b1 831 831 ├─╯ 832 832 ◆ 000000000000 833 - "#); 833 + "); 834 834 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 835 835 836 836 // Duplicate multiple commits without a direct ancestry relationship after ··· 846 846 Duplicated dcc98bc8bbea as prukwozq dfe5dcad b1 847 847 Rebased 1 commits onto duplicated commits 848 848 "#); 849 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 850 - ○ 2db9fa035611 a4 851 - ├─╮ 852 - │ ○ dfe5dcad355b b1 849 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 850 + @ 0cdd923e993a d2 851 + ○ 0f21c5e185c5 d1 852 + │ ○ 2db9fa035611 a4 853 853 │ ├─╮ 854 - ○ │ │ b6a5e31daed5 a1 855 - ╰─┬─╮ 856 - │ ○ 09560d60cac4 c2 857 - │ ○ b27346e9a9bd c1 858 - ○ │ 17072aa2b823 a3 859 - ○ │ 47df67757a64 a2 860 - ○ │ 9e85a474f005 a1 861 - ├─╯ 862 - @ │ 0cdd923e993a d2 863 - ○ │ 0f21c5e185c5 d1 864 - ├─╯ 854 + │ │ ○ dfe5dcad355b b1 855 + │ │ ├─╮ 856 + │ ○ │ │ b6a5e31daed5 a1 857 + │ ╰─┬─╮ 858 + │ │ ○ 09560d60cac4 c2 859 + │ │ ○ b27346e9a9bd c1 860 + ├─────╯ 861 + │ ○ 17072aa2b823 a3 862 + │ ○ 47df67757a64 a2 863 + │ ○ 9e85a474f005 a1 864 + ├───╯ 865 865 │ ○ 7b44470918f4 b2 866 866 │ ○ dcc98bc8bbea b1 867 867 ├─╯ 868 868 ◆ 000000000000 869 - "#); 869 + "); 870 870 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 871 871 872 872 // Duplicate multiple commits with an ancestry relationship after a single ··· 878 878 Duplicated 9e85a474f005 as vvvtksvt 940b5139 a1 879 879 Duplicated 17072aa2b823 as yvrnrpnw 9d985606 a3 880 880 "#); 881 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 882 - ○ 9d9856065046 a3 883 - ○ 940b51398e5d a1 884 - ○ 09560d60cac4 c2 885 - ○ b27346e9a9bd c1 886 - │ @ 0cdd923e993a d2 887 - │ ○ 0f21c5e185c5 d1 881 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 882 + @ 0cdd923e993a d2 883 + ○ 0f21c5e185c5 d1 884 + │ ○ 9d9856065046 a3 885 + │ ○ 940b51398e5d a1 886 + │ ○ 09560d60cac4 c2 887 + │ ○ b27346e9a9bd c1 888 888 ├─╯ 889 889 │ ○ 7b44470918f4 b2 890 890 │ ○ dcc98bc8bbea b1 ··· 895 895 │ ○ 9e85a474f005 a1 896 896 ├─╯ 897 897 ◆ 000000000000 898 - "#); 898 + "); 899 899 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 900 900 901 901 // Duplicate multiple commits with an ancestry relationship after a single ··· 910 910 Duplicated 17072aa2b823 as rxnrppxl 47586b09 a3 911 911 Rebased 3 commits onto duplicated commits 912 912 "#); 913 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 914 - ○ 2174f54d55a9 a4 915 - ○ 0224bfb4fc3d a3 916 - ○ 22d3bdc60967 a2 917 - ○ 47586b09a555 a3 918 - ○ 4324d289e62c a2 919 - ○ 9e85a474f005 a1 920 - │ @ 0cdd923e993a d2 921 - │ ○ 0f21c5e185c5 d1 922 - ├─╯ 913 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 914 + @ 0cdd923e993a d2 915 + ○ 0f21c5e185c5 d1 923 916 │ ○ 09560d60cac4 c2 924 917 │ ○ b27346e9a9bd c1 925 918 ├─╯ 926 919 │ ○ 7b44470918f4 b2 927 920 │ ○ dcc98bc8bbea b1 928 921 ├─╯ 922 + │ ○ 2174f54d55a9 a4 923 + │ ○ 0224bfb4fc3d a3 924 + │ ○ 22d3bdc60967 a2 925 + │ ○ 47586b09a555 a3 926 + │ ○ 4324d289e62c a2 927 + │ ○ 9e85a474f005 a1 928 + ├─╯ 929 929 ◆ 000000000000 930 - "#); 930 + "); 931 931 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 932 932 933 933 // Duplicate multiple commits with an ancestry relationship after a single ··· 942 942 Duplicated 47df67757a64 as nqtyztop a80a88f5 a2 943 943 Rebased 1 commits onto duplicated commits 944 944 "#); 945 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 946 - ○ d1f47b881c72 a4 947 - ○ a80a88f5c6d6 a2 948 - ○ 08e917fe904c a1 949 - ○ 17072aa2b823 a3 950 - ○ 47df67757a64 a2 951 - ○ 9e85a474f005 a1 952 - │ @ 0cdd923e993a d2 953 - │ ○ 0f21c5e185c5 d1 954 - ├─╯ 945 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 946 + @ 0cdd923e993a d2 947 + ○ 0f21c5e185c5 d1 955 948 │ ○ 09560d60cac4 c2 956 949 │ ○ b27346e9a9bd c1 957 950 ├─╯ 958 951 │ ○ 7b44470918f4 b2 959 952 │ ○ dcc98bc8bbea b1 960 953 ├─╯ 954 + │ ○ d1f47b881c72 a4 955 + │ ○ a80a88f5c6d6 a2 956 + │ ○ 08e917fe904c a1 957 + │ ○ 17072aa2b823 a3 958 + │ ○ 47df67757a64 a2 959 + │ ○ 9e85a474f005 a1 960 + ├─╯ 961 961 ◆ 000000000000 962 - "#); 962 + "); 963 963 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 964 964 965 965 // Duplicate multiple commits with an ancestry relationship after multiple ··· 1008 1008 Duplicated 196bc1f0efc1 as puxpuzrm 71d9b4a4 a4 1009 1009 Rebased 2 commits onto duplicated commits 1010 1010 "#); 1011 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1012 - ○ fc18e2f00060 a4 1013 - ○ bc2303a7d63e a3 1014 - ○ 71d9b4a48273 a4 1015 - ○ 9d8de4c3ad3e a3 1016 - ├─╮ 1017 - │ ○ 09560d60cac4 c2 1018 - │ ○ b27346e9a9bd c1 1019 - ○ │ 47df67757a64 a2 1020 - ○ │ 9e85a474f005 a1 1021 - ├─╯ 1022 - │ @ 0cdd923e993a d2 1023 - │ ○ 0f21c5e185c5 d1 1011 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1012 + @ 0cdd923e993a d2 1013 + ○ 0f21c5e185c5 d1 1014 + │ ○ fc18e2f00060 a4 1015 + │ ○ bc2303a7d63e a3 1016 + │ ○ 71d9b4a48273 a4 1017 + │ ○ 9d8de4c3ad3e a3 1018 + │ ├─╮ 1019 + │ │ ○ 09560d60cac4 c2 1020 + │ │ ○ b27346e9a9bd c1 1021 + ├───╯ 1022 + │ ○ 47df67757a64 a2 1023 + │ ○ 9e85a474f005 a1 1024 1024 ├─╯ 1025 1025 │ ○ 7b44470918f4 b2 1026 1026 │ ○ dcc98bc8bbea b1 1027 1027 ├─╯ 1028 1028 ◆ 000000000000 1029 - "#); 1029 + "); 1030 1030 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1031 1031 1032 1032 // Duplicate multiple commits with an ancestry relationship after multiple ··· 1043 1043 Duplicated 47df67757a64 as znsksvls 0b619bbb a2 1044 1044 Rebased 1 commits onto duplicated commits 1045 1045 "#); 1046 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1047 - ○ 5006826a3086 a4 1048 - ○ 0b619bbbe823 a2 1049 - ○ cc0bfcbe97fe a1 1050 - ├─╮ 1051 - │ ○ 09560d60cac4 c2 1052 - │ ○ b27346e9a9bd c1 1053 - ○ │ 17072aa2b823 a3 1054 - ○ │ 47df67757a64 a2 1055 - ○ │ 9e85a474f005 a1 1056 - ├─╯ 1057 - │ @ 0cdd923e993a d2 1058 - │ ○ 0f21c5e185c5 d1 1046 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1047 + @ 0cdd923e993a d2 1048 + ○ 0f21c5e185c5 d1 1049 + │ ○ 5006826a3086 a4 1050 + │ ○ 0b619bbbe823 a2 1051 + │ ○ cc0bfcbe97fe a1 1052 + │ ├─╮ 1053 + │ │ ○ 09560d60cac4 c2 1054 + │ │ ○ b27346e9a9bd c1 1055 + ├───╯ 1056 + │ ○ 17072aa2b823 a3 1057 + │ ○ 47df67757a64 a2 1058 + │ ○ 9e85a474f005 a1 1059 1059 ├─╯ 1060 1060 │ ○ 7b44470918f4 b2 1061 1061 │ ○ dcc98bc8bbea b1 1062 1062 ├─╯ 1063 1063 ◆ 000000000000 1064 - "#); 1064 + "); 1065 1065 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1066 1066 1067 1067 // Should error if a loop will be created. ··· 1117 1117 Duplicated 9e85a474f005 as pzsxstzt b34eead0 a1 1118 1118 Rebased 1 commits onto duplicated commits 1119 1119 "#); 1120 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1121 - ○ a384ab7ad1f6 b2 1122 - ○ b34eead0fdf5 a1 1123 - ○ dcc98bc8bbea b1 1124 - │ @ 0cdd923e993a d2 1125 - │ ○ 0f21c5e185c5 d1 1126 - ├─╯ 1120 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1121 + @ 0cdd923e993a d2 1122 + ○ 0f21c5e185c5 d1 1127 1123 │ ○ 09560d60cac4 c2 1128 1124 │ ○ b27346e9a9bd c1 1129 1125 ├─╯ 1126 + │ ○ a384ab7ad1f6 b2 1127 + │ ○ b34eead0fdf5 a1 1128 + │ ○ dcc98bc8bbea b1 1129 + ├─╯ 1130 1130 │ ○ 196bc1f0efc1 a4 1131 1131 │ ○ 17072aa2b823 a3 1132 1132 │ ○ 47df67757a64 a2 1133 1133 │ ○ 9e85a474f005 a1 1134 1134 ├─╯ 1135 1135 ◆ 000000000000 1136 - "#); 1136 + "); 1137 1137 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1138 1138 1139 1139 // Duplicate a single commit before a single ancestor commit. ··· 1144 1144 Duplicated 17072aa2b823 as qmkrwlvp a982be78 a3 1145 1145 Rebased 4 commits onto duplicated commits 1146 1146 "#); 1147 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1148 - ○ 09981b821640 a4 1149 - ○ 7f96a38d7b7b a3 1150 - ○ d37b384f7ce9 a2 1151 - ○ 4a0df1f03819 a1 1152 - ○ a982be787d28 a3 1153 - │ @ 0cdd923e993a d2 1154 - │ ○ 0f21c5e185c5 d1 1147 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1148 + @ 0cdd923e993a d2 1149 + ○ 0f21c5e185c5 d1 1150 + │ ○ 09981b821640 a4 1151 + │ ○ 7f96a38d7b7b a3 1152 + │ ○ d37b384f7ce9 a2 1153 + │ ○ 4a0df1f03819 a1 1154 + │ ○ a982be787d28 a3 1155 1155 ├─╯ 1156 1156 │ ○ 09560d60cac4 c2 1157 1157 │ ○ b27346e9a9bd c1 ··· 1160 1160 │ ○ dcc98bc8bbea b1 1161 1161 ├─╯ 1162 1162 ◆ 000000000000 1163 - "#); 1163 + "); 1164 1164 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1165 1165 1166 1166 // Duplicate a single commit before a single descendant commit. ··· 1171 1171 Duplicated 9e85a474f005 as qwyusntz 2b066074 a1 1172 1172 Rebased 2 commits onto duplicated commits 1173 1173 "#); 1174 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1175 - ○ 34812a9db795 a4 1176 - ○ b42fc445deeb a3 1177 - ○ 2b0660740e57 a1 1178 - ○ 47df67757a64 a2 1179 - ○ 9e85a474f005 a1 1180 - │ @ 0cdd923e993a d2 1181 - │ ○ 0f21c5e185c5 d1 1182 - ├─╯ 1174 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1175 + @ 0cdd923e993a d2 1176 + ○ 0f21c5e185c5 d1 1183 1177 │ ○ 09560d60cac4 c2 1184 1178 │ ○ b27346e9a9bd c1 1185 1179 ├─╯ 1186 1180 │ ○ 7b44470918f4 b2 1187 1181 │ ○ dcc98bc8bbea b1 1188 1182 ├─╯ 1183 + │ ○ 34812a9db795 a4 1184 + │ ○ b42fc445deeb a3 1185 + │ ○ 2b0660740e57 a1 1186 + │ ○ 47df67757a64 a2 1187 + │ ○ 9e85a474f005 a1 1188 + ├─╯ 1189 1189 ◆ 000000000000 1190 - "#); 1190 + "); 1191 1191 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1192 1192 1193 1193 // Duplicate a single commit before multiple commits with no direct ··· 1201 1201 Duplicated 9e85a474f005 as soqnvnyz 671da6dc a1 1202 1202 Rebased 2 commits onto duplicated commits 1203 1203 "#); 1204 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1205 - ○ 35ccc31b58bd c2 1206 - │ ○ 7951d1641b4b b2 1207 - ├─╯ 1208 - ○ 671da6dc2d2e a1 1209 - ├─╮ 1210 - │ ○ b27346e9a9bd c1 1211 - ○ │ dcc98bc8bbea b1 1212 - ├─╯ 1213 - │ @ 0cdd923e993a d2 1214 - │ ○ 0f21c5e185c5 d1 1204 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1205 + @ 0cdd923e993a d2 1206 + ○ 0f21c5e185c5 d1 1207 + │ ○ 35ccc31b58bd c2 1208 + │ │ ○ 7951d1641b4b b2 1209 + │ ├─╯ 1210 + │ ○ 671da6dc2d2e a1 1211 + │ ├─╮ 1212 + │ │ ○ b27346e9a9bd c1 1213 + ├───╯ 1214 + │ ○ dcc98bc8bbea b1 1215 1215 ├─╯ 1216 1216 │ ○ 196bc1f0efc1 a4 1217 1217 │ ○ 17072aa2b823 a3 ··· 1219 1219 │ ○ 9e85a474f005 a1 1220 1220 ├─╯ 1221 1221 ◆ 000000000000 1222 - "#); 1222 + "); 1223 1223 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1224 1224 1225 1225 // Duplicate a single commit before multiple commits including an ancestor. ··· 1233 1233 Duplicated 17072aa2b823 as nsrwusvy 851a34a3 a3 1234 1234 Rebased 4 commits onto duplicated commits 1235 1235 "#); 1236 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1237 - ○ 3a9373464406 b2 1238 - │ ○ 8774e5674831 a4 1239 - │ ○ f3d3a1617059 a3 1240 - │ ○ f207ecb81650 a2 1241 - ├─╯ 1242 - ○ 851a34a36354 a3 1243 - ├─╮ 1244 - │ ○ dcc98bc8bbea b1 1245 - ○ │ 9e85a474f005 a1 1246 - ├─╯ 1247 - │ @ 0cdd923e993a d2 1248 - │ ○ 0f21c5e185c5 d1 1249 - ├─╯ 1236 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1237 + @ 0cdd923e993a d2 1238 + ○ 0f21c5e185c5 d1 1250 1239 │ ○ 09560d60cac4 c2 1251 1240 │ ○ b27346e9a9bd c1 1252 1241 ├─╯ 1242 + │ ○ 3a9373464406 b2 1243 + │ │ ○ 8774e5674831 a4 1244 + │ │ ○ f3d3a1617059 a3 1245 + │ │ ○ f207ecb81650 a2 1246 + │ ├─╯ 1247 + │ ○ 851a34a36354 a3 1248 + │ ├─╮ 1249 + │ │ ○ dcc98bc8bbea b1 1250 + ├───╯ 1251 + │ ○ 9e85a474f005 a1 1252 + ├─╯ 1253 1253 ◆ 000000000000 1254 - "#); 1254 + "); 1255 1255 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1256 1256 1257 1257 // Duplicate a single commit before multiple commits including a descendant. ··· 1265 1265 Duplicated 9e85a474f005 as xpnwykqz af64c5e4 a1 1266 1266 Rebased 3 commits onto duplicated commits 1267 1267 "#); 1268 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1269 - ○ f9f4cbe12efc b2 1270 - │ ○ e8057839c645 a4 1271 - │ ○ aa3ce5a43997 a3 1272 - ├─╯ 1273 - ○ af64c5e44fc7 a1 1274 - ├─╮ 1275 - │ ○ dcc98bc8bbea b1 1276 - ○ │ 47df67757a64 a2 1277 - ○ │ 9e85a474f005 a1 1278 - ├─╯ 1279 - │ @ 0cdd923e993a d2 1280 - │ ○ 0f21c5e185c5 d1 1281 - ├─╯ 1268 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1269 + @ 0cdd923e993a d2 1270 + ○ 0f21c5e185c5 d1 1282 1271 │ ○ 09560d60cac4 c2 1283 1272 │ ○ b27346e9a9bd c1 1284 1273 ├─╯ 1274 + │ ○ f9f4cbe12efc b2 1275 + │ │ ○ e8057839c645 a4 1276 + │ │ ○ aa3ce5a43997 a3 1277 + │ ├─╯ 1278 + │ ○ af64c5e44fc7 a1 1279 + │ ├─╮ 1280 + │ │ ○ dcc98bc8bbea b1 1281 + ├───╯ 1282 + │ ○ 47df67757a64 a2 1283 + │ ○ 9e85a474f005 a1 1284 + ├─╯ 1285 1285 ◆ 000000000000 1286 - "#); 1286 + "); 1287 1287 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1288 1288 1289 1289 // Duplicate multiple commits without a direct ancestry relationship before a ··· 1296 1296 Duplicated dcc98bc8bbea as pxnqtknr 2233b9a8 b1 1297 1297 Rebased 2 commits onto duplicated commits 1298 1298 "#); 1299 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1300 - ○ cf7c4c4cc8bc c2 1301 - ○ 6412acdac711 c1 1302 - ├─╮ 1303 - │ ○ 2233b9a87d86 b1 1304 - ○ │ fa625d74e0ae a1 1305 - ├─╯ 1306 - │ @ 0cdd923e993a d2 1307 - │ ○ 0f21c5e185c5 d1 1299 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1300 + @ 0cdd923e993a d2 1301 + ○ 0f21c5e185c5 d1 1302 + │ ○ cf7c4c4cc8bc c2 1303 + │ ○ 6412acdac711 c1 1304 + │ ├─╮ 1305 + │ │ ○ 2233b9a87d86 b1 1306 + ├───╯ 1307 + │ ○ fa625d74e0ae a1 1308 1308 ├─╯ 1309 1309 │ ○ 7b44470918f4 b2 1310 1310 │ ○ dcc98bc8bbea b1 ··· 1315 1315 │ ○ 9e85a474f005 a1 1316 1316 ├─╯ 1317 1317 ◆ 000000000000 1318 - "#); 1318 + "); 1319 1319 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1320 1320 1321 1321 // Duplicate multiple commits without a direct ancestry relationship before a ··· 1329 1329 Duplicated dcc98bc8bbea as yqnpwwmq 529ab44a b1 1330 1330 Rebased 3 commits onto duplicated commits 1331 1331 "#); 1332 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1333 - ○ eb4ddce3bfef a4 1334 - ○ b0b76f7bedf8 a3 1335 - ○ b5fdef30de16 a2 1336 - ├─╮ 1337 - │ ○ 529ab44a81ed b1 1338 - ○ │ 0a1027765fdd a3 1339 - ├─╯ 1340 - ○ 9e85a474f005 a1 1341 - │ @ 0cdd923e993a d2 1342 - │ ○ 0f21c5e185c5 d1 1343 - ├─╯ 1332 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1333 + @ 0cdd923e993a d2 1334 + ○ 0f21c5e185c5 d1 1344 1335 │ ○ 09560d60cac4 c2 1345 1336 │ ○ b27346e9a9bd c1 1346 1337 ├─╯ 1347 1338 │ ○ 7b44470918f4 b2 1348 1339 │ ○ dcc98bc8bbea b1 1349 1340 ├─╯ 1341 + │ ○ eb4ddce3bfef a4 1342 + │ ○ b0b76f7bedf8 a3 1343 + │ ○ b5fdef30de16 a2 1344 + │ ├─╮ 1345 + │ │ ○ 529ab44a81ed b1 1346 + │ ○ │ 0a1027765fdd a3 1347 + │ ├─╯ 1348 + │ ○ 9e85a474f005 a1 1349 + ├─╯ 1350 1350 ◆ 000000000000 1351 - "#); 1351 + "); 1352 1352 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1353 1353 1354 1354 // Duplicate multiple commits without a direct ancestry relationship before a ··· 1362 1362 Duplicated dcc98bc8bbea as uukzylyy 63ba24cf b1 1363 1363 Rebased 2 commits onto duplicated commits 1364 1364 "#); 1365 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1366 - ○ 84d66cf1a667 a4 1367 - ○ 733e5aa5ee67 a3 1368 - ├─╮ 1369 - │ ○ 63ba24cf71df b1 1370 - ○ │ 7502d2419a00 a1 1371 - ├─╯ 1372 - ○ 47df67757a64 a2 1373 - ○ 9e85a474f005 a1 1374 - │ @ 0cdd923e993a d2 1375 - │ ○ 0f21c5e185c5 d1 1376 - ├─╯ 1365 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1366 + @ 0cdd923e993a d2 1367 + ○ 0f21c5e185c5 d1 1377 1368 │ ○ 09560d60cac4 c2 1378 1369 │ ○ b27346e9a9bd c1 1379 1370 ├─╯ 1380 1371 │ ○ 7b44470918f4 b2 1381 1372 │ ○ dcc98bc8bbea b1 1382 1373 ├─╯ 1374 + │ ○ 84d66cf1a667 a4 1375 + │ ○ 733e5aa5ee67 a3 1376 + │ ├─╮ 1377 + │ │ ○ 63ba24cf71df b1 1378 + │ ○ │ 7502d2419a00 a1 1379 + │ ├─╯ 1380 + │ ○ 47df67757a64 a2 1381 + │ ○ 9e85a474f005 a1 1382 + ├─╯ 1383 1383 ◆ 000000000000 1384 - "#); 1384 + "); 1385 1385 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1386 1386 1387 1387 // Duplicate multiple commits without a direct ancestry relationship before ··· 1434 1434 Duplicated dcc98bc8bbea as musouqkq 4748cf83 b1 1435 1435 Rebased 6 commits onto duplicated commits 1436 1436 "#); 1437 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1438 - ○ a86830bda155 c2 1439 - ○ dfa992eb0c5b c1 1440 - ├─╮ 1441 - │ │ ○ 2a975bb6fb8d a4 1442 - │ │ ○ bd65348afea2 a3 1443 - │ │ ○ 5aaf2e32fe6e a2 1444 - │ │ ○ c1841f6cb78b a1 1445 - ╭─┬─╯ 1446 - │ ○ 4748cf83e26e b1 1447 - ○ │ 4aef02939dcb a3 1448 - ├─╯ 1449 - │ @ 0cdd923e993a d2 1450 - │ ○ 0f21c5e185c5 d1 1437 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1438 + @ 0cdd923e993a d2 1439 + ○ 0f21c5e185c5 d1 1440 + │ ○ a86830bda155 c2 1441 + │ ○ dfa992eb0c5b c1 1442 + │ ├─╮ 1443 + │ │ │ ○ 2a975bb6fb8d a4 1444 + │ │ │ ○ bd65348afea2 a3 1445 + │ │ │ ○ 5aaf2e32fe6e a2 1446 + │ │ │ ○ c1841f6cb78b a1 1447 + │ ╭─┬─╯ 1448 + │ │ ○ 4748cf83e26e b1 1449 + ├───╯ 1450 + │ ○ 4aef02939dcb a3 1451 1451 ├─╯ 1452 1452 │ ○ 7b44470918f4 b2 1453 1453 │ ○ dcc98bc8bbea b1 1454 1454 ├─╯ 1455 1455 ◆ 000000000000 1456 - "#); 1456 + "); 1457 1457 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1458 1458 1459 1459 // Duplicate multiple commits without a direct ancestry relationship before ··· 1469 1469 Duplicated dcc98bc8bbea as prukwozq 8175fcec b1 1470 1470 Rebased 3 commits onto duplicated commits 1471 1471 "#); 1472 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1473 - ○ 7a485e3977a8 c2 1474 - ├─╮ 1475 - │ │ ○ e5464cd6273d a4 1476 - │ │ ○ e7bb732c469e a3 1477 - ╭─┬─╯ 1478 - │ ○ 8175fcec2ded b1 1472 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1473 + @ 0cdd923e993a d2 1474 + ○ 0f21c5e185c5 d1 1475 + │ ○ 7a485e3977a8 c2 1479 1476 │ ├─╮ 1480 - ○ │ │ 024440c4a5da a1 1481 - ╰─┬─╮ 1482 - │ ○ b27346e9a9bd c1 1483 - ○ │ 47df67757a64 a2 1484 - ○ │ 9e85a474f005 a1 1485 - ├─╯ 1486 - @ │ 0cdd923e993a d2 1487 - ○ │ 0f21c5e185c5 d1 1488 - ├─╯ 1477 + │ │ │ ○ e5464cd6273d a4 1478 + │ │ │ ○ e7bb732c469e a3 1479 + │ ╭─┬─╯ 1480 + │ │ ○ 8175fcec2ded b1 1481 + │ │ ├─╮ 1482 + │ ○ │ │ 024440c4a5da a1 1483 + │ ╰─┬─╮ 1484 + │ │ ○ b27346e9a9bd c1 1485 + ├─────╯ 1486 + │ ○ 47df67757a64 a2 1487 + │ ○ 9e85a474f005 a1 1488 + ├───╯ 1489 1489 │ ○ 7b44470918f4 b2 1490 1490 │ ○ dcc98bc8bbea b1 1491 1491 ├─╯ 1492 1492 ◆ 000000000000 1493 - "#); 1493 + "); 1494 1494 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1495 1495 1496 1496 // Duplicate multiple commits with an ancestry relationship before a single ··· 1503 1503 Duplicated 17072aa2b823 as yvrnrpnw 441a2568 a3 1504 1504 Rebased 1 commits onto duplicated commits 1505 1505 "#); 1506 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1507 - ○ 756972984dac c2 1508 - ○ 441a25683840 a3 1509 - ○ ad5a3d824060 a1 1510 - ○ b27346e9a9bd c1 1511 - │ @ 0cdd923e993a d2 1512 - │ ○ 0f21c5e185c5 d1 1506 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1507 + @ 0cdd923e993a d2 1508 + ○ 0f21c5e185c5 d1 1509 + │ ○ 756972984dac c2 1510 + │ ○ 441a25683840 a3 1511 + │ ○ ad5a3d824060 a1 1512 + │ ○ b27346e9a9bd c1 1513 1513 ├─╯ 1514 1514 │ ○ 7b44470918f4 b2 1515 1515 │ ○ dcc98bc8bbea b1 ··· 1520 1520 │ ○ 9e85a474f005 a1 1521 1521 ├─╯ 1522 1522 ◆ 000000000000 1523 - "#); 1523 + "); 1524 1524 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1525 1525 1526 1526 // Duplicate multiple commits with an ancestry relationship before a single ··· 1535 1535 Duplicated 17072aa2b823 as rxnrppxl b72e2eaa a3 1536 1536 Rebased 4 commits onto duplicated commits 1537 1537 "#); 1538 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1539 - ○ de1a87f140d9 a4 1540 - ○ 3b405d96fbfb a3 1541 - ○ 41677a1f0572 a2 1542 - ○ 00c6a7cebcdb a1 1543 - ○ b72e2eaa3f7f a3 1544 - ○ ad0234a34661 a1 1545 - │ @ 0cdd923e993a d2 1546 - │ ○ 0f21c5e185c5 d1 1538 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1539 + @ 0cdd923e993a d2 1540 + ○ 0f21c5e185c5 d1 1541 + │ ○ de1a87f140d9 a4 1542 + │ ○ 3b405d96fbfb a3 1543 + │ ○ 41677a1f0572 a2 1544 + │ ○ 00c6a7cebcdb a1 1545 + │ ○ b72e2eaa3f7f a3 1546 + │ ○ ad0234a34661 a1 1547 1547 ├─╯ 1548 1548 │ ○ 09560d60cac4 c2 1549 1549 │ ○ b27346e9a9bd c1 ··· 1552 1552 │ ○ dcc98bc8bbea b1 1553 1553 ├─╯ 1554 1554 ◆ 000000000000 1555 - "#); 1555 + "); 1556 1556 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1557 1557 1558 1558 // Duplicate multiple commits with an ancestry relationship before a single ··· 1567 1567 Duplicated 47df67757a64 as nqtyztop bddcdcd1 a2 1568 1568 Rebased 2 commits onto duplicated commits 1569 1569 "#); 1570 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1571 - ○ 13038f9969fa a4 1572 - ○ 327c3bc13b75 a3 1573 - ○ bddcdcd1ef61 a2 1574 - ○ 2fdd3c3dabfc a1 1575 - ○ 47df67757a64 a2 1576 - ○ 9e85a474f005 a1 1577 - │ @ 0cdd923e993a d2 1578 - │ ○ 0f21c5e185c5 d1 1579 - ├─╯ 1570 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1571 + @ 0cdd923e993a d2 1572 + ○ 0f21c5e185c5 d1 1580 1573 │ ○ 09560d60cac4 c2 1581 1574 │ ○ b27346e9a9bd c1 1582 1575 ├─╯ 1583 1576 │ ○ 7b44470918f4 b2 1584 1577 │ ○ dcc98bc8bbea b1 1585 1578 ├─╯ 1579 + │ ○ 13038f9969fa a4 1580 + │ ○ 327c3bc13b75 a3 1581 + │ ○ bddcdcd1ef61 a2 1582 + │ ○ 2fdd3c3dabfc a1 1583 + │ ○ 47df67757a64 a2 1584 + │ ○ 9e85a474f005 a1 1585 + ├─╯ 1586 1586 ◆ 000000000000 1587 - "#); 1587 + "); 1588 1588 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1589 1589 1590 1590 // Duplicate multiple commits with an ancestry relationship before multiple ··· 1638 1638 Duplicated 196bc1f0efc1 as puxpuzrm 196c76cf a4 1639 1639 Rebased 4 commits onto duplicated commits 1640 1640 "#); 1641 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1642 - ○ d7ea487131da c2 1643 - │ ○ f8d49609e8d8 a4 1644 - │ ○ e3d75d821d33 a3 1645 - │ ○ 23d8d39dd2d1 a2 1646 - ├─╯ 1647 - ○ 196c76cf739f a4 1648 - ○ c7b7f78f8924 a3 1649 - ├─╮ 1650 - │ ○ b27346e9a9bd c1 1651 - ○ │ 9e85a474f005 a1 1652 - ├─╯ 1653 - │ @ 0cdd923e993a d2 1654 - │ ○ 0f21c5e185c5 d1 1641 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1642 + @ 0cdd923e993a d2 1643 + ○ 0f21c5e185c5 d1 1644 + │ ○ d7ea487131da c2 1645 + │ │ ○ f8d49609e8d8 a4 1646 + │ │ ○ e3d75d821d33 a3 1647 + │ │ ○ 23d8d39dd2d1 a2 1648 + │ ├─╯ 1649 + │ ○ 196c76cf739f a4 1650 + │ ○ c7b7f78f8924 a3 1651 + │ ├─╮ 1652 + │ │ ○ b27346e9a9bd c1 1653 + ├───╯ 1654 + │ ○ 9e85a474f005 a1 1655 1655 ├─╯ 1656 1656 │ ○ 7b44470918f4 b2 1657 1657 │ ○ dcc98bc8bbea b1 1658 1658 ├─╯ 1659 1659 ◆ 000000000000 1660 - "#); 1660 + "); 1661 1661 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1662 1662 1663 1663 // Duplicate multiple commits with an ancestry relationship before multiple ··· 1674 1674 Duplicated 47df67757a64 as znsksvls 37c5c955 a2 1675 1675 Rebased 3 commits onto duplicated commits 1676 1676 "#); 1677 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1678 - ○ d269d405ab74 c2 1679 - │ ○ 175de6d6b816 a4 1680 - │ ○ cdd9df354b86 a3 1681 - ├─╯ 1682 - ○ 37c5c955a90a a2 1683 - ○ 26d71f93323b a1 1684 - ├─╮ 1685 - │ ○ b27346e9a9bd c1 1686 - ○ │ 47df67757a64 a2 1687 - ○ │ 9e85a474f005 a1 1688 - ├─╯ 1689 - │ @ 0cdd923e993a d2 1690 - │ ○ 0f21c5e185c5 d1 1677 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1678 + @ 0cdd923e993a d2 1679 + ○ 0f21c5e185c5 d1 1680 + │ ○ d269d405ab74 c2 1681 + │ │ ○ 175de6d6b816 a4 1682 + │ │ ○ cdd9df354b86 a3 1683 + │ ├─╯ 1684 + │ ○ 37c5c955a90a a2 1685 + │ ○ 26d71f93323b a1 1686 + │ ├─╮ 1687 + │ │ ○ b27346e9a9bd c1 1688 + ├───╯ 1689 + │ ○ 47df67757a64 a2 1690 + │ ○ 9e85a474f005 a1 1691 1691 ├─╯ 1692 1692 │ ○ 7b44470918f4 b2 1693 1693 │ ○ dcc98bc8bbea b1 1694 1694 ├─╯ 1695 1695 ◆ 000000000000 1696 - "#); 1696 + "); 1697 1697 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1698 1698 1699 1699 // Should error if a loop will be created. ··· 1752 1752 Duplicated 9e85a474f005 as pzsxstzt d5ebd2c8 a1 1753 1753 Rebased 1 commits onto duplicated commits 1754 1754 "#); 1755 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1756 - ○ 20cc68b3be82 b2 1757 - ├─╮ 1758 - │ ○ d5ebd2c814fb a1 1759 - │ ○ 09560d60cac4 c2 1760 - │ ○ b27346e9a9bd c1 1761 - ○ │ dcc98bc8bbea b1 1762 - ├─╯ 1763 - │ @ 0cdd923e993a d2 1764 - │ ○ 0f21c5e185c5 d1 1755 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1756 + @ 0cdd923e993a d2 1757 + ○ 0f21c5e185c5 d1 1758 + │ ○ 20cc68b3be82 b2 1759 + │ ├─╮ 1760 + │ │ ○ d5ebd2c814fb a1 1761 + │ │ ○ 09560d60cac4 c2 1762 + │ │ ○ b27346e9a9bd c1 1763 + ├───╯ 1764 + │ ○ dcc98bc8bbea b1 1765 1765 ├─╯ 1766 1766 │ ○ 196bc1f0efc1 a4 1767 1767 │ ○ 17072aa2b823 a3 ··· 1769 1769 │ ○ 9e85a474f005 a1 1770 1770 ├─╯ 1771 1771 ◆ 000000000000 1772 - "#); 1772 + "); 1773 1773 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1774 1774 1775 1775 // Duplicate a single commit in between ancestor commits. ··· 1783 1783 Duplicated 17072aa2b823 as qmkrwlvp c167d08f a3 1784 1784 Rebased 3 commits onto duplicated commits 1785 1785 "#); 1786 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1787 - ○ 8746d17a44cb a4 1788 - ○ 15a695f5bf13 a3 1789 - ○ 73e26c9e22e7 a2 1790 - ○ c167d08f8d9f a3 1791 - ○ 9e85a474f005 a1 1792 - │ @ 0cdd923e993a d2 1793 - │ ○ 0f21c5e185c5 d1 1794 - ├─╯ 1786 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1787 + @ 0cdd923e993a d2 1788 + ○ 0f21c5e185c5 d1 1795 1789 │ ○ 09560d60cac4 c2 1796 1790 │ ○ b27346e9a9bd c1 1797 1791 ├─╯ 1798 1792 │ ○ 7b44470918f4 b2 1799 1793 │ ○ dcc98bc8bbea b1 1800 1794 ├─╯ 1795 + │ ○ 8746d17a44cb a4 1796 + │ ○ 15a695f5bf13 a3 1797 + │ ○ 73e26c9e22e7 a2 1798 + │ ○ c167d08f8d9f a3 1799 + │ ○ 9e85a474f005 a1 1800 + ├─╯ 1801 1801 ◆ 000000000000 1802 - "#); 1802 + "); 1803 1803 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1804 1804 1805 1805 // Duplicate a single commit in between an ancestor commit and a commit with no ··· 1814 1814 Duplicated 17072aa2b823 as qwyusntz 0481e43c a3 1815 1815 Rebased 3 commits onto duplicated commits 1816 1816 "#); 1817 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1818 - ○ 68632a4645b3 a4 1819 - ○ 61736eaab064 a3 1820 - ○ b8822ec79abf a2 1821 - ├─╮ 1822 - │ ○ 0481e43c0ba7 a3 1823 - │ ○ 7b44470918f4 b2 1824 - │ ○ dcc98bc8bbea b1 1825 - ○ │ 9e85a474f005 a1 1826 - ├─╯ 1827 - │ @ 0cdd923e993a d2 1828 - │ ○ 0f21c5e185c5 d1 1829 - ├─╯ 1817 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1818 + @ 0cdd923e993a d2 1819 + ○ 0f21c5e185c5 d1 1830 1820 │ ○ 09560d60cac4 c2 1831 1821 │ ○ b27346e9a9bd c1 1832 1822 ├─╯ 1823 + │ ○ 68632a4645b3 a4 1824 + │ ○ 61736eaab064 a3 1825 + │ ○ b8822ec79abf a2 1826 + │ ├─╮ 1827 + │ │ ○ 0481e43c0ba7 a3 1828 + │ │ ○ 7b44470918f4 b2 1829 + │ │ ○ dcc98bc8bbea b1 1830 + ├───╯ 1831 + │ ○ 9e85a474f005 a1 1832 + ├─╯ 1833 1833 ◆ 000000000000 1834 - "#); 1834 + "); 1835 1835 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1836 1836 1837 1837 // Duplicate a single commit in between descendant commits. ··· 1845 1845 Duplicated 9e85a474f005 as soqnvnyz 981c26cf a1 1846 1846 Rebased 1 commits onto duplicated commits 1847 1847 "#); 1848 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1849 - ○ 53de53f5df1d a4 1850 - ○ 981c26cf1d8c a1 1851 - ○ 17072aa2b823 a3 1852 - ○ 47df67757a64 a2 1853 - ○ 9e85a474f005 a1 1854 - │ @ 0cdd923e993a d2 1855 - │ ○ 0f21c5e185c5 d1 1856 - ├─╯ 1848 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1849 + @ 0cdd923e993a d2 1850 + ○ 0f21c5e185c5 d1 1857 1851 │ ○ 09560d60cac4 c2 1858 1852 │ ○ b27346e9a9bd c1 1859 1853 ├─╯ 1860 1854 │ ○ 7b44470918f4 b2 1861 1855 │ ○ dcc98bc8bbea b1 1862 1856 ├─╯ 1857 + │ ○ 53de53f5df1d a4 1858 + │ ○ 981c26cf1d8c a1 1859 + │ ○ 17072aa2b823 a3 1860 + │ ○ 47df67757a64 a2 1861 + │ ○ 9e85a474f005 a1 1862 + ├─╯ 1863 1863 ◆ 000000000000 1864 - "#); 1864 + "); 1865 1865 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1866 1866 1867 1867 // Duplicate a single commit in between a descendant commit and a commit with no ··· 1876 1876 Duplicated 9e85a474f005 as nsrwusvy e4ec1bed a1 1877 1877 Rebased 1 commits onto duplicated commits 1878 1878 "#); 1879 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1880 - ○ 0ec3be87fae7 b2 1881 - ├─╮ 1882 - │ ○ e4ec1bed0e7c a1 1883 - ○ │ dcc98bc8bbea b1 1884 - │ │ @ 0cdd923e993a d2 1885 - │ │ ○ 0f21c5e185c5 d1 1886 - ├───╯ 1887 - │ │ ○ 09560d60cac4 c2 1888 - │ │ ○ b27346e9a9bd c1 1889 - ├───╯ 1890 - │ │ ○ 196bc1f0efc1 a4 1879 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1880 + @ 0cdd923e993a d2 1881 + ○ 0f21c5e185c5 d1 1882 + │ ○ 09560d60cac4 c2 1883 + │ ○ b27346e9a9bd c1 1884 + ├─╯ 1885 + │ ○ 0ec3be87fae7 b2 1886 + │ ├─╮ 1887 + │ │ ○ e4ec1bed0e7c a1 1888 + │ ○ │ dcc98bc8bbea b1 1889 + ├─╯ │ 1890 + │ ○ │ 196bc1f0efc1 a4 1891 1891 │ ├─╯ 1892 1892 │ ○ 17072aa2b823 a3 1893 1893 │ ○ 47df67757a64 a2 1894 1894 │ ○ 9e85a474f005 a1 1895 1895 ├─╯ 1896 1896 ◆ 000000000000 1897 - "#); 1897 + "); 1898 1898 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1899 1899 1900 1900 // Duplicate a single commit in between an ancestor commit and a descendant ··· 1908 1908 Duplicated 47df67757a64 as xpnwykqz 54cc0161 a2 1909 1909 Rebased 1 commits onto duplicated commits 1910 1910 "#); 1911 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1912 - ○ b08d6199fab9 a4 1913 - ├─╮ 1914 - │ ○ 54cc0161a5db a2 1915 - ○ │ 17072aa2b823 a3 1916 - ○ │ 47df67757a64 a2 1917 - ├─╯ 1918 - ○ 9e85a474f005 a1 1919 - │ @ 0cdd923e993a d2 1920 - │ ○ 0f21c5e185c5 d1 1921 - ├─╯ 1911 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1912 + @ 0cdd923e993a d2 1913 + ○ 0f21c5e185c5 d1 1922 1914 │ ○ 09560d60cac4 c2 1923 1915 │ ○ b27346e9a9bd c1 1924 1916 ├─╯ 1925 1917 │ ○ 7b44470918f4 b2 1926 1918 │ ○ dcc98bc8bbea b1 1927 1919 ├─╯ 1920 + │ ○ b08d6199fab9 a4 1921 + │ ├─╮ 1922 + │ │ ○ 54cc0161a5db a2 1923 + │ ○ │ 17072aa2b823 a3 1924 + │ ○ │ 47df67757a64 a2 1925 + │ ├─╯ 1926 + │ ○ 9e85a474f005 a1 1927 + ├─╯ 1928 1928 ◆ 000000000000 1929 - "#); 1929 + "); 1930 1930 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1931 1931 1932 1932 // Duplicate multiple commits without a direct ancestry relationship between ··· 1982 1982 Duplicated dcc98bc8bbea as yqnpwwmq f18498f2 b1 1983 1983 Rebased 1 commits onto duplicated commits 1984 1984 "#); 1985 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1986 - ○ da87b56a17e4 c2 1987 - ├─┬─╮ 1988 - │ │ ○ f18498f24737 b1 1989 - │ ○ │ 0d11d4667aa9 a3 1990 - │ ├─╯ 1991 - ○ │ b27346e9a9bd c1 1992 - │ │ @ 0cdd923e993a d2 1993 - │ │ ○ 0f21c5e185c5 d1 1994 - ├───╯ 1995 - │ │ ○ 7b44470918f4 b2 1996 - │ │ ○ dcc98bc8bbea b1 1997 - ├───╯ 1998 - │ │ ○ 196bc1f0efc1 a4 1999 - │ │ ○ 17072aa2b823 a3 1985 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 1986 + @ 0cdd923e993a d2 1987 + ○ 0f21c5e185c5 d1 1988 + │ ○ da87b56a17e4 c2 1989 + │ ├─┬─╮ 1990 + │ │ │ ○ f18498f24737 b1 1991 + │ │ ○ │ 0d11d4667aa9 a3 1992 + │ │ ├─╯ 1993 + │ ○ │ b27346e9a9bd c1 1994 + ├─╯ │ 1995 + │ ○ │ 7b44470918f4 b2 1996 + │ ○ │ dcc98bc8bbea b1 1997 + ├─╯ │ 1998 + │ ○ │ 196bc1f0efc1 a4 1999 + │ ○ │ 17072aa2b823 a3 2000 2000 │ ├─╯ 2001 2001 │ ○ 47df67757a64 a2 2002 2002 │ ○ 9e85a474f005 a1 2003 2003 ├─╯ 2004 2004 ◆ 000000000000 2005 - "#); 2005 + "); 2006 2006 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 2007 2007 2008 2008 // Duplicate multiple commits without a direct ancestry relationship between a ··· 2019 2019 Duplicated dcc98bc8bbea as uukzylyy 7366036f b1 2020 2020 Rebased 1 commits onto duplicated commits 2021 2021 "#); 2022 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 2023 - ○ 61237f8ed16f c2 2024 - ├─┬─╮ 2025 - │ │ ○ 7366036f148d b1 2026 - │ ○ │ b7458ffedb08 a1 2027 - │ ├─╯ 2028 - ○ │ b27346e9a9bd c1 2029 - │ │ @ 0cdd923e993a d2 2030 - │ │ ○ 0f21c5e185c5 d1 2031 - ├───╯ 2032 - │ │ ○ 7b44470918f4 b2 2033 - │ │ ○ dcc98bc8bbea b1 2034 - ├───╯ 2035 - │ │ ○ 196bc1f0efc1 a4 2022 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 2023 + @ 0cdd923e993a d2 2024 + ○ 0f21c5e185c5 d1 2025 + │ ○ 61237f8ed16f c2 2026 + │ ├─┬─╮ 2027 + │ │ │ ○ 7366036f148d b1 2028 + │ │ ○ │ b7458ffedb08 a1 2029 + │ │ ├─╯ 2030 + │ ○ │ b27346e9a9bd c1 2031 + ├─╯ │ 2032 + │ ○ │ 7b44470918f4 b2 2033 + │ ○ │ dcc98bc8bbea b1 2034 + ├─╯ │ 2035 + │ ○ │ 196bc1f0efc1 a4 2036 2036 │ ├─╯ 2037 2037 │ ○ 17072aa2b823 a3 2038 2038 │ ○ 47df67757a64 a2 2039 2039 │ ○ 9e85a474f005 a1 2040 2040 ├─╯ 2041 2041 ◆ 000000000000 2042 - "#); 2042 + "); 2043 2043 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 2044 2044 2045 2045 // Duplicate multiple commits without a direct ancestry relationship between ··· 2133 2133 Duplicated 196bc1f0efc1 as prukwozq 96798f1b a4 2134 2134 Rebased 1 commits onto duplicated commits 2135 2135 "#); 2136 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 2137 - ○ 267f3c6f05a2 c2 2138 - ├─╮ 2139 - │ ○ 96798f1b59fc a4 2140 - │ ○ d4d3c9073a3b a3 2141 - ○ │ b27346e9a9bd c1 2142 - │ │ @ 0cdd923e993a d2 2143 - │ │ ○ 0f21c5e185c5 d1 2144 - ├───╯ 2145 - │ │ ○ 7b44470918f4 b2 2146 - │ │ ○ dcc98bc8bbea b1 2147 - ├───╯ 2148 - │ │ ○ 196bc1f0efc1 a4 2149 - │ │ ○ 17072aa2b823 a3 2136 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 2137 + @ 0cdd923e993a d2 2138 + ○ 0f21c5e185c5 d1 2139 + │ ○ 267f3c6f05a2 c2 2140 + │ ├─╮ 2141 + │ │ ○ 96798f1b59fc a4 2142 + │ │ ○ d4d3c9073a3b a3 2143 + │ ○ │ b27346e9a9bd c1 2144 + ├─╯ │ 2145 + │ ○ │ 7b44470918f4 b2 2146 + │ ○ │ dcc98bc8bbea b1 2147 + ├─╯ │ 2148 + │ ○ │ 196bc1f0efc1 a4 2149 + │ ○ │ 17072aa2b823 a3 2150 2150 │ ├─╯ 2151 2151 │ ○ 47df67757a64 a2 2152 2152 │ ○ 9e85a474f005 a1 2153 2153 ├─╯ 2154 2154 ◆ 000000000000 2155 - "#); 2155 + "); 2156 2156 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 2157 2157 2158 2158 // Duplicate multiple commits with an ancestry relationship between a commit ··· 2168 2168 Duplicated 47df67757a64 as yvrnrpnw 72eb571c a2 2169 2169 Rebased 2 commits onto duplicated commits 2170 2170 "#); 2171 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 2172 - ○ b5ab4b26d9a2 a4 2173 - ○ 64f9306ab0d0 a3 2174 - ├─╮ 2175 - │ ○ 72eb571caee0 a2 2176 - │ ○ 940b51398e5d a1 2177 - │ ○ 09560d60cac4 c2 2178 - │ ○ b27346e9a9bd c1 2179 - ○ │ 47df67757a64 a2 2180 - ○ │ 9e85a474f005 a1 2181 - ├─╯ 2182 - │ @ 0cdd923e993a d2 2183 - │ ○ 0f21c5e185c5 d1 2171 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 2172 + @ 0cdd923e993a d2 2173 + ○ 0f21c5e185c5 d1 2174 + │ ○ b5ab4b26d9a2 a4 2175 + │ ○ 64f9306ab0d0 a3 2176 + │ ├─╮ 2177 + │ │ ○ 72eb571caee0 a2 2178 + │ │ ○ 940b51398e5d a1 2179 + │ │ ○ 09560d60cac4 c2 2180 + │ │ ○ b27346e9a9bd c1 2181 + ├───╯ 2182 + │ ○ 47df67757a64 a2 2183 + │ ○ 9e85a474f005 a1 2184 2184 ├─╯ 2185 2185 │ ○ 7b44470918f4 b2 2186 2186 │ ○ dcc98bc8bbea b1 2187 2187 ├─╯ 2188 2188 ◆ 000000000000 2189 - "#); 2189 + "); 2190 2190 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 2191 2191 2192 2192 // Duplicate multiple commits with an ancestry relationship between descendant ··· 2203 2203 Duplicated 196bc1f0efc1 as rxnrppxl 53c4e5dd a4 2204 2204 Rebased 3 commits onto duplicated commits 2205 2205 "#); 2206 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 2207 - ○ 7668841ec9b9 a4 2208 - ○ 223fd997dec0 a3 2209 - ○ 9750bf965aff a2 2210 - ○ 53c4e5ddca56 a4 2211 - ○ 54dec05c42f1 a3 2212 - ○ 9e85a474f005 a1 2213 - │ @ 0cdd923e993a d2 2214 - │ ○ 0f21c5e185c5 d1 2215 - ├─╯ 2206 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 2207 + @ 0cdd923e993a d2 2208 + ○ 0f21c5e185c5 d1 2216 2209 │ ○ 09560d60cac4 c2 2217 2210 │ ○ b27346e9a9bd c1 2218 2211 ├─╯ 2219 2212 │ ○ 7b44470918f4 b2 2220 2213 │ ○ dcc98bc8bbea b1 2221 2214 ├─╯ 2215 + │ ○ 7668841ec9b9 a4 2216 + │ ○ 223fd997dec0 a3 2217 + │ ○ 9750bf965aff a2 2218 + │ ○ 53c4e5ddca56 a4 2219 + │ ○ 54dec05c42f1 a3 2220 + │ ○ 9e85a474f005 a1 2221 + ├─╯ 2222 2222 ◆ 000000000000 2223 - "#); 2223 + "); 2224 2224 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 2225 2225 2226 2226 // Duplicate multiple commits with an ancestry relationship between ancestor ··· 2237 2237 Duplicated 47df67757a64 as nqtyztop a80a88f5 a2 2238 2238 Rebased 1 commits onto duplicated commits 2239 2239 "#); 2240 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 2241 - ○ d1f47b881c72 a4 2242 - ○ a80a88f5c6d6 a2 2243 - ○ 08e917fe904c a1 2244 - ○ 17072aa2b823 a3 2245 - ○ 47df67757a64 a2 2246 - ○ 9e85a474f005 a1 2247 - │ @ 0cdd923e993a d2 2248 - │ ○ 0f21c5e185c5 d1 2249 - ├─╯ 2240 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 2241 + @ 0cdd923e993a d2 2242 + ○ 0f21c5e185c5 d1 2250 2243 │ ○ 09560d60cac4 c2 2251 2244 │ ○ b27346e9a9bd c1 2252 2245 ├─╯ 2253 2246 │ ○ 7b44470918f4 b2 2254 2247 │ ○ dcc98bc8bbea b1 2255 2248 ├─╯ 2249 + │ ○ d1f47b881c72 a4 2250 + │ ○ a80a88f5c6d6 a2 2251 + │ ○ 08e917fe904c a1 2252 + │ ○ 17072aa2b823 a3 2253 + │ ○ 47df67757a64 a2 2254 + │ ○ 9e85a474f005 a1 2255 + ├─╯ 2256 2256 ◆ 000000000000 2257 - "#); 2257 + "); 2258 2258 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 2259 2259 2260 2260 // Duplicate multiple commits with an ancestry relationship between an ancestor ··· 2269 2269 Duplicated 17072aa2b823 as uwrrnrtx 3ce18231 a3 2270 2270 Rebased 1 commits onto duplicated commits 2271 2271 "#); 2272 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 2273 - ○ 0855137fa398 a4 2274 - ├─╮ 2275 - │ ○ 3ce182317a5b a3 2276 - │ ○ 8517eaa73536 a2 2277 - ○ │ 17072aa2b823 a3 2278 - ○ │ 47df67757a64 a2 2279 - ├─╯ 2280 - ○ 9e85a474f005 a1 2281 - │ @ 0cdd923e993a d2 2282 - │ ○ 0f21c5e185c5 d1 2283 - ├─╯ 2272 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r" 2273 + @ 0cdd923e993a d2 2274 + ○ 0f21c5e185c5 d1 2284 2275 │ ○ 09560d60cac4 c2 2285 2276 │ ○ b27346e9a9bd c1 2286 2277 ├─╯ 2287 2278 │ ○ 7b44470918f4 b2 2288 2279 │ ○ dcc98bc8bbea b1 2289 2280 ├─╯ 2281 + │ ○ 0855137fa398 a4 2282 + │ ├─╮ 2283 + │ │ ○ 3ce182317a5b a3 2284 + │ │ ○ 8517eaa73536 a2 2285 + │ ○ │ 17072aa2b823 a3 2286 + │ ○ │ 47df67757a64 a2 2287 + │ ├─╯ 2288 + │ ○ 9e85a474f005 a1 2289 + ├─╯ 2290 2290 ◆ 000000000000 2291 - "#); 2291 + "); 2292 2292 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 2293 2293 2294 2294 // Should error if a loop will be created. ··· 2319 2319 insta::assert_snapshot!(stderr, @r###" 2320 2320 Duplicated 2443ea76b0b1 as mzvwutvl f5cefcbb a 2321 2321 "###); 2322 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 2323 - ○ f5cefcbb65a4 a 2324 - │ @ 2443ea76b0b1 a 2322 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 2323 + @ 2443ea76b0b1 a 2324 + │ ○ f5cefcbb65a4 a 2325 2325 ├─╯ 2326 2326 ◆ 000000000000 2327 - "###); 2327 + "#); 2328 2328 2329 2329 let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["undo"]); 2330 2330 insta::assert_snapshot!(stdout, @""); ··· 2365 2365 insta::assert_snapshot!(stderr, @r###" 2366 2366 Duplicated 7e4fbf4f2759 as znkkpsqq ce5f4eeb c 2367 2367 "###); 2368 - insta::assert_snapshot!(get_log_output_with_ts(&test_env, &repo_path), @r###" 2369 - ○ ce5f4eeb69d1 c @ 2001-02-03 04:05:16.000 +07:00 2370 - │ ○ 0ac2063b1bee c @ 2001-02-03 04:05:15.000 +07:00 2368 + insta::assert_snapshot!(get_log_output_with_ts(&test_env, &repo_path), @r#" 2369 + @ 7e4fbf4f2759 c @ 2001-02-03 04:05:13.000 +07:00 2370 + │ ○ ce5f4eeb69d1 c @ 2001-02-03 04:05:16.000 +07:00 2371 2371 ├─╯ 2372 - │ @ 7e4fbf4f2759 c @ 2001-02-03 04:05:13.000 +07:00 2372 + │ ○ 0ac2063b1bee c @ 2001-02-03 04:05:15.000 +07:00 2373 2373 ├─╯ 2374 2374 ○ 1394f625cbbd b @ 2001-02-03 04:05:11.000 +07:00 2375 2375 ○ 2443ea76b0b1 a @ 2001-02-03 04:05:09.000 +07:00 2376 2376 ◆ 000000000000 @ 1970-01-01 00:00:00.000 +00:00 2377 - "###); 2377 + "#); 2378 2378 2379 2379 let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["rebase", "-s", "b", "-d", "root()"]); 2380 2380 insta::assert_snapshot!(stdout, @""); ··· 2386 2386 "#); 2387 2387 // Some of the duplicate commits' timestamps were changed a little to make them 2388 2388 // have distinct commit ids. 2389 - insta::assert_snapshot!(get_log_output_with_ts(&test_env, &repo_path), @r###" 2390 - ○ b86e9f27d085 c @ 2001-02-03 04:05:16.000 +07:00 2391 - │ ○ 8033590fe04d c @ 2001-02-03 04:05:17.000 +07:00 2389 + insta::assert_snapshot!(get_log_output_with_ts(&test_env, &repo_path), @r#" 2390 + @ ed671a3cbf35 c @ 2001-02-03 04:05:18.000 +07:00 2391 + │ ○ b86e9f27d085 c @ 2001-02-03 04:05:16.000 +07:00 2392 2392 ├─╯ 2393 - │ @ ed671a3cbf35 c @ 2001-02-03 04:05:18.000 +07:00 2393 + │ ○ 8033590fe04d c @ 2001-02-03 04:05:17.000 +07:00 2394 2394 ├─╯ 2395 2395 ○ 4c6f1569e2a9 b @ 2001-02-03 04:05:18.000 +07:00 2396 2396 │ ○ 2443ea76b0b1 a @ 2001-02-03 04:05:09.000 +07:00 2397 2397 ├─╯ 2398 2398 ◆ 000000000000 @ 1970-01-01 00:00:00.000 +00:00 2399 - "###); 2399 + "#); 2400 2400 } 2401 2401 2402 2402 fn get_log_output(test_env: &TestEnvironment, repo_path: &Path) -> String {
+2 -2
cli/tests/test_git_colocated.rs
··· 554 554 // "original C" and "B_to_delete" are abandoned, as the corresponding bookmarks 555 555 // were deleted or moved on the remote (#864) 556 556 insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r#" 557 - ○ 4f3d13296f978cbc351c46a43b4619c91b888475 C_to_move moved C 558 - │ @ 9c2de797c3c299a40173c5af724329012b77cbdd 557 + @ 9c2de797c3c299a40173c5af724329012b77cbdd 558 + │ ○ 4f3d13296f978cbc351c46a43b4619c91b888475 C_to_move moved C 559 559 ├─╯ 560 560 ◆ a7e4cec4256b7995129b9d1e1bda7e1df6e60678 A git_head() A 561 561 ◆ 0000000000000000000000000000000000000000
+148 -148
cli/tests/test_git_fetch.rs
··· 482 482 trunk1: zowqyktl ff36dc55 descr_for_trunk1 483 483 @origin: zowqyktl ff36dc55 descr_for_trunk1 484 484 "###); 485 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 486 - ○ c7d4bdcbc215 descr_for_b b 487 - │ ○ decaa3966c83 descr_for_a2 a2 488 - ├─╯ 489 - │ ○ 359a9a02457d descr_for_a1 a1 490 - ├─╯ 491 - ○ ff36dc55760e descr_for_trunk1 trunk1 492 - │ @ 230dd059e1b0 485 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 486 + @ 230dd059e1b0 487 + │ ○ c7d4bdcbc215 descr_for_b b 488 + │ │ ○ decaa3966c83 descr_for_a2 a2 489 + │ ├─╯ 490 + │ │ ○ 359a9a02457d descr_for_a1 a1 491 + │ ├─╯ 492 + │ ○ ff36dc55760e descr_for_trunk1 trunk1 493 493 ├─╯ 494 494 ◆ 000000000000 495 - "###); 495 + "#); 496 496 497 497 // ==== Change both repos ==== 498 498 // First, change the target repo: ··· 515 515 ); 516 516 517 517 // Our repo before and after fetch 518 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 519 - ○ 061eddbb43ab new_descr_for_b_to_create_conflict b* 520 - │ ○ decaa3966c83 descr_for_a2 a2 521 - ├─╯ 522 - │ ○ 359a9a02457d descr_for_a1 a1 523 - ├─╯ 524 - ○ ff36dc55760e descr_for_trunk1 trunk1 525 - │ @ 230dd059e1b0 518 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 519 + @ 230dd059e1b0 520 + │ ○ 061eddbb43ab new_descr_for_b_to_create_conflict b* 521 + │ │ ○ decaa3966c83 descr_for_a2 a2 522 + │ ├─╯ 523 + │ │ ○ 359a9a02457d descr_for_a1 a1 524 + │ ├─╯ 525 + │ ○ ff36dc55760e descr_for_trunk1 trunk1 526 526 ├─╯ 527 527 ◆ 000000000000 528 - "###); 528 + "#); 529 529 insta::assert_snapshot!(get_bookmark_output(&test_env, &target_jj_repo_path), @r###" 530 530 a1: nknoxmzm 359a9a02 descr_for_a1 531 531 @origin: nknoxmzm 359a9a02 descr_for_a1 ··· 560 560 trunk2: umznmzko 8f1f14fb descr_for_trunk2 561 561 @origin: umznmzko 8f1f14fb descr_for_trunk2 562 562 "###); 563 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 564 - ○ babc49226c14 descr_for_b b?? b@origin 565 - │ ○ 91e46b4b2653 descr_for_a2 a2 566 - ├─╯ 567 - │ ○ 0424f6dfc1ff descr_for_a1 a1 568 - ├─╯ 569 - ○ 8f1f14fbbf42 descr_for_trunk2 trunk2 570 - │ ○ 061eddbb43ab new_descr_for_b_to_create_conflict b?? 571 - ├─╯ 572 - ○ ff36dc55760e descr_for_trunk1 trunk1 573 - │ @ 230dd059e1b0 563 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 564 + @ 230dd059e1b0 565 + │ ○ babc49226c14 descr_for_b b?? b@origin 566 + │ │ ○ 91e46b4b2653 descr_for_a2 a2 567 + │ ├─╯ 568 + │ │ ○ 0424f6dfc1ff descr_for_a1 a1 569 + │ ├─╯ 570 + │ ○ 8f1f14fbbf42 descr_for_trunk2 trunk2 571 + │ │ ○ 061eddbb43ab new_descr_for_b_to_create_conflict b?? 572 + │ ├─╯ 573 + │ ○ ff36dc55760e descr_for_trunk1 trunk1 574 574 ├─╯ 575 575 ◆ 000000000000 576 - "###); 576 + "#); 577 577 } 578 578 579 579 #[test] ··· 633 633 insta::assert_snapshot!(stderr, @r###" 634 634 bookmark: b@origin [new] tracked 635 635 "###); 636 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 637 - ○ c7d4bdcbc215 descr_for_b b 638 - ○ ff36dc55760e descr_for_trunk1 639 - │ @ 230dd059e1b0 636 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 637 + @ 230dd059e1b0 638 + │ ○ c7d4bdcbc215 descr_for_b b 639 + │ ○ ff36dc55760e descr_for_trunk1 640 640 ├─╯ 641 641 ◆ 000000000000 642 - "###); 642 + "#); 643 643 // ...check what the intermediate state looks like... 644 644 insta::assert_snapshot!(get_bookmark_output(&test_env, &target_jj_repo_path), @r###" 645 645 b: vpupmnsl c7d4bdcb descr_for_b ··· 655 655 bookmark: a1@origin [new] tracked 656 656 bookmark: a2@origin [new] tracked 657 657 "###); 658 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 659 - ○ decaa3966c83 descr_for_a2 a2 660 - │ ○ 359a9a02457d descr_for_a1 a1 661 - ├─╯ 662 - │ ○ c7d4bdcbc215 descr_for_b b 663 - ├─╯ 664 - ○ ff36dc55760e descr_for_trunk1 665 - │ @ 230dd059e1b0 658 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 659 + @ 230dd059e1b0 660 + │ ○ decaa3966c83 descr_for_a2 a2 661 + │ │ ○ 359a9a02457d descr_for_a1 a1 662 + │ ├─╯ 663 + │ │ ○ c7d4bdcbc215 descr_for_b b 664 + │ ├─╯ 665 + │ ○ ff36dc55760e descr_for_trunk1 666 666 ├─╯ 667 667 ◆ 000000000000 668 - "###); 668 + "#); 669 669 // Fetching the same bookmark again 670 670 let (stdout, stderr) = 671 671 test_env.jj_cmd_ok(&target_jj_repo_path, &["git", "fetch", "--branch", "a1"]); ··· 673 673 insta::assert_snapshot!(stderr, @r###" 674 674 Nothing changed. 675 675 "###); 676 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 677 - ○ decaa3966c83 descr_for_a2 a2 678 - │ ○ 359a9a02457d descr_for_a1 a1 679 - ├─╯ 680 - │ ○ c7d4bdcbc215 descr_for_b b 681 - ├─╯ 682 - ○ ff36dc55760e descr_for_trunk1 683 - │ @ 230dd059e1b0 676 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 677 + @ 230dd059e1b0 678 + │ ○ decaa3966c83 descr_for_a2 a2 679 + │ │ ○ 359a9a02457d descr_for_a1 a1 680 + │ ├─╯ 681 + │ │ ○ c7d4bdcbc215 descr_for_b b 682 + │ ├─╯ 683 + │ ○ ff36dc55760e descr_for_trunk1 684 684 ├─╯ 685 685 ◆ 000000000000 686 - "###); 686 + "#); 687 687 688 688 // ==== Change both repos ==== 689 689 // First, change the target repo: ··· 706 706 ); 707 707 708 708 // Our repo before and after fetch of two bookmarks 709 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 710 - ○ 6ebd41dc4f13 new_descr_for_b_to_create_conflict b* 711 - │ ○ decaa3966c83 descr_for_a2 a2 712 - ├─╯ 713 - │ ○ 359a9a02457d descr_for_a1 a1 714 - ├─╯ 715 - ○ ff36dc55760e descr_for_trunk1 716 - │ @ 230dd059e1b0 709 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 710 + @ 230dd059e1b0 711 + │ ○ 6ebd41dc4f13 new_descr_for_b_to_create_conflict b* 712 + │ │ ○ decaa3966c83 descr_for_a2 a2 713 + │ ├─╯ 714 + │ │ ○ 359a9a02457d descr_for_a1 a1 715 + │ ├─╯ 716 + │ ○ ff36dc55760e descr_for_trunk1 717 717 ├─╯ 718 718 ◆ 000000000000 719 - "###); 719 + "#); 720 720 let (stdout, stderr) = test_env.jj_cmd_ok( 721 721 &target_jj_repo_path, 722 722 &["git", "fetch", "--branch", "b", "--branch", "a1"], ··· 727 727 bookmark: b@origin [updated] tracked 728 728 Abandoned 1 commits that are no longer reachable. 729 729 "###); 730 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 731 - ○ 01d115196c39 descr_for_b b?? b@origin 732 - │ ○ 6df2d34cf0da descr_for_a1 a1 733 - ├─╯ 734 - ○ 2bb3ebd2bba3 descr_for_trunk2 735 - │ ○ 6ebd41dc4f13 new_descr_for_b_to_create_conflict b?? 736 - ├─╯ 737 - │ ○ decaa3966c83 descr_for_a2 a2 738 - ├─╯ 739 - ○ ff36dc55760e descr_for_trunk1 740 - │ @ 230dd059e1b0 730 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 731 + @ 230dd059e1b0 732 + │ ○ 01d115196c39 descr_for_b b?? b@origin 733 + │ │ ○ 6df2d34cf0da descr_for_a1 a1 734 + │ ├─╯ 735 + │ ○ 2bb3ebd2bba3 descr_for_trunk2 736 + │ │ ○ 6ebd41dc4f13 new_descr_for_b_to_create_conflict b?? 737 + │ ├─╯ 738 + │ │ ○ decaa3966c83 descr_for_a2 a2 739 + │ ├─╯ 740 + │ ○ ff36dc55760e descr_for_trunk1 741 741 ├─╯ 742 742 ◆ 000000000000 743 - "###); 743 + "#); 744 744 745 745 // We left a2 where it was before, let's see how `jj bookmark list` sees this. 746 746 insta::assert_snapshot!(get_bookmark_output(&test_env, &target_jj_repo_path), @r###" ··· 765 765 bookmark: a2@origin [updated] tracked 766 766 Abandoned 1 commits that are no longer reachable. 767 767 "###); 768 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 769 - ○ 31c7d94b1f29 descr_for_a2 a2 770 - │ ○ 01d115196c39 descr_for_b b?? b@origin 771 - ├─╯ 772 - │ ○ 6df2d34cf0da descr_for_a1 a1 773 - ├─╯ 774 - ○ 2bb3ebd2bba3 descr_for_trunk2 775 - │ ○ 6ebd41dc4f13 new_descr_for_b_to_create_conflict b?? 776 - ├─╯ 777 - ○ ff36dc55760e descr_for_trunk1 778 - │ @ 230dd059e1b0 768 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 769 + @ 230dd059e1b0 770 + │ ○ 31c7d94b1f29 descr_for_a2 a2 771 + │ │ ○ 01d115196c39 descr_for_b b?? b@origin 772 + │ ├─╯ 773 + │ │ ○ 6df2d34cf0da descr_for_a1 a1 774 + │ ├─╯ 775 + │ ○ 2bb3ebd2bba3 descr_for_trunk2 776 + │ │ ○ 6ebd41dc4f13 new_descr_for_b_to_create_conflict b?? 777 + │ ├─╯ 778 + │ ○ ff36dc55760e descr_for_trunk1 779 779 ├─╯ 780 780 ◆ 000000000000 781 - "###); 781 + "#); 782 782 insta::assert_snapshot!(get_bookmark_output(&test_env, &target_jj_repo_path), @r###" 783 783 a1: ypowunwp 6df2d34c descr_for_a1 784 784 @origin: ypowunwp 6df2d34c descr_for_a1 ··· 920 920 bookmark: a1@origin [new] tracked 921 921 bookmark: b@origin [new] tracked 922 922 "###); 923 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 924 - ○ c7d4bdcbc215 descr_for_b b 925 - │ ○ 359a9a02457d descr_for_a1 a1 926 - ├─╯ 927 - ○ ff36dc55760e descr_for_trunk1 928 - │ @ 230dd059e1b0 923 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 924 + @ 230dd059e1b0 925 + │ ○ c7d4bdcbc215 descr_for_b b 926 + │ │ ○ 359a9a02457d descr_for_a1 a1 927 + │ ├─╯ 928 + │ ○ ff36dc55760e descr_for_trunk1 929 929 ├─╯ 930 930 ◆ 000000000000 931 - "###); 931 + "#); 932 932 let (stdout, stderr) = test_env.jj_cmd_ok(&target_jj_repo_path, &["undo"]); 933 933 insta::assert_snapshot!(stdout, @""); 934 934 insta::assert_snapshot!(stderr, @r#" ··· 946 946 insta::assert_snapshot!(stderr, @r###" 947 947 bookmark: b@origin [new] tracked 948 948 "###); 949 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 950 - ○ c7d4bdcbc215 descr_for_b b 951 - ○ ff36dc55760e descr_for_trunk1 952 - │ @ 230dd059e1b0 949 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 950 + @ 230dd059e1b0 951 + │ ○ c7d4bdcbc215 descr_for_b b 952 + │ ○ ff36dc55760e descr_for_trunk1 953 953 ├─╯ 954 954 ◆ 000000000000 955 - "###); 955 + "#); 956 956 } 957 957 958 958 // Compare to `test_git_import_undo` in test_git_import_export ··· 998 998 insta::assert_snapshot!(stderr, @r###" 999 999 bookmark: b@origin [new] tracked 1000 1000 "###); 1001 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 1002 - ○ c7d4bdcbc215 descr_for_b b 1003 - ○ ff36dc55760e descr_for_trunk1 1004 - │ @ 230dd059e1b0 1001 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1002 + @ 230dd059e1b0 1003 + │ ○ c7d4bdcbc215 descr_for_b b 1004 + │ ○ ff36dc55760e descr_for_trunk1 1005 1005 ├─╯ 1006 1006 ◆ 000000000000 1007 - "###); 1007 + "#); 1008 1008 insta::assert_snapshot!(get_bookmark_output(&test_env, &repo_path), @r###" 1009 1009 b: vpupmnsl c7d4bdcb descr_for_b 1010 1010 @origin: vpupmnsl c7d4bdcb descr_for_b ··· 1178 1178 bookmark: b@origin [new] tracked 1179 1179 bookmark: trunk1@origin [new] tracked 1180 1180 "###); 1181 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 1182 - ○ c7d4bdcbc215 descr_for_b b 1183 - │ ○ decaa3966c83 descr_for_a2 a2 1184 - ├─╯ 1185 - │ ○ 359a9a02457d descr_for_a1 a1 1186 - ├─╯ 1187 - ○ ff36dc55760e descr_for_trunk1 trunk1 1188 - │ @ 230dd059e1b0 1181 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 1182 + @ 230dd059e1b0 1183 + │ ○ c7d4bdcbc215 descr_for_b b 1184 + │ │ ○ decaa3966c83 descr_for_a2 a2 1185 + │ ├─╯ 1186 + │ │ ○ 359a9a02457d descr_for_a1 a1 1187 + │ ├─╯ 1188 + │ ○ ff36dc55760e descr_for_trunk1 trunk1 1189 1189 ├─╯ 1190 1190 ◆ 000000000000 1191 - "###); 1191 + "#); 1192 1192 1193 1193 // Remove a2 bookmark in origin 1194 1194 test_env.jj_cmd_ok(&source_git_repo_path, &["bookmark", "forget", "a2"]); ··· 1200 1200 insta::assert_snapshot!(stderr, @r###" 1201 1201 Nothing changed. 1202 1202 "###); 1203 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 1204 - ○ c7d4bdcbc215 descr_for_b b 1205 - │ ○ decaa3966c83 descr_for_a2 a2 1206 - ├─╯ 1207 - │ ○ 359a9a02457d descr_for_a1 a1 1208 - ├─╯ 1209 - ○ ff36dc55760e descr_for_trunk1 trunk1 1210 - │ @ 230dd059e1b0 1203 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 1204 + @ 230dd059e1b0 1205 + │ ○ c7d4bdcbc215 descr_for_b b 1206 + │ │ ○ decaa3966c83 descr_for_a2 a2 1207 + │ ├─╯ 1208 + │ │ ○ 359a9a02457d descr_for_a1 a1 1209 + │ ├─╯ 1210 + │ ○ ff36dc55760e descr_for_trunk1 trunk1 1211 1211 ├─╯ 1212 1212 ◆ 000000000000 1213 - "###); 1213 + "#); 1214 1214 1215 1215 // Fetch bookmarks a2 from origin, and check that it has been removed locally 1216 1216 let (stdout, stderr) = ··· 1220 1220 bookmark: a2@origin [deleted] untracked 1221 1221 Abandoned 1 commits that are no longer reachable. 1222 1222 "###); 1223 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 1224 - ○ c7d4bdcbc215 descr_for_b b 1225 - │ ○ 359a9a02457d descr_for_a1 a1 1226 - ├─╯ 1227 - ○ ff36dc55760e descr_for_trunk1 trunk1 1228 - │ @ 230dd059e1b0 1223 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 1224 + @ 230dd059e1b0 1225 + │ ○ c7d4bdcbc215 descr_for_b b 1226 + │ │ ○ 359a9a02457d descr_for_a1 a1 1227 + │ ├─╯ 1228 + │ ○ ff36dc55760e descr_for_trunk1 trunk1 1229 1229 ├─╯ 1230 1230 ◆ 000000000000 1231 - "###); 1231 + "#); 1232 1232 } 1233 1233 1234 1234 #[test] ··· 1270 1270 bookmark: b@origin [new] tracked 1271 1271 bookmark: trunk1@origin [new] tracked 1272 1272 "###); 1273 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 1274 - ○ c7d4bdcbc215 descr_for_b b 1275 - │ ○ decaa3966c83 descr_for_a2 a2 1276 - ├─╯ 1277 - │ ○ 359a9a02457d descr_for_a1 a1 1278 - ├─╯ 1279 - ○ ff36dc55760e descr_for_trunk1 trunk1 1280 - │ @ 230dd059e1b0 1273 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 1274 + @ 230dd059e1b0 1275 + │ ○ c7d4bdcbc215 descr_for_b b 1276 + │ │ ○ decaa3966c83 descr_for_a2 a2 1277 + │ ├─╯ 1278 + │ │ ○ 359a9a02457d descr_for_a1 a1 1279 + │ ├─╯ 1280 + │ ○ ff36dc55760e descr_for_trunk1 trunk1 1281 1281 ├─╯ 1282 1282 ◆ 000000000000 1283 - "###); 1283 + "#); 1284 1284 1285 1285 // Remove all bookmarks in origin. 1286 1286 test_env.jj_cmd_ok(&source_git_repo_path, &["bookmark", "forget", "glob:*"]); ··· 1301 1301 Abandoned 1 commits that are no longer reachable. 1302 1302 Warning: No branch matching `master` found on any specified/configured remote 1303 1303 "###); 1304 - insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###" 1305 - ○ c7d4bdcbc215 descr_for_b b 1306 - │ ○ decaa3966c83 descr_for_a2 a2 1307 - ├─╯ 1308 - ○ ff36dc55760e descr_for_trunk1 1309 - │ @ 230dd059e1b0 1304 + insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r#" 1305 + @ 230dd059e1b0 1306 + │ ○ c7d4bdcbc215 descr_for_b b 1307 + │ │ ○ decaa3966c83 descr_for_a2 a2 1308 + │ ├─╯ 1309 + │ ○ ff36dc55760e descr_for_trunk1 1310 1310 ├─╯ 1311 1311 ◆ 000000000000 1312 - "###); 1312 + "#); 1313 1313 } 1314 1314 1315 1315 #[test] ··· 1368 1368 // Fetch using git.auto_local_bookmark = false 1369 1369 test_env.add_config("git.auto-local-bookmark = false"); 1370 1370 test_env.jj_cmd_ok(&repo_path, &["git", "fetch", "--remote=origin"]); 1371 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 1372 - ◆ 9f01a0e04879 message feature1 feature2@origin 1373 - │ @ 230dd059e1b0 1371 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1372 + @ 230dd059e1b0 1373 + │ ◆ 9f01a0e04879 message feature1 feature2@origin 1374 1374 ├─╯ 1375 1375 ◆ 000000000000 1376 - "###); 1376 + "#); 1377 1377 insta::assert_snapshot!(get_bookmark_output(&test_env, &repo_path), @r###" 1378 1378 feature1: mzyxwzks 9f01a0e0 message 1379 1379 @origin: mzyxwzks 9f01a0e0 message
+6 -6
cli/tests/test_git_push.rs
··· 1151 1151 Delete bookmark bookmark1 from d13ecdbda2a2 1152 1152 "#); 1153 1153 let stdout = test_env.jj_cmd_success(&workspace_root, &["log", "-rall()"]); 1154 - insta::assert_snapshot!(stdout, @r###" 1155 - ○ rlzusymt test.user@example.com 2001-02-03 08:05:10 bookmark2 8476341e 1156 - │ (empty) description 2 1154 + insta::assert_snapshot!(stdout, @r#" 1155 + @ yqosqzyt test.user@example.com 2001-02-03 08:05:13 5b36783c 1156 + │ (empty) (no description set) 1157 + │ ○ rlzusymt test.user@example.com 2001-02-03 08:05:10 bookmark2 8476341e 1158 + ├─╯ (empty) description 2 1157 1159 │ ○ xtvrqkyv test.user@example.com 2001-02-03 08:05:08 d13ecdbd 1158 1160 ├─╯ (empty) description 1 1159 - │ @ yqosqzyt test.user@example.com 2001-02-03 08:05:13 5b36783c 1160 - ├─╯ (empty) (no description set) 1161 1161 ◆ zzzzzzzz root() 00000000 1162 - "###); 1162 + "#); 1163 1163 let (stdout, stderr) = test_env.jj_cmd_ok(&workspace_root, &["git", "push", "--deleted"]); 1164 1164 insta::assert_snapshot!(stdout, @""); 1165 1165 insta::assert_snapshot!(stderr, @r###"
+4 -4
cli/tests/test_log_command.rs
··· 776 776 &["describe", "-m", "description 2", "--at-operation", "@-"], 777 777 ); 778 778 let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["log", "-T", template]); 779 - insta::assert_snapshot!(stdout, @r###" 780 - ○ description 2 !divergence! 781 - │ @ description 1 !divergence! 779 + insta::assert_snapshot!(stdout, @r#" 780 + @ description 1 !divergence! 781 + │ ○ description 2 !divergence! 782 782 ├─╯ 783 783 784 - "###); 784 + "#); 785 785 insta::assert_snapshot!(stderr, @r###" 786 786 Concurrent modification detected, resolving automatically. 787 787 "###);
+8 -8
cli/tests/test_next_prev_commands.rs
··· 1125 1125 test_env.jj_cmd_ok(&repo_path, &["commit", "-m", "left-2"]); 1126 1126 1127 1127 test_env.jj_cmd_ok(&repo_path, &["edit", "description(right-wc)"]); 1128 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 1129 - ○ vruxwmqvtpmx left-2 1130 - ○ yqosqzytrlsw left-1 1131 - ○ royxmykxtrkr left-wc 1132 - │ ○ zsuskulnrvyr right-2 1133 - │ ○ kkmpptxzrspx right-1 1134 - │ @ rlvkpnrzqnoo right-wc 1128 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1129 + ○ zsuskulnrvyr right-2 1130 + ○ kkmpptxzrspx right-1 1131 + @ rlvkpnrzqnoo right-wc 1132 + │ ○ vruxwmqvtpmx left-2 1133 + │ ○ yqosqzytrlsw left-1 1134 + │ ○ royxmykxtrkr left-wc 1135 1135 ├─╯ 1136 1136 ○ qpvuntsmwlqt base 1137 1137 ◆ zzzzzzzzzzzz 1138 - "###); 1138 + "#); 1139 1139 1140 1140 test_env.jj_cmd_ok(&repo_path, &["next", "2"]); 1141 1141 insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
+4 -4
cli/tests/test_operations.rs
··· 769 769 // The repo should no longer be corrupt. 770 770 let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["log"]); 771 771 insta::assert_snapshot!(stdout, @r#" 772 - ○ mzvwutvl?? test.user@example.com 2001-02-03 08:05:15 dc2c6d52 773 - │ (empty) 4.1 774 - │ @ mzvwutvl?? test.user@example.com 2001-02-03 08:05:12 6d868f04 775 - ├─╯ (empty) 4 772 + @ mzvwutvl?? test.user@example.com 2001-02-03 08:05:12 6d868f04 773 + │ (empty) 4 774 + │ ○ mzvwutvl?? test.user@example.com 2001-02-03 08:05:15 dc2c6d52 775 + ├─╯ (empty) 4.1 776 776 ○ zsuskuln test.user@example.com 2001-02-03 08:05:10 git_head() f652c321 777 777 │ (empty) (no description set) 778 778 ◆ zzzzzzzz root() 00000000
+5 -5
cli/tests/test_parallelize_command.rs
··· 435 435 &workspace_path, 436 436 &["parallelize", "description(0)", "description(1)"], 437 437 ); 438 - insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r###" 439 - ○ 6270540ee067 1 parents: 440 - │ @ 97d7522f40e8 2 parents: 0 441 - │ ○ 745bea8029c1 0 parents: 438 + insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" 439 + @ 97d7522f40e8 2 parents: 0 440 + ○ 745bea8029c1 0 parents: 441 + │ ○ 6270540ee067 1 parents: 442 442 ├─╯ 443 443 ◆ 000000000000 parents: 444 - "###); 444 + "#); 445 445 } 446 446 447 447 #[test]
+21 -21
cli/tests/test_rebase_command.rs
··· 561 561 Parent commit : kmkuslsw d1bfda8c f | f 562 562 Added 0 files, modified 0 files, removed 2 files 563 563 "###); 564 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 565 - ○ h: g 566 - ○ g: f 567 - │ ○ e: d 568 - │ ○ d: i 569 - │ @ i: f 564 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 565 + ○ e: d 566 + ○ d: i 567 + @ i: f 568 + │ ○ h: g 569 + │ ○ g: f 570 570 ├─╯ 571 571 ○ f: c a 572 572 ├─╮ ··· 575 575 ├─╯ 576 576 ○ a 577 577 578 - "###); 578 + "#); 579 579 } 580 580 581 581 #[test] ··· 837 837 Parent commit : rlvkpnrz 2443ea76 a | a 838 838 Added 0 files, modified 0 files, removed 2 files 839 839 "#); 840 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 840 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 841 841 @ d: a 842 842 │ ○ c: a b 843 843 ╭─┤ ··· 845 845 ├─╯ 846 846 ○ a 847 847 848 - "###); 848 + "#); 849 849 850 850 // Same test as above, but with multiple commits per argument 851 851 test_env.jj_cmd_ok(&repo_path, &["undo"]); ··· 865 865 Parent commit : rlvkpnrz 2443ea76 a | a 866 866 Added 0 files, modified 0 files, removed 2 files 867 867 "#); 868 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 868 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 869 869 @ d: a 870 870 │ ○ c: a b 871 871 ╭─┤ ··· 873 873 ├─╯ 874 874 ○ a 875 875 876 - "###); 876 + "#); 877 877 } 878 878 879 879 #[test] ··· 1539 1539 Parent commit : nkmrtpmo 0d7e4ce9 e | e 1540 1540 Added 0 files, modified 0 files, removed 3 files 1541 1541 "###); 1542 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 1543 - ○ d: b1 b3 1542 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 1543 + ○ c: b2 b4 1544 1544 ├─╮ 1545 - │ │ ○ c: b2 b4 1546 - │ │ ├─╮ 1547 - │ │ │ ○ b4: f 1548 - │ │ ○ │ b2: f 1549 - │ │ ├─╯ 1550 - │ │ @ f: e 1551 - │ │ ○ e: b1 b3 1545 + │ ○ b4: f 1546 + ○ │ b2: f 1547 + ├─╯ 1548 + @ f: e 1549 + ○ e: b1 b3 1550 + ├─╮ 1551 + │ │ ○ d: b1 b3 1552 1552 ╭─┬─╯ 1553 1553 │ ○ b3: a 1554 1554 ○ │ b1: a 1555 1555 ├─╯ 1556 1556 ○ a 1557 1557 1558 - "###); 1558 + "#); 1559 1559 test_env.jj_cmd_ok(&repo_path, &["op", "restore", &setup_opid]); 1560 1560 1561 1561 // Rebase a subgraph with four commits after one of the commits itself.
+5 -5
cli/tests/test_squash_command.rs
··· 607 607 insta::assert_snapshot!(stderr, @r###" 608 608 Rebased 1 descendant commits 609 609 "###); 610 - insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###" 611 - ○ d2a587ae205d c 612 - ○ a53394306362 b 613 - │ @ e0dac715116f d 610 + insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r#" 611 + @ e0dac715116f d 612 + │ ○ d2a587ae205d c 613 + │ ○ a53394306362 b 614 614 ├─╯ 615 615 ○ b7b767179c44 a 616 616 ◆ 000000000000 (empty) 617 - "###); 617 + "#); 618 618 // The selected change from the source has been applied 619 619 let stdout = test_env.jj_cmd_success(&repo_path, &["file", "show", "file1", "-r", "b"]); 620 620 insta::assert_snapshot!(stdout, @r###"
+70 -70
cli/tests/test_workspaces.rs
··· 48 48 49 49 // Can see the working-copy commit in each workspace in the log output. The "@" 50 50 // node in the graph indicates the current workspace's working-copy commit. 51 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 52 - ○ 5ed2222c28e2 second@ 53 - │ @ 8183d0fcaa4c default@ 51 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 52 + @ 8183d0fcaa4c default@ 53 + │ ○ 5ed2222c28e2 second@ 54 54 ├─╯ 55 55 ○ 751b12b7b981 56 56 ◆ 000000000000 57 - "###); 57 + "); 58 58 insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" 59 59 @ 5ed2222c28e2 second@ 60 60 │ ○ 8183d0fcaa4c default@ ··· 145 145 ); 146 146 147 147 // The new workspace's working-copy commit shares all parents with the old one. 148 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 149 - ○ 7013a493bd09 second@ 148 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 149 + @ 35e47bff781e default@ 150 150 ├─╮ 151 - │ │ @ 35e47bff781e default@ 151 + │ │ ○ 7013a493bd09 second@ 152 152 ╭─┬─╯ 153 153 │ ○ 444b77e99d43 154 154 ○ │ 1694f2ddf8ec 155 155 ├─╯ 156 156 ◆ 000000000000 157 - "###); 157 + "); 158 158 } 159 159 160 160 /// Test that --ignore-working-copy is respected ··· 282 282 283 283 // Can see the working-copy commit in each workspace in the log output. The "@" 284 284 // node in the graph indicates the current workspace's working-copy commit. 285 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 286 - ○ e374e74aa0c8 second@ 287 - │ @ dadeedb493e8 default@ 288 - │ ○ c420244c6398 285 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 286 + @ dadeedb493e8 default@ 287 + ○ c420244c6398 288 + │ ○ e374e74aa0c8 second@ 289 289 ├─╯ 290 290 ○ f6097c2f7cac 291 291 ◆ 000000000000 292 - "###); 292 + "); 293 293 insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" 294 294 @ e374e74aa0c8 second@ 295 295 │ ○ dadeedb493e8 default@ ··· 352 352 Added 3 files, modified 0 files, removed 0 files 353 353 "###); 354 354 355 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 356 - ○ f4fa64f40944 merge@ 357 - ├─┬─╮ 358 - │ │ ○ f6097c2f7cac 359 - │ ○ │ 544cd61f2d26 360 - │ ├─╯ 361 - ○ │ 6c843d62ca29 362 - ├─╯ 363 - │ @ 5b36783cd11c default@ 355 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 356 + @ 5b36783cd11c default@ 357 + │ ○ f4fa64f40944 merge@ 358 + │ ├─┬─╮ 359 + │ │ │ ○ f6097c2f7cac 360 + ├─────╯ 361 + │ │ ○ 544cd61f2d26 362 + ├───╯ 363 + │ ○ 6c843d62ca29 364 364 ├─╯ 365 365 ◆ 000000000000 366 - "###); 366 + "); 367 367 } 368 368 369 369 #[test] ··· 471 471 472 472 test_env.jj_cmd_ok(&main_path, &["workspace", "add", "../secondary"]); 473 473 474 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 475 - ○ 3224de8ae048 secondary@ 476 - │ @ 06b57f44a3ca default@ 474 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 475 + @ 06b57f44a3ca default@ 476 + │ ○ 3224de8ae048 secondary@ 477 477 ├─╯ 478 478 ○ 506f4ec3c2c6 479 479 ◆ 000000000000 480 - "###); 480 + "); 481 481 482 482 // Make changes in both working copies 483 483 std::fs::write(main_path.join("file"), "changed in main\n").unwrap(); ··· 526 526 Updated working copy to fresh commit e82cd4ee8faa 527 527 "###); 528 528 insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), 529 - @r###" 530 - × a28c85ce128b (divergent) 531 - │ ○ a58c9a9b19ce default@ 529 + @r" 530 + @ e82cd4ee8faa secondary@ (divergent) 531 + │ × a28c85ce128b (divergent) 532 532 ├─╯ 533 - │ @ e82cd4ee8faa secondary@ (divergent) 533 + │ ○ a58c9a9b19ce default@ 534 534 ├─╯ 535 535 ○ d41244767d45 536 536 ◆ 000000000000 537 - "###); 537 + "); 538 538 // The stale working copy should have been resolved by the previous command 539 539 let stdout = get_log_output(&test_env, &secondary_path); 540 540 assert!(!stdout.starts_with("The working copy is stale")); 541 - insta::assert_snapshot!(stdout, @r###" 542 - × a28c85ce128b (divergent) 543 - │ ○ a58c9a9b19ce default@ 541 + insta::assert_snapshot!(stdout, @r" 542 + @ e82cd4ee8faa secondary@ (divergent) 543 + │ × a28c85ce128b (divergent) 544 544 ├─╯ 545 - │ @ e82cd4ee8faa secondary@ (divergent) 545 + │ ○ a58c9a9b19ce default@ 546 546 ├─╯ 547 547 ○ d41244767d45 548 548 ◆ 000000000000 549 - "###); 549 + "); 550 550 } 551 551 552 552 /// Test a clean working copy that gets rewritten from another workspace ··· 562 562 563 563 test_env.jj_cmd_ok(&main_path, &["workspace", "add", "../secondary"]); 564 564 565 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 566 - ○ 3224de8ae048 secondary@ 567 - │ @ 06b57f44a3ca default@ 565 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 566 + @ 06b57f44a3ca default@ 567 + │ ○ 3224de8ae048 secondary@ 568 568 ├─╯ 569 569 ○ 506f4ec3c2c6 570 570 ◆ 000000000000 571 - "###); 571 + "); 572 572 573 573 // Rewrite the check-out commit in one workspace. 574 574 std::fs::write(main_path.join("file"), "changed in main\n").unwrap(); ··· 604 604 Updated working copy to fresh commit e82cd4ee8faa 605 605 "###); 606 606 insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), 607 - @r###" 608 - ○ a58c9a9b19ce default@ 609 - │ @ e82cd4ee8faa secondary@ 607 + @r" 608 + @ e82cd4ee8faa secondary@ 609 + │ ○ a58c9a9b19ce default@ 610 610 ├─╯ 611 611 ○ d41244767d45 612 612 ◆ 000000000000 613 - "###); 613 + "); 614 614 } 615 615 616 616 /// Test a clean working copy that gets rewritten from another workspace ··· 628 628 629 629 test_env.jj_cmd_ok(&main_path, &["workspace", "add", "../secondary"]); 630 630 631 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 632 - ○ 3224de8ae048 secondary@ 633 - │ @ 06b57f44a3ca default@ 631 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 632 + @ 06b57f44a3ca default@ 633 + │ ○ 3224de8ae048 secondary@ 634 634 ├─╯ 635 635 ○ 506f4ec3c2c6 636 636 ◆ 000000000000 637 - "###); 637 + "); 638 638 639 639 // Rewrite the check-out commit in one workspace. 640 640 std::fs::write(main_path.join("file"), "changed in main\n").unwrap(); ··· 669 669 "###); 670 670 671 671 insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), 672 - @r###" 673 - ○ a58c9a9b19ce default@ 674 - │ @ e82cd4ee8faa secondary@ 672 + @r" 673 + @ e82cd4ee8faa secondary@ 674 + │ ○ a58c9a9b19ce default@ 675 675 ├─╯ 676 676 ○ d41244767d45 677 677 ◆ 000000000000 678 - "###); 678 + "); 679 679 } 680 680 681 681 #[test_case(false; "manual")] ··· 750 750 test_env.jj_cmd_ok(&main_path, &["util", "gc", "--expire=now"]); 751 751 752 752 insta::allow_duplicates! { 753 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 754 - ○ 96b31dafdc41 secondary@ 755 - │ @ 6c051bd1ccd5 default@ 753 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 754 + @ 6c051bd1ccd5 default@ 755 + │ ○ 96b31dafdc41 secondary@ 756 756 ├─╯ 757 757 ○ 7c5b25a4fc8f 758 758 ◆ 000000000000 759 - "###); 759 + "); 760 760 } 761 761 762 762 if automatic { ··· 793 793 } 794 794 795 795 insta::allow_duplicates! { 796 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 797 - ○ 15df8cb57d3f secondary@ 798 - ○ 96b31dafdc41 799 - │ @ 6c051bd1ccd5 default@ 796 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 797 + @ 6c051bd1ccd5 default@ 798 + │ ○ 15df8cb57d3f secondary@ 799 + │ ○ 96b31dafdc41 800 800 ├─╯ 801 801 ○ 7c5b25a4fc8f 802 802 ◆ 000000000000 803 - "###); 803 + "); 804 804 } 805 805 806 806 // The sparse patterns should remain ··· 1037 1037 second: uuqppmxq 57d63245 (empty) (no description set) 1038 1038 third: uuqppmxq 57d63245 (empty) (no description set) 1039 1039 "###); 1040 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 1041 - ○ 57d63245a308 fourth@ second@ third@ 1042 - │ @ 4e8f9d2be039 default@ 1040 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 1041 + @ 4e8f9d2be039 default@ 1042 + │ ○ 57d63245a308 fourth@ second@ third@ 1043 1043 ├─╯ 1044 1044 ◆ 000000000000 1045 - "###); 1045 + "); 1046 1046 1047 1047 // delete the default workspace (should not abandon commit since not empty) 1048 1048 test_env.jj_cmd_success(&main_path, &["workspace", "forget", "default"]); ··· 1247 1247 "###); 1248 1248 1249 1249 // Can see the working-copy commit in each workspace in the log output. 1250 - insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r###" 1251 - ○ 57d63245a308 third@ 1252 - │ @ 230dd059e1b0 default@ 1250 + insta::assert_snapshot!(get_log_output(&test_env, &main_path), @r" 1251 + @ 230dd059e1b0 default@ 1252 + │ ○ 57d63245a308 third@ 1253 1253 ├─╯ 1254 1254 ◆ 000000000000 1255 - "###); 1255 + "); 1256 1256 insta::assert_snapshot!(get_log_output(&test_env, &secondary_path), @r###" 1257 1257 @ 57d63245a308 third@ 1258 1258 │ ○ 230dd059e1b0 default@
+314 -5
lib/src/graph.rs
··· 121 121 /// branches will be visited. At merge point, the second (or the last) ancestor 122 122 /// branch will be visited first. This is practically [the same as Git][Git]. 123 123 /// 124 - /// The branch containing the first commit in the input iterator will be emitted 125 - /// first. It is often the working-copy ancestor branch. The other head branches 126 - /// won't be enqueued eagerly, and will be emitted as late as possible. 124 + /// If no branches are prioritized, the branch containing the first commit in 125 + /// the input iterator will be emitted first. It is often the working-copy 126 + /// ancestor branch. The other head branches won't be enqueued eagerly, and will 127 + /// be emitted as late as possible. 127 128 /// 128 129 /// [Git]: https://github.blog/2022-08-30-gits-database-internals-ii-commit-history-queries/#topological-sorting 129 130 #[derive(Clone, Debug)] ··· 133 134 nodes: HashMap<N, TopoGroupedGraphNode<N>>, 134 135 /// Stack of graph nodes to be emitted. 135 136 emittable_ids: Vec<N>, 136 - /// List of new head nodes found while processing unpopulated nodes. 137 + /// List of new head nodes found while processing unpopulated nodes, or 138 + /// prioritized branch nodes added by caller. 137 139 new_head_ids: VecDeque<N>, 138 140 /// Set of nodes which may be ancestors of `new_head_ids`. 139 141 blocked_ids: HashSet<N>, ··· 171 173 new_head_ids: VecDeque::new(), 172 174 blocked_ids: HashSet::new(), 173 175 } 176 + } 177 + 178 + /// Makes the branch containing the specified node be emitted earlier than 179 + /// the others. 180 + /// 181 + /// The `id` usually points to a head node, but this isn't a requirement. 182 + /// If the specified node isn't a head, all preceding nodes will be queued. 183 + /// 184 + /// The specified node must exist in the input iterator. If it didn't, the 185 + /// iterator would panic. 186 + pub fn prioritize_branch(&mut self, id: N) { 187 + // Mark existence of unpopulated node 188 + self.nodes.entry(id.clone()).or_default(); 189 + // Push to non-emitting list so the prioritized heads wouldn't be 190 + // interleaved 191 + self.new_head_ids.push_back(id); 174 192 } 175 193 176 194 fn populate_one(&mut self) -> Result<Option<()>, E> { ··· 278 296 } 279 297 let Some(edges) = current_node.edges.take() else { 280 298 // Not yet populated 281 - self.populate_one()?.expect("parent node should exist"); 299 + self.populate_one()? 300 + .expect("parent or prioritized node should exist"); 282 301 continue; 283 302 }; 284 303 // The second (or the last) parent will be visited first ··· 1530 1549 A 1531 1550 1532 1551 "###); 1552 + } 1553 + 1554 + #[test] 1555 + fn test_topo_grouped_prioritized_branches_trivial_fork() { 1556 + // The same setup as test_topo_grouped_trivial_fork() 1557 + let graph = [ 1558 + ('E', vec![direct('B')]), 1559 + ('D', vec![direct('A')]), 1560 + ('C', vec![direct('B')]), 1561 + ('B', vec![direct('A')]), 1562 + ('A', vec![]), 1563 + ] 1564 + .map(Ok); 1565 + insta::assert_snapshot!(format_graph(graph.iter().cloned()), @r" 1566 + E direct(B) 1567 + 1568 + │ D direct(A) 1569 + │ │ 1570 + │ │ C direct(B) 1571 + ├───╯ 1572 + B │ direct(A) 1573 + ├─╯ 1574 + A 1575 + "); 1576 + 1577 + // Emit the branch C first 1578 + let mut iter = topo_grouped(graph.iter().cloned()); 1579 + iter.prioritize_branch('C'); 1580 + insta::assert_snapshot!(format_graph(iter), @r" 1581 + C direct(B) 1582 + 1583 + │ E direct(B) 1584 + ├─╯ 1585 + B direct(A) 1586 + 1587 + │ D direct(A) 1588 + ├─╯ 1589 + A 1590 + "); 1591 + 1592 + // Emit the branch D first 1593 + let mut iter = topo_grouped(graph.iter().cloned()); 1594 + iter.prioritize_branch('D'); 1595 + insta::assert_snapshot!(format_graph(iter), @r" 1596 + D direct(A) 1597 + 1598 + │ E direct(B) 1599 + │ │ 1600 + │ │ C direct(B) 1601 + │ ├─╯ 1602 + │ B direct(A) 1603 + ├─╯ 1604 + A 1605 + "); 1606 + 1607 + // Emit the branch C first, then D. E is emitted earlier than D because 1608 + // E belongs to the branch C compared to the branch D. 1609 + let mut iter = topo_grouped(graph.iter().cloned()); 1610 + iter.prioritize_branch('C'); 1611 + iter.prioritize_branch('D'); 1612 + insta::assert_snapshot!(format_graph(iter), @r" 1613 + C direct(B) 1614 + 1615 + │ E direct(B) 1616 + ├─╯ 1617 + B direct(A) 1618 + 1619 + │ D direct(A) 1620 + ├─╯ 1621 + A 1622 + "); 1623 + 1624 + // Non-head node can be prioritized 1625 + let mut iter = topo_grouped(graph.iter().cloned()); 1626 + iter.prioritize_branch('B'); 1627 + insta::assert_snapshot!(format_graph(iter), @r" 1628 + E direct(B) 1629 + 1630 + │ C direct(B) 1631 + ├─╯ 1632 + B direct(A) 1633 + 1634 + │ D direct(A) 1635 + ├─╯ 1636 + A 1637 + "); 1638 + 1639 + // Root node can be prioritized 1640 + let mut iter = topo_grouped(graph.iter().cloned()); 1641 + iter.prioritize_branch('A'); 1642 + insta::assert_snapshot!(format_graph(iter), @r" 1643 + D direct(A) 1644 + 1645 + │ E direct(B) 1646 + │ │ 1647 + │ │ C direct(B) 1648 + │ ├─╯ 1649 + │ B direct(A) 1650 + ├─╯ 1651 + A 1652 + "); 1653 + } 1654 + 1655 + #[test] 1656 + fn test_topo_grouped_prioritized_branches_fork_multiple_heads() { 1657 + // The same setup as test_topo_grouped_fork_multiple_heads() 1658 + let graph = [ 1659 + ('I', vec![direct('E')]), 1660 + ('H', vec![direct('C')]), 1661 + ('G', vec![direct('A')]), 1662 + ('F', vec![direct('E')]), 1663 + ('E', vec![direct('C')]), 1664 + ('D', vec![direct('C')]), 1665 + ('C', vec![direct('A')]), 1666 + ('B', vec![direct('A')]), 1667 + ('A', vec![]), 1668 + ] 1669 + .map(Ok); 1670 + insta::assert_snapshot!(format_graph(graph.iter().cloned()), @r" 1671 + I direct(E) 1672 + 1673 + │ H direct(C) 1674 + │ │ 1675 + │ │ G direct(A) 1676 + │ │ │ 1677 + │ │ │ F direct(E) 1678 + ├─────╯ 1679 + E │ │ direct(C) 1680 + ├─╯ │ 1681 + │ D │ direct(C) 1682 + ├─╯ │ 1683 + C │ direct(A) 1684 + ├───╯ 1685 + │ B direct(A) 1686 + ├─╯ 1687 + A 1688 + "); 1689 + 1690 + // Emit B, G, then remainders 1691 + let mut iter = topo_grouped(graph.iter().cloned()); 1692 + iter.prioritize_branch('B'); 1693 + iter.prioritize_branch('G'); 1694 + insta::assert_snapshot!(format_graph(iter), @r" 1695 + B direct(A) 1696 + 1697 + │ G direct(A) 1698 + ├─╯ 1699 + │ I direct(E) 1700 + │ │ 1701 + │ │ F direct(E) 1702 + │ ├─╯ 1703 + │ E direct(C) 1704 + │ │ 1705 + │ │ H direct(C) 1706 + │ ├─╯ 1707 + │ │ D direct(C) 1708 + │ ├─╯ 1709 + │ C direct(A) 1710 + ├─╯ 1711 + A 1712 + "); 1713 + 1714 + // Emit D, H, then descendants of C. The order of B and G is not 1715 + // respected because G can be found earlier through C->A->G. At this 1716 + // point, B is not populated yet, so A is blocked only by {G}. This is 1717 + // a limitation of the current node reordering logic. 1718 + let mut iter = topo_grouped(graph.iter().cloned()); 1719 + iter.prioritize_branch('D'); 1720 + iter.prioritize_branch('H'); 1721 + iter.prioritize_branch('B'); 1722 + iter.prioritize_branch('G'); 1723 + insta::assert_snapshot!(format_graph(iter), @r" 1724 + D direct(C) 1725 + 1726 + │ H direct(C) 1727 + ├─╯ 1728 + │ I direct(E) 1729 + │ │ 1730 + │ │ F direct(E) 1731 + │ ├─╯ 1732 + │ E direct(C) 1733 + ├─╯ 1734 + C direct(A) 1735 + 1736 + │ G direct(A) 1737 + ├─╯ 1738 + │ B direct(A) 1739 + ├─╯ 1740 + A 1741 + "); 1742 + } 1743 + 1744 + #[test] 1745 + fn test_topo_grouped_prioritized_branches_fork_parallel() { 1746 + // The same setup as test_topo_grouped_fork_parallel() 1747 + let graph = [ 1748 + // Pull all sub graphs in reverse order: 1749 + ('I', vec![direct('A')]), 1750 + ('H', vec![direct('C')]), 1751 + ('G', vec![direct('E')]), 1752 + // Orphan sub graph G,F-E: 1753 + ('F', vec![direct('E')]), 1754 + ('E', vec![missing('Y')]), 1755 + // Orphan sub graph H,D-C: 1756 + ('D', vec![direct('C')]), 1757 + ('C', vec![missing('X')]), 1758 + // Orphan sub graph I,B-A: 1759 + ('B', vec![direct('A')]), 1760 + ('A', vec![]), 1761 + ] 1762 + .map(Ok); 1763 + insta::assert_snapshot!(format_graph(graph.iter().cloned()), @r" 1764 + I direct(A) 1765 + 1766 + │ H direct(C) 1767 + │ │ 1768 + │ │ G direct(E) 1769 + │ │ │ 1770 + │ │ │ F direct(E) 1771 + │ │ ├─╯ 1772 + │ │ E missing(Y) 1773 + │ │ │ 1774 + │ │ ~ 1775 + │ │ 1776 + │ │ D direct(C) 1777 + │ ├─╯ 1778 + │ C missing(X) 1779 + │ │ 1780 + │ ~ 1781 + 1782 + │ B direct(A) 1783 + ├─╯ 1784 + A 1785 + "); 1786 + 1787 + // Emit the sub graph G first 1788 + let mut iter = topo_grouped(graph.iter().cloned()); 1789 + iter.prioritize_branch('G'); 1790 + insta::assert_snapshot!(format_graph(iter), @r" 1791 + G direct(E) 1792 + 1793 + │ F direct(E) 1794 + ├─╯ 1795 + E missing(Y) 1796 + 1797 + ~ 1798 + 1799 + I direct(A) 1800 + 1801 + │ B direct(A) 1802 + ├─╯ 1803 + A 1804 + 1805 + H direct(C) 1806 + 1807 + │ D direct(C) 1808 + ├─╯ 1809 + C missing(X) 1810 + 1811 + ~ 1812 + "); 1813 + 1814 + // Emit sub graphs in reverse order by selecting roots 1815 + let mut iter = topo_grouped(graph.iter().cloned()); 1816 + iter.prioritize_branch('E'); 1817 + iter.prioritize_branch('C'); 1818 + iter.prioritize_branch('A'); 1819 + insta::assert_snapshot!(format_graph(iter), @r" 1820 + G direct(E) 1821 + 1822 + │ F direct(E) 1823 + ├─╯ 1824 + E missing(Y) 1825 + 1826 + ~ 1827 + 1828 + H direct(C) 1829 + 1830 + │ D direct(C) 1831 + ├─╯ 1832 + C missing(X) 1833 + 1834 + ~ 1835 + 1836 + I direct(A) 1837 + 1838 + │ B direct(A) 1839 + ├─╯ 1840 + A 1841 + "); 1533 1842 } 1534 1843 1535 1844 #[test]