just playing with tangled

cli: evolog: show associated operations alongside commits

The output cannot be templated as of now. Maybe we can add a template type for
Commit + Operation?

Closes #963

+2 -1
CHANGELOG.md
··· 67 67 * Templates can now do arithmetic on integers with the `+`, `-`, `*`, `/`, and `%` 68 68 infix operators. 69 69 70 - * Evolution history is now stored in the operation log. 70 + * Evolution history is now stored in the operation log. `jj evolog` can show 71 + associated operations for commits created by new jj. 71 72 72 73 ### Fixed bugs 73 74
+21 -2
cli/src/commands/evolog.rs
··· 12 12 // See the License for the specific language governing permissions and 13 13 // limitations under the License. 14 14 15 + use std::io; 15 16 use std::slice; 16 17 17 18 use clap_complete::ArgValueCandidates; ··· 122 123 .labeled(["log", "commit", "node"]); 123 124 } 124 125 126 + // TODO: better styling and --template argument support 127 + let op_summary_template = workspace_command 128 + .operation_summary_template() 129 + .labeled(["log"]); 130 + 125 131 ui.request_pager(); 126 132 let mut formatter = ui.stdout_formatter(); 127 133 let formatter = formatter.as_mut(); ··· 152 158 let within_graph = 153 159 with_content_format.sub_width(graph.width(entry.commit.id(), &edges)); 154 160 within_graph.write(ui.new_formatter(&mut buffer).as_mut(), |formatter| { 155 - template.format(&entry.commit, formatter) 161 + template.format(&entry.commit, formatter)?; 162 + if let Some(op) = &entry.operation { 163 + write!(formatter.labeled("separator"), "--")?; 164 + write!(formatter, " operation ")?; 165 + op_summary_template.format(op, formatter)?; 166 + writeln!(formatter)?; 167 + } 168 + io::Result::Ok(()) 156 169 })?; 157 170 if !buffer.ends_with(b"\n") { 158 171 buffer.push(b'\n'); ··· 188 201 for entry in evolution_entries { 189 202 let entry = entry?; 190 203 with_content_format.write(formatter, |formatter| { 191 - template.format(&entry.commit, formatter) 204 + template.format(&entry.commit, formatter)?; 205 + if let Some(op) = &entry.operation { 206 + write!(formatter, "-- operation ")?; 207 + op_summary_template.format(op, formatter)?; 208 + writeln!(formatter)?; 209 + } 210 + io::Result::Ok(()) 192 211 })?; 193 212 if let Some(renderer) = &diff_renderer { 194 213 let predecessors: Vec<_> = entry.predecessors().try_collect()?;
+17 -4
cli/tests/test_absorb_command.rs
··· 128 128 "); 129 129 insta::assert_snapshot!(get_evolog(&work_dir, "description(1)"), @r" 130 130 ○ kkmpptxz 5810eb0f 1 131 - ├─╮ 131 + ├─╮ -- operation 5876e0f3d35d (2001-02-03 08:05:14) absorb changes into 1 commits 132 132 │ ○ yqosqzyt hidden 39b42898 (no description set) 133 + │ │ -- operation a2c449e239df (2001-02-03 08:05:14) snapshot working copy 133 134 │ ○ yqosqzyt hidden 977269ac (empty) (no description set) 135 + │ -- operation 4a9cb11bbdd5 (2001-02-03 08:05:13) absorb changes into 2 commits 134 136 ○ kkmpptxz hidden bd7d4016 1 135 - ├─╮ 137 + ├─╮ -- operation 4a9cb11bbdd5 (2001-02-03 08:05:13) absorb changes into 2 commits 136 138 │ ○ mzvwutvl hidden 0b307741 (no description set) 139 + │ │ -- operation 51ebffcb116e (2001-02-03 08:05:13) snapshot working copy 137 140 │ ○ mzvwutvl hidden f2709b4e (empty) (no description set) 141 + │ -- operation b92e661fdac1 (2001-02-03 08:05:11) new empty commit 138 142 ○ kkmpptxz hidden 1553c5e8 1 143 + │ -- operation 35926ea345b0 (2001-02-03 08:05:10) snapshot working copy 139 144 ○ kkmpptxz hidden eb943711 (empty) 1 145 + -- operation da1318a72167 (2001-02-03 08:05:09) new empty commit 140 146 [EOF] 141 147 "); 142 148 insta::assert_snapshot!(get_evolog(&work_dir, "description(2)"), @r" 143 149 ○ zsuskuln dd109863 2 144 - ├─╮ 150 + ├─╮ -- operation fc078244f126 (2001-02-03 08:05:15) absorb changes into 1 commits 145 151 │ ○ vruxwmqv hidden 761492a8 (no description set) 152 + │ │ -- operation b15694dee324 (2001-02-03 08:05:15) snapshot working copy 146 153 │ ○ vruxwmqv hidden 48c7d8fa (empty) (no description set) 154 + │ -- operation 5876e0f3d35d (2001-02-03 08:05:14) absorb changes into 1 commits 147 155 ○ zsuskuln hidden 8edd60a2 2 156 + │ -- operation 5876e0f3d35d (2001-02-03 08:05:14) absorb changes into 1 commits 148 157 ○ zsuskuln hidden 95568809 2 149 - ├─╮ 158 + ├─╮ -- operation 4a9cb11bbdd5 (2001-02-03 08:05:13) absorb changes into 2 commits 150 159 │ ○ mzvwutvl hidden 0b307741 (no description set) 160 + │ │ -- operation 51ebffcb116e (2001-02-03 08:05:13) snapshot working copy 151 161 │ ○ mzvwutvl hidden f2709b4e (empty) (no description set) 162 + │ -- operation b92e661fdac1 (2001-02-03 08:05:11) new empty commit 152 163 ○ zsuskuln hidden 36fad385 2 164 + │ -- operation ab92cd8883ff (2001-02-03 08:05:11) snapshot working copy 153 165 ○ zsuskuln hidden 561fbce9 (empty) 2 166 + -- operation 9339ac427cfc (2001-02-03 08:05:10) new empty commit 154 167 [EOF] 155 168 "); 156 169 }
+6
cli/tests/test_commit_template.rs
··· 563 563 insta::assert_snapshot!(output, @r" 564 564 @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 556daeb7 565 565 │ description 1 566 + │ -- operation fec5a045b947 (2001-02-03 08:05:08) describe commit d0c049cd993a8d3a2e69ba6df98788e264ea9fa1 566 567 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 d0c049cd 567 568 │ (no description set) 569 + │ -- operation 911e64a1b666 (2001-02-03 08:05:08) snapshot working copy 568 570 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 569 571 (empty) (no description set) 572 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 570 573 [EOF] 571 574 "); 572 575 ··· 575 578 insta::assert_snapshot!(output, @r" 576 579 @ qpvuntsm?? test.user@example.com 2001-02-03 08:05:08 556daeb7 577 580 │ description 1 581 + │ -- operation fec5a045b947 (2001-02-03 08:05:08) describe commit d0c049cd993a8d3a2e69ba6df98788e264ea9fa1 578 582 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 d0c049cd 579 583 │ (no description set) 584 + │ -- operation 911e64a1b666 (2001-02-03 08:05:08) snapshot working copy 580 585 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 581 586 (empty) (no description set) 587 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 582 588 [EOF] 583 589 "); 584 590 }
+71
cli/tests/test_evolog_command.rs
··· 34 34 insta::assert_snapshot!(output, @r" 35 35 @ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 33c10ace 36 36 │ my description 37 + │ -- operation 3499115d3831 (2001-02-03 08:05:10) snapshot working copy 37 38 × rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 7f56b2a0 conflict 38 39 │ my description 40 + │ -- operation eb87ec366530 (2001-02-03 08:05:09) rebase commit 51e08f95160c897080d035d330aead3ee6ed5588 39 41 ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 51e08f95 40 42 │ my description 43 + │ -- operation 18a971ce330a (2001-02-03 08:05:09) snapshot working copy 41 44 ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 b955b72e 42 45 (empty) my description 46 + -- operation e0f8e58b3800 (2001-02-03 08:05:08) new empty commit 43 47 [EOF] 44 48 "); 45 49 ··· 48 52 insta::assert_snapshot!(output, @r" 49 53 @ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 33c10ace 50 54 │ my description 55 + │ -- operation 3499115d3831 (2001-02-03 08:05:10) snapshot working copy 51 56 × rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 7f56b2a0 conflict 52 57 │ my description 58 + │ -- operation eb87ec366530 (2001-02-03 08:05:09) rebase commit 51e08f95160c897080d035d330aead3ee6ed5588 53 59 ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 51e08f95 54 60 │ my description 61 + │ -- operation 18a971ce330a (2001-02-03 08:05:09) snapshot working copy 55 62 ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 b955b72e 56 63 (empty) my description 64 + -- operation e0f8e58b3800 (2001-02-03 08:05:08) new empty commit 57 65 [EOF] 58 66 "); 59 67 ··· 63 71 insta::assert_snapshot!(output, @r" 64 72 @ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 33c10ace 65 73 │ my description 74 + │ -- operation 3499115d3831 (2001-02-03 08:05:10) snapshot working copy 66 75 │ Resolved conflict in file1: 67 76 │ 1 : <<<<<<< Conflict 1 of 1 68 77 │ 2 : %%%%%%% Changes from base to side #1 ··· 73 82 │ 7 1: >>>>>>> Conflict 1 of 1 endsresolved 74 83 × rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 7f56b2a0 conflict 75 84 │ my description 85 + │ -- operation eb87ec366530 (2001-02-03 08:05:09) rebase commit 51e08f95160c897080d035d330aead3ee6ed5588 76 86 ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 51e08f95 77 87 │ my description 88 + │ -- operation 18a971ce330a (2001-02-03 08:05:09) snapshot working copy 78 89 │ Modified regular file file1: 79 90 │ 1 1: foo 80 91 │ 2: bar ··· 82 93 │ 1: foo 83 94 ○ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 b955b72e 84 95 (empty) my description 96 + -- operation e0f8e58b3800 (2001-02-03 08:05:08) new empty commit 85 97 [EOF] 86 98 "); 87 99 ··· 90 102 insta::assert_snapshot!(output, @r" 91 103 @ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 33c10ace 92 104 │ my description 105 + │ -- operation 3499115d3831 (2001-02-03 08:05:10) snapshot working copy 93 106 × rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 7f56b2a0 conflict 94 107 │ my description 108 + │ -- operation eb87ec366530 (2001-02-03 08:05:09) rebase commit 51e08f95160c897080d035d330aead3ee6ed5588 95 109 [EOF] 96 110 "); 97 111 ··· 100 114 insta::assert_snapshot!(output, @r" 101 115 rlvkpnrz test.user@example.com 2001-02-03 08:05:10 33c10ace 102 116 my description 117 + -- operation 3499115d3831 (2001-02-03 08:05:10) snapshot working copy 103 118 rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 7f56b2a0 conflict 104 119 my description 120 + -- operation eb87ec366530 (2001-02-03 08:05:09) rebase commit 51e08f95160c897080d035d330aead3ee6ed5588 105 121 rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 51e08f95 106 122 my description 123 + -- operation 18a971ce330a (2001-02-03 08:05:09) snapshot working copy 107 124 rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 b955b72e 108 125 (empty) my description 126 + -- operation e0f8e58b3800 (2001-02-03 08:05:08) new empty commit 109 127 [EOF] 110 128 "); 111 129 ··· 114 132 insta::assert_snapshot!(output, @r" 115 133 rlvkpnrz test.user@example.com 2001-02-03 08:05:10 33c10ace 116 134 my description 135 + -- operation 3499115d3831 (2001-02-03 08:05:10) snapshot working copy 117 136 diff --git a/file1 b/file1 118 137 index 0000000000..2ab19ae607 100644 119 138 --- a/file1 ··· 129 148 +resolved 130 149 rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 7f56b2a0 conflict 131 150 my description 151 + -- operation eb87ec366530 (2001-02-03 08:05:09) rebase commit 51e08f95160c897080d035d330aead3ee6ed5588 132 152 rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 51e08f95 133 153 my description 154 + -- operation 18a971ce330a (2001-02-03 08:05:09) snapshot working copy 134 155 diff --git a/file1 b/file1 135 156 index 257cc5642c..3bd1f0e297 100644 136 157 --- a/file1 ··· 147 168 +foo 148 169 rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 b955b72e 149 170 (empty) my description 171 + -- operation e0f8e58b3800 (2001-02-03 08:05:08) new empty commit 150 172 [EOF] 151 173 "); 152 174 } ··· 172 194 insta::assert_snapshot!(output, @r" 173 195 $ rlvkpnrz test.user@example.com 2001-02-03 08:05:10 33c10ace 174 196 │ my description 197 + │ -- operation 3622beb20303 (2001-02-03 08:05:10) snapshot working copy 175 198 ┝ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 7f56b2a0 conflict 176 199 │ my description 200 + │ -- operation eb87ec366530 (2001-02-03 08:05:09) rebase commit 51e08f95160c897080d035d330aead3ee6ed5588 177 201 ┝ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:09 51e08f95 178 202 │ my description 203 + │ -- operation 18a971ce330a (2001-02-03 08:05:09) snapshot working copy 179 204 ┝ rlvkpnrz hidden test.user@example.com 2001-02-03 08:05:08 b955b72e 180 205 (empty) my description 206 + -- operation e0f8e58b3800 (2001-02-03 08:05:08) new empty commit 181 207 [EOF] 182 208 "); 183 209 } ··· 202 228 insta::assert_snapshot!(render(&["evolog"], 40, false), @r" 203 229 @ qpvuntsm test.user@example.com 2001-02-03 08:05:08 68a50538 204 230 │ (empty) first 231 + │ -- operation 75545f7ff2df (2001-02-03 08:05:08) describe commit e8849ae12c709f2321908879bc724fdb2ab8a781 205 232 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 206 233 (empty) (no description set) 234 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 207 235 [EOF] 208 236 "); 209 237 insta::assert_snapshot!(render(&["evolog"], 40, true), @r" 210 238 @ qpvuntsm test.user@example.com 211 239 │ 2001-02-03 08:05:08 68a50538 212 240 │ (empty) first 241 + │ -- operation 75545f7ff2df (2001-02-03 242 + │ 08:05:08) describe commit 243 + │ e8849ae12c709f2321908879bc724fdb2ab8a781 213 244 ○ qpvuntsm hidden test.user@example.com 214 245 2001-02-03 08:05:07 e8849ae1 215 246 (empty) (no description set) 247 + -- operation 8f47435a3990 (2001-02-03 248 + 08:05:07) add workspace 'default' 216 249 [EOF] 217 250 "); 218 251 insta::assert_snapshot!(render(&["evolog", "--no-graph"], 40, false), @r" 219 252 qpvuntsm test.user@example.com 2001-02-03 08:05:08 68a50538 220 253 (empty) first 254 + -- operation 75545f7ff2df (2001-02-03 08:05:08) describe commit e8849ae12c709f2321908879bc724fdb2ab8a781 221 255 qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 222 256 (empty) (no description set) 257 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 223 258 [EOF] 224 259 "); 225 260 insta::assert_snapshot!(render(&["evolog", "--no-graph"], 40, true), @r" 226 261 qpvuntsm test.user@example.com 227 262 2001-02-03 08:05:08 68a50538 228 263 (empty) first 264 + -- operation 75545f7ff2df (2001-02-03 265 + 08:05:08) describe commit 266 + e8849ae12c709f2321908879bc724fdb2ab8a781 229 267 qpvuntsm hidden test.user@example.com 230 268 2001-02-03 08:05:07 e8849ae1 231 269 (empty) (no description set) 270 + -- operation 8f47435a3990 (2001-02-03 271 + 08:05:07) add workspace 'default' 232 272 [EOF] 233 273 "); 234 274 } ··· 277 317 insta::assert_snapshot!(output, @r" 278 318 ○ qpvuntsm test.user@example.com 2001-02-03 08:05:15 5f3281c6 279 319 ├─┬─╮ squashed 3 320 + │ │ │ -- operation 838e6d867fda (2001-02-03 08:05:15) squash commits into 5ec0619af5cb4f7707a556a71a6f96af0bc294d2 280 321 │ │ ○ vruxwmqv hidden test.user@example.com 2001-02-03 08:05:15 770795d0 281 322 │ │ │ fifth 323 + │ │ │ -- operation 1d38c000b52d (2001-02-03 08:05:15) snapshot working copy 282 324 │ │ │ Added regular file file5: 283 325 │ │ │ 1: foo5 284 326 │ │ ○ vruxwmqv hidden test.user@example.com 2001-02-03 08:05:14 2e0123d1 285 327 │ │ (empty) fifth 328 + │ │ -- operation fc852ed87801 (2001-02-03 08:05:14) new empty commit 286 329 │ ○ yqosqzyt hidden test.user@example.com 2001-02-03 08:05:14 ea8161b6 287 330 │ │ fourth 331 + │ │ -- operation 3b09d55dfa6e (2001-02-03 08:05:14) snapshot working copy 288 332 │ │ Added regular file file4: 289 333 │ │ 1: foo4 290 334 │ ○ yqosqzyt hidden test.user@example.com 2001-02-03 08:05:13 1de5fdb6 291 335 │ (empty) fourth 336 + │ -- operation 9404a551035a (2001-02-03 08:05:13) new empty commit 292 337 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:12 5ec0619a 293 338 ├─╮ squashed 2 339 + │ │ -- operation fa9796d12627 (2001-02-03 08:05:12) squash commits into 690858846504af0e42fde980fdacf9851559ebb8 294 340 │ │ Removed regular file file2: 295 341 │ │ 1 : foo2 296 342 │ │ Removed regular file file3: 297 343 │ │ 1 : foo3 298 344 │ ○ zsuskuln hidden test.user@example.com 2001-02-03 08:05:12 cce957f1 299 345 │ │ third 346 + │ │ -- operation de96267cd621 (2001-02-03 08:05:12) snapshot working copy 300 347 │ │ Modified regular file file1: 301 348 │ │ 1 1: foo 302 349 │ │ 2 2: bar ··· 307 354 │ │ 1: foo3 308 355 │ ○ zsuskuln hidden test.user@example.com 2001-02-03 08:05:11 3a2a4253 309 356 │ │ (empty) third 357 + │ │ -- operation 4611a6121e8a (2001-02-03 08:05:11) describe commit ebec10f449ad7ab92c7293efab5e3db2d8e9fea1 310 358 │ ○ zsuskuln hidden test.user@example.com 2001-02-03 08:05:10 ebec10f4 311 359 │ (empty) (no description set) 360 + │ -- operation 65c81703100d (2001-02-03 08:05:10) squash commits into 5878cbe03cdf599c9353e5a1a52a01f4c5e0e0fa 312 361 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:10 69085884 313 362 ├─╮ squashed 1 363 + │ │ -- operation 65c81703100d (2001-02-03 08:05:10) squash commits into 5878cbe03cdf599c9353e5a1a52a01f4c5e0e0fa 314 364 │ ○ kkmpptxz hidden test.user@example.com 2001-02-03 08:05:10 a3759c9d 315 365 │ │ second 366 + │ │ -- operation a7b202f56742 (2001-02-03 08:05:10) snapshot working copy 316 367 │ │ Modified regular file file1: 317 368 │ │ 1 1: foo 318 369 │ │ 2: bar 319 370 │ ○ kkmpptxz hidden test.user@example.com 2001-02-03 08:05:09 a5b2f625 320 371 │ (empty) second 372 + │ -- operation 26f649a0cdfa (2001-02-03 08:05:09) new empty commit 321 373 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:09 5878cbe0 322 374 │ first 375 + │ -- operation af15122a5868 (2001-02-03 08:05:09) snapshot working copy 323 376 │ Added regular file file1: 324 377 │ 1: foo 325 378 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 68a50538 326 379 │ (empty) first 380 + │ -- operation 75545f7ff2df (2001-02-03 08:05:08) describe commit e8849ae12c709f2321908879bc724fdb2ab8a781 327 381 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 328 382 (empty) (no description set) 383 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 329 384 [EOF] 330 385 "); 331 386 } ··· 382 437 insta::assert_snapshot!(output, @r" 383 438 qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 384 439 (empty) (no description set) 440 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 385 441 qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 b86e28cd 386 442 (empty) a 443 + -- operation ab34d1de4875 (2001-02-03 08:05:08) describe commit e8849ae12c709f2321908879bc724fdb2ab8a781 387 444 qpvuntsm hidden test.user@example.com 2001-02-03 08:05:09 9f43967b 388 445 (empty) b 446 + -- operation 3851e9877d51 (2001-02-03 08:05:09) describe commit b86e28cd6862624ad77e1aaf31e34b2c7545bebd 389 447 qpvuntsm test.user@example.com 2001-02-03 08:05:10 b28cda4b 390 448 (empty) c 449 + -- operation 5f4c7b5cb177 (2001-02-03 08:05:10) describe commit 9f43967b1cdbce4ab322cb7b4636fc0362c38373 391 450 [EOF] 392 451 "); 393 452 ··· 395 454 insta::assert_snapshot!(output, @r" 396 455 qpvuntsm hidden test.user@example.com 2001-02-03 08:05:09 9f43967b 397 456 (empty) b 457 + -- operation 3851e9877d51 (2001-02-03 08:05:09) describe commit b86e28cd6862624ad77e1aaf31e34b2c7545bebd 398 458 qpvuntsm test.user@example.com 2001-02-03 08:05:10 b28cda4b 399 459 (empty) c 460 + -- operation 5f4c7b5cb177 (2001-02-03 08:05:10) describe commit 9f43967b1cdbce4ab322cb7b4636fc0362c38373 400 461 [EOF] 401 462 "); 402 463 } ··· 431 492 insta::assert_snapshot!(output, @r" 432 493 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 433 494 │ (empty) (no description set) 495 + │ -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 434 496 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 b86e28cd 435 497 │ (empty) a 498 + │ -- operation ab34d1de4875 (2001-02-03 08:05:08) describe commit e8849ae12c709f2321908879bc724fdb2ab8a781 436 499 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:09 9f43967b 437 500 │ (empty) b 501 + │ -- operation 3851e9877d51 (2001-02-03 08:05:09) describe commit b86e28cd6862624ad77e1aaf31e34b2c7545bebd 438 502 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:10 b28cda4b 439 503 │ (empty) c 504 + │ -- operation 5f4c7b5cb177 (2001-02-03 08:05:10) describe commit 9f43967b1cdbce4ab322cb7b4636fc0362c38373 440 505 │ ○ mzvwutvl hidden test.user@example.com 2001-02-03 08:05:11 6a4ff8aa 441 506 ├─╯ (empty) d 507 + │ -- operation 774accf68695 (2001-02-03 08:05:11) new empty commit 442 508 │ ○ royxmykx hidden test.user@example.com 2001-02-03 08:05:12 7dea2d1d 443 509 ├─╯ (empty) e 510 + │ -- operation 4c2c3012e2c3 (2001-02-03 08:05:12) new empty commit 444 511 ○ qpvuntsm test.user@example.com 2001-02-03 08:05:13 78fdd026 445 512 (empty) c+d+e 513 + -- operation 2c736b66cd16 (2001-02-03 08:05:13) squash commits into b28cda4b118fc50495ca34a24f030abc078d032e 446 514 [EOF] 447 515 "); 448 516 ··· 450 518 insta::assert_snapshot!(output, @r" 451 519 ○ mzvwutvl hidden test.user@example.com 2001-02-03 08:05:11 6a4ff8aa 452 520 │ (empty) d 521 + │ -- operation 774accf68695 (2001-02-03 08:05:11) new empty commit 453 522 │ ○ royxmykx hidden test.user@example.com 2001-02-03 08:05:12 7dea2d1d 454 523 ├─╯ (empty) e 524 + │ -- operation 4c2c3012e2c3 (2001-02-03 08:05:12) new empty commit 455 525 ○ qpvuntsm test.user@example.com 2001-02-03 08:05:13 78fdd026 456 526 (empty) c+d+e 527 + -- operation 2c736b66cd16 (2001-02-03 08:05:13) squash commits into b28cda4b118fc50495ca34a24f030abc078d032e 457 528 [EOF] 458 529 "); 459 530 }
+14
cli/tests/test_split_command.rs
··· 393 393 insta::assert_snapshot!(evolog_1, @r" 394 394 ○ qpvuntsm test.user@example.com 2001-02-03 08:05:12 74306e35 395 395 │ Add file1 396 + │ -- operation 994b490f285d (2001-02-03 08:05:12) split commit 1d2499e72cefc8a2b87ebb47569140857b96189f 396 397 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 1d2499e7 397 398 │ Add file1 & file2 399 + │ -- operation adf4f33386c9 (2001-02-03 08:05:08) commit f5700f8ef89e290e4e90ae6adc0908707e0d8c85 398 400 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 f5700f8e 399 401 │ (no description set) 402 + │ -- operation 78ead2155fcc (2001-02-03 08:05:08) snapshot working copy 400 403 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 401 404 (empty) (no description set) 405 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 402 406 [EOF] 403 407 "); 404 408 ··· 408 412 insta::assert_snapshot!(evolog_2, @r" 409 413 ○ royxmykx test.user@example.com 2001-02-03 08:05:12 0a37745e 410 414 │ Add file2 415 + │ -- operation 994b490f285d (2001-02-03 08:05:12) split commit 1d2499e72cefc8a2b87ebb47569140857b96189f 411 416 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 1d2499e7 412 417 │ Add file1 & file2 418 + │ -- operation adf4f33386c9 (2001-02-03 08:05:08) commit f5700f8ef89e290e4e90ae6adc0908707e0d8c85 413 419 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 f5700f8e 414 420 │ (no description set) 421 + │ -- operation 78ead2155fcc (2001-02-03 08:05:08) snapshot working copy 415 422 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 416 423 (empty) (no description set) 424 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 417 425 [EOF] 418 426 "); 419 427 } ··· 547 555 insta::assert_snapshot!(evolog_1, @r#" 548 556 ○ qpvuntsm test.user@example.com 2001-02-03 08:05:09 7bcd474c 549 557 │ TESTED=TODO 558 + │ -- operation 2b21c33e1596 (2001-02-03 08:05:09) split commit f5700f8ef89e290e4e90ae6adc0908707e0d8c85 550 559 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 f5700f8e 551 560 │ (no description set) 561 + │ -- operation 1663cd1cc445 (2001-02-03 08:05:08) snapshot working copy 552 562 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 553 563 (empty) (no description set) 564 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 554 565 [EOF] 555 566 ------- stderr ------- 556 567 Warning: Deprecated config: ui.default-description is updated to template-aliases.default_commit_description = '"\n\nTESTED=TODO\n"' ··· 563 574 insta::assert_snapshot!(evolog_2, @r#" 564 575 @ kkmpptxz test.user@example.com 2001-02-03 08:05:09 431886f6 565 576 │ (no description set) 577 + │ -- operation 2b21c33e1596 (2001-02-03 08:05:09) split commit f5700f8ef89e290e4e90ae6adc0908707e0d8c85 566 578 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:08 f5700f8e 567 579 │ (no description set) 580 + │ -- operation 1663cd1cc445 (2001-02-03 08:05:08) snapshot working copy 568 581 ○ qpvuntsm hidden test.user@example.com 2001-02-03 08:05:07 e8849ae1 569 582 (empty) (no description set) 583 + -- operation 8f47435a3990 (2001-02-03 08:05:07) add workspace 'default' 570 584 [EOF] 571 585 ------- stderr ------- 572 586 Warning: Deprecated config: ui.default-description is updated to template-aliases.default_commit_description = '"\n\nTESTED=TODO\n"'
+5 -1
cli/tests/test_squash_command.rs
··· 1117 1117 ]); 1118 1118 insta::assert_snapshot!(output, @r" 1119 1119 @ 6dfc239e2ba3 d 1120 - ├─╮ 1120 + ├─╮ -- operation b7394e553191 (2001-02-03 08:05:13) squash commits into fdb92bc249a019337e7fa3f6c6fa74a762dd20b5 1121 1121 ○ │ fdb92bc249a0 d 1122 + │ │ -- operation 2a8d2002ac46 (2001-02-03 08:05:12) snapshot working copy 1122 1123 ○ │ af709ccc1ca9 d 1124 + │ -- operation 5aefb1c40e7d (2001-02-03 08:05:11) new empty commit 1123 1125 ○ b1a17f79a1a5 b 1126 + │ -- operation 853cf887ea1b (2001-02-03 08:05:10) snapshot working copy 1124 1127 ○ d8b7d57239ca b 1128 + -- operation a7f388a190d3 (2001-02-03 08:05:09) new empty commit 1125 1129 [EOF] 1126 1130 "); 1127 1131
+13 -1
cli/tests/test_workspaces.rs
··· 886 886 } 887 887 888 888 let output = secondary_dir.run_jj(["evolog"]); 889 - insta::allow_duplicates! { 889 + if automatic { 890 890 insta::assert_snapshot!(output, @r" 891 891 @ kmkuslsw test.user@example.com 2001-02-03 08:05:18 secondary@ 18851b39 892 892 │ RECOVERY COMMIT FROM `jj workspace update-stale` 893 + │ -- operation 90fc02cc90ab (2001-02-03 08:05:18) snapshot working copy 893 894 ○ kmkuslsw hidden test.user@example.com 2001-02-03 08:05:18 866928d1 894 895 (empty) RECOVERY COMMIT FROM `jj workspace update-stale` 896 + -- operation 83f707034db1 (2001-02-03 08:05:18) recovery commit 897 + [EOF] 898 + "); 899 + } else { 900 + insta::assert_snapshot!(output, @r" 901 + @ kmkuslsw test.user@example.com 2001-02-03 08:05:18 secondary@ 18851b39 902 + │ RECOVERY COMMIT FROM `jj workspace update-stale` 903 + │ -- operation 0f876590219e (2001-02-03 08:05:18) snapshot working copy 904 + ○ kmkuslsw hidden test.user@example.com 2001-02-03 08:05:18 866928d1 905 + (empty) RECOVERY COMMIT FROM `jj workspace update-stale` 906 + -- operation 83f707034db1 (2001-02-03 08:05:18) recovery commit 895 907 [EOF] 896 908 "); 897 909 }