mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 07:14:38 +00:00
jj resolve --list
: Replace separator with \t
The `:` was a bit noisy. With upcoming color support, it seems unnecessary. This should also be a little better for any tools that want to parse the output. Finally, `insta` also seems to want to rewrite test snapshots to be shorter. They seem equivalent.
This commit is contained in:
parent
e32342a6c4
commit
89de9aeae1
2 changed files with 15 additions and 29 deletions
|
@ -2485,7 +2485,7 @@ fn print_conflicted_paths(
|
|||
|
||||
writeln!(
|
||||
formatter,
|
||||
"{}: {msg}",
|
||||
"{}\t{msg}",
|
||||
&workspace_command.format_file_path(repo_path)
|
||||
)?;
|
||||
}
|
||||
|
|
|
@ -63,9 +63,7 @@ fn test_resolution() {
|
|||
o
|
||||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 2-sided conflict
|
||||
"###);
|
||||
@"file 2-sided conflict");
|
||||
insta::assert_snapshot!(
|
||||
std::fs::read_to_string(repo_path.join("file")).unwrap()
|
||||
, @r###"
|
||||
|
@ -184,7 +182,7 @@ conflict
|
|||
Working copy now at: 0bb40c908c8b conflict
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
After this operation, some files at this revision still have conflicts:
|
||||
file: 2-sided conflict
|
||||
file 2-sided conflict
|
||||
"###);
|
||||
insta::assert_snapshot!(
|
||||
std::fs::read_to_string(test_env.env_root().join("editor2")).unwrap(), @r###"
|
||||
|
@ -209,9 +207,7 @@ conflict
|
|||
7 7: >>>>>>>
|
||||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 2-sided conflict
|
||||
"###);
|
||||
@"file 2-sided conflict");
|
||||
|
||||
// Check that if merge tool leaves conflict markers in output file but
|
||||
// `merge-tool-edits-conflict-markers=false` or is not specified,
|
||||
|
@ -310,9 +306,7 @@ fn test_normal_conflict_input_files() {
|
|||
o
|
||||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 2-sided conflict
|
||||
"###);
|
||||
@"file 2-sided conflict");
|
||||
insta::assert_snapshot!(
|
||||
std::fs::read_to_string(repo_path.join("file")).unwrap()
|
||||
, @r###"
|
||||
|
@ -351,9 +345,7 @@ fn test_baseless_conflict_input_files() {
|
|||
o
|
||||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 2-sided conflict
|
||||
"###);
|
||||
@"file 2-sided conflict");
|
||||
insta::assert_snapshot!(
|
||||
std::fs::read_to_string(repo_path.join("file")).unwrap()
|
||||
, @r###"
|
||||
|
@ -382,9 +374,7 @@ fn test_too_many_parents() {
|
|||
create_commit(&test_env, &repo_path, "c", &["base"], &[("file", "c\n")]);
|
||||
create_commit(&test_env, &repo_path, "conflict", &["a", "b", "c"], &[]);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 3-sided conflict
|
||||
"###);
|
||||
@"file 3-sided conflict");
|
||||
|
||||
let error = test_env.jj_cmd_failure(&repo_path, &["resolve"]);
|
||||
insta::assert_snapshot!(error, @r###"
|
||||
|
@ -416,7 +406,7 @@ fn test_edit_delete_conflict_input_files() {
|
|||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 2-sided conflict including 1 deletion
|
||||
file 2-sided conflict including 1 deletion
|
||||
"###);
|
||||
insta::assert_snapshot!(
|
||||
std::fs::read_to_string(repo_path.join("file")).unwrap()
|
||||
|
@ -461,7 +451,7 @@ fn test_file_vs_dir() {
|
|||
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 2-sided conflict including a directory
|
||||
file 2-sided conflict including a directory
|
||||
"###);
|
||||
let error = test_env.jj_cmd_failure(&repo_path, &["resolve"]);
|
||||
insta::assert_snapshot!(error, @r###"
|
||||
|
@ -510,7 +500,7 @@ fn test_description_with_dir_and_deletion() {
|
|||
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file: 3-sided conflict including 1 deletion and a directory
|
||||
file 3-sided conflict including 1 deletion and a directory
|
||||
"###);
|
||||
let error = test_env.jj_cmd_failure(&repo_path, &["resolve"]);
|
||||
insta::assert_snapshot!(error, @r###"
|
||||
|
@ -586,8 +576,8 @@ fn test_multiple_conflicts() {
|
|||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file1: 2-sided conflict
|
||||
file2: 2-sided conflict
|
||||
file1 2-sided conflict
|
||||
file2 2-sided conflict
|
||||
"###);
|
||||
|
||||
let editor_script = test_env.set_up_fake_editor();
|
||||
|
@ -599,7 +589,7 @@ fn test_multiple_conflicts() {
|
|||
Working copy now at: 06cafc2b5489 conflict
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
After this operation, some files at this revision still have conflicts:
|
||||
file1: 2-sided conflict
|
||||
file1 2-sided conflict
|
||||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["diff"]),
|
||||
@r###"
|
||||
|
@ -613,9 +603,7 @@ fn test_multiple_conflicts() {
|
|||
7 : >>>>>>>
|
||||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file1: 2-sided conflict
|
||||
"###);
|
||||
@"file1 2-sided conflict");
|
||||
|
||||
// Repeat the above with the `--quiet` option.
|
||||
test_env.jj_cmd_success(&repo_path, &["undo"]);
|
||||
|
@ -649,9 +637,7 @@ fn test_multiple_conflicts() {
|
|||
7 : >>>>>>>
|
||||
"###);
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["resolve", "--list"]),
|
||||
@r###"
|
||||
file2: 2-sided conflict
|
||||
"###);
|
||||
@"file2 2-sided conflict");
|
||||
std::fs::write(
|
||||
&editor_script,
|
||||
"expect\n\0write\nsecond resolution for auto-chosen file\n",
|
||||
|
|
Loading…
Reference in a new issue