@@ -84,23 +84,23 @@ fn test_advance_branches_enabled(make_commit: CommitFn) {
84
84
// Run jj commit, which will advance the branch pointing to @-.
85
85
make_commit ( & test_env, & workspace_path, "first" ) ;
86
86
insta:: allow_duplicates! {
87
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
87
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
88
88
@ branches{} desc:
89
- ○ branches{test_branch} desc: first
89
+ ◌ branches{test_branch} desc: first
90
90
◆ branches{} desc:
91
- "### ) ;
91
+ "# ) ;
92
92
}
93
93
94
94
// Now disable advance branches and commit again. The branch shouldn't move.
95
95
set_advance_branches ( & test_env, false ) ;
96
96
make_commit ( & test_env, & workspace_path, "second" ) ;
97
97
insta:: allow_duplicates! {
98
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
98
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
99
99
@ branches{} desc:
100
- ○ branches{} desc: second
101
- ○ branches{test_branch} desc: first
100
+ ◌ branches{} desc: second
101
+ ◌ branches{test_branch} desc: first
102
102
◆ branches{} desc:
103
- "### ) ;
103
+ "# ) ;
104
104
}
105
105
}
106
106
@@ -125,24 +125,24 @@ fn test_advance_branches_at_minus(make_commit: CommitFn) {
125
125
126
126
make_commit ( & test_env, & workspace_path, "first" ) ;
127
127
insta:: allow_duplicates! {
128
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
128
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
129
129
@ branches{} desc:
130
- ○ branches{test_branch} desc: first
130
+ ◌ branches{test_branch} desc: first
131
131
◆ branches{} desc:
132
- "### ) ;
132
+ "# ) ;
133
133
}
134
134
135
135
// Create a second branch pointing to @. On the next commit, only the first
136
136
// branch, which points to @-, will advance.
137
137
test_env. jj_cmd_ok ( & workspace_path, & [ "branch" , "create" , "test_branch2" ] ) ;
138
138
make_commit ( & test_env, & workspace_path, "second" ) ;
139
139
insta:: allow_duplicates! {
140
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
140
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
141
141
@ branches{} desc:
142
- ○ branches{test_branch test_branch2} desc: second
143
- ○ branches{} desc: first
142
+ ◌ branches{test_branch test_branch2} desc: second
143
+ ◌ branches{} desc: first
144
144
◆ branches{} desc:
145
- "### ) ;
145
+ "# ) ;
146
146
}
147
147
}
148
148
@@ -172,11 +172,11 @@ fn test_advance_branches_overrides(make_commit: CommitFn) {
172
172
// Commit will not advance the branch since advance-branches is disabled.
173
173
make_commit ( & test_env, & workspace_path, "first" ) ;
174
174
insta:: allow_duplicates! {
175
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
175
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
176
176
@ branches{} desc:
177
- ○ branches{} desc: first
177
+ ◌ branches{} desc: first
178
178
◆ branches{test_branch} desc:
179
- "### ) ;
179
+ "# ) ;
180
180
}
181
181
182
182
// Now enable advance branches for "test_branch", move the branch, and commit
@@ -191,20 +191,20 @@ fn test_advance_branches_overrides(make_commit: CommitFn) {
191
191
& [ "branch" , "set" , "test_branch" , "-r" , "@-" ] ,
192
192
) ;
193
193
insta:: allow_duplicates! {
194
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
194
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
195
195
@ branches{} desc:
196
- ○ branches{test_branch} desc: first
196
+ ◌ branches{test_branch} desc: first
197
197
◆ branches{} desc:
198
- "### ) ;
198
+ "# ) ;
199
199
}
200
200
make_commit ( & test_env, & workspace_path, "second" ) ;
201
201
insta:: allow_duplicates! {
202
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
202
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
203
203
@ branches{} desc:
204
- ○ branches{test_branch} desc: second
205
- ○ branches{} desc: first
204
+ ◌ branches{test_branch} desc: second
205
+ ◌ branches{} desc: first
206
206
◆ branches{} desc:
207
- "### ) ;
207
+ "# ) ;
208
208
}
209
209
210
210
// Now disable advance branches for "test_branch" and "second_branch", which
@@ -217,13 +217,13 @@ fn test_advance_branches_overrides(make_commit: CommitFn) {
217
217
) ;
218
218
make_commit ( & test_env, & workspace_path, "third" ) ;
219
219
insta:: allow_duplicates! {
220
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
220
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
221
221
@ branches{} desc:
222
- ○ branches{} desc: third
223
- ○ branches{test_branch} desc: second
224
- ○ branches{} desc: first
222
+ ◌ branches{} desc: third
223
+ ◌ branches{test_branch} desc: second
224
+ ◌ branches{} desc: first
225
225
◆ branches{} desc:
226
- "### ) ;
226
+ "# ) ;
227
227
}
228
228
229
229
// If we create a new branch at @- and move test_branch there as well. When
@@ -237,24 +237,24 @@ fn test_advance_branches_overrides(make_commit: CommitFn) {
237
237
& [ "branch" , "set" , "test_branch" , "-r" , "@-" ] ,
238
238
) ;
239
239
insta:: allow_duplicates! {
240
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
240
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
241
241
@ branches{} desc:
242
- ○ branches{second_branch test_branch} desc: third
243
- ○ branches{} desc: second
244
- ○ branches{} desc: first
242
+ ◌ branches{second_branch test_branch} desc: third
243
+ ◌ branches{} desc: second
244
+ ◌ branches{} desc: first
245
245
◆ branches{} desc:
246
- "### ) ;
246
+ "# ) ;
247
247
}
248
248
make_commit ( & test_env, & workspace_path, "fourth" ) ;
249
249
insta:: allow_duplicates! {
250
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
250
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
251
251
@ branches{} desc:
252
- ○ branches{second_branch} desc: fourth
253
- ○ branches{test_branch} desc: third
254
- ○ branches{} desc: second
255
- ○ branches{} desc: first
252
+ ◌ branches{second_branch} desc: fourth
253
+ ◌ branches{test_branch} desc: third
254
+ ◌ branches{} desc: second
255
+ ◌ branches{} desc: first
256
256
◆ branches{} desc:
257
- "### ) ;
257
+ "# ) ;
258
258
}
259
259
}
260
260
@@ -287,11 +287,11 @@ fn test_advance_branches_multiple_branches(make_commit: CommitFn) {
287
287
// Both branches are eligible and both will advance.
288
288
make_commit ( & test_env, & workspace_path, "first" ) ;
289
289
insta:: allow_duplicates! {
290
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
290
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
291
291
@ branches{} desc:
292
- ○ branches{first_branch second_branch} desc: first
292
+ ◌ branches{first_branch second_branch} desc: first
293
293
◆ branches{} desc:
294
- "### ) ;
294
+ "# ) ;
295
295
}
296
296
}
297
297
@@ -319,23 +319,23 @@ fn test_new_advance_branches_interior() {
319
319
& workspace_path,
320
320
& [ "branch" , "create" , "-r" , "@---" , "test_branch" ] ,
321
321
) ;
322
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
322
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
323
323
@ branches{} desc:
324
- ○ branches{} desc: third
325
- ○ branches{} desc: second
326
- ○ branches{test_branch} desc: first
324
+ ◌ branches{} desc: third
325
+ ◌ branches{} desc: second
326
+ ◌ branches{test_branch} desc: first
327
327
◆ branches{} desc:
328
- "### ) ;
328
+ "# ) ;
329
329
330
330
test_env. jj_cmd_ok ( & workspace_path, & [ "new" , "-r" , "@--" ] ) ;
331
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
331
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
332
332
@ branches{} desc:
333
- │ ○ branches{} desc: third
333
+ │ ◌ branches{} desc: third
334
334
├─╯
335
- ○ branches{test_branch} desc: second
336
- ○ branches{} desc: first
335
+ ◌ branches{test_branch} desc: second
336
+ ◌ branches{} desc: first
337
337
◆ branches{} desc:
338
- "### ) ;
338
+ "# ) ;
339
339
}
340
340
341
341
// If the `--before` flag is passed to `jj new`, branches are not advanced.
@@ -361,22 +361,22 @@ fn test_new_advance_branches_before() {
361
361
& workspace_path,
362
362
& [ "branch" , "create" , "-r" , "@---" , "test_branch" ] ,
363
363
) ;
364
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
364
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
365
365
@ branches{} desc:
366
- ○ branches{} desc: third
367
- ○ branches{} desc: second
368
- ○ branches{test_branch} desc: first
366
+ ◌ branches{} desc: third
367
+ ◌ branches{} desc: second
368
+ ◌ branches{test_branch} desc: first
369
369
◆ branches{} desc:
370
- "### ) ;
370
+ "# ) ;
371
371
372
372
test_env. jj_cmd_ok ( & workspace_path, & [ "new" , "--before" , "@-" ] ) ;
373
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
374
- ○ branches{} desc: third
373
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
374
+ ◌ branches{} desc: third
375
375
@ branches{} desc:
376
- ○ branches{} desc: second
377
- ○ branches{test_branch} desc: first
376
+ ◌ branches{} desc: second
377
+ ◌ branches{test_branch} desc: first
378
378
◆ branches{} desc:
379
- "### ) ;
379
+ "# ) ;
380
380
}
381
381
382
382
// If the `--after` flag is passed to `jj new`, branches are not advanced.
@@ -400,11 +400,11 @@ fn test_new_advance_branches_after() {
400
400
401
401
test_env. jj_cmd_ok ( & workspace_path, & [ "describe" , "-m" , "first" ] ) ;
402
402
test_env. jj_cmd_ok ( & workspace_path, & [ "new" , "--after" , "@" ] ) ;
403
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
403
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
404
404
@ branches{} desc:
405
- ○ branches{} desc: first
405
+ ◌ branches{} desc: first
406
406
◆ branches{test_branch} desc:
407
- "### ) ;
407
+ "# ) ;
408
408
}
409
409
410
410
#[ test]
@@ -423,26 +423,26 @@ fn test_new_advance_branches_merge_children() {
423
423
) ;
424
424
425
425
// Check the initial state of the repo.
426
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
426
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
427
427
@ branches{} desc: 2
428
- │ ○ branches{} desc: 1
428
+ │ ◌ branches{} desc: 1
429
429
├─╯
430
- ○ branches{test_branch} desc: 0
430
+ ◌ branches{test_branch} desc: 0
431
431
◆ branches{} desc:
432
- "### ) ;
432
+ "# ) ;
433
433
434
434
// The branch won't advance because `jj new` had multiple targets.
435
435
test_env. jj_cmd_ok (
436
436
& workspace_path,
437
437
& [ "new" , "description(1)" , "description(2)" ] ,
438
438
) ;
439
- insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r### "
439
+ insta:: assert_snapshot!( get_log_output_with_branches( & test_env, & workspace_path) , @r#"
440
440
@ branches{} desc:
441
441
├─╮
442
- │ ○ branches{} desc: 2
443
- ○ │ branches{} desc: 1
442
+ │ ◌ branches{} desc: 2
443
+ ◌ │ branches{} desc: 1
444
444
├─╯
445
- ○ branches{test_branch} desc: 0
445
+ ◌ branches{test_branch} desc: 0
446
446
◆ branches{} desc:
447
- "### ) ;
447
+ "# ) ;
448
448
}
0 commit comments