mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-28 10:31:14 +00:00
cli: print parent commit summary on checkout
On "jj checkout", description of the working-copy commit is empty, and the working-copy parent provides more information. It might be a bit verbose to print parent summary on every history rewriting, but I think that's okay.
This commit is contained in:
parent
c55a323318
commit
f8d56e816d
@ -1059,6 +1059,12 @@ impl WorkspaceCommandHelper {
|
||||
ui.write("Working copy now at: ")?;
|
||||
self.write_commit_summary(ui.stdout_formatter().as_mut(), &new_commit)?;
|
||||
ui.write("\n")?;
|
||||
for parent in new_commit.parents() {
|
||||
// "Working copy now at: "
|
||||
ui.write("Parent commit : ")?;
|
||||
self.write_commit_summary(ui.stdout_formatter().as_mut(), &parent)?;
|
||||
ui.write("\n")?;
|
||||
}
|
||||
}
|
||||
if let Some(stats) = stats {
|
||||
print_checkout_stats(ui, stats)?;
|
||||
|
@ -59,6 +59,8 @@ fn test_rebase_branch_with_merge() {
|
||||
Abandoned commit b7c62f28ed10 d
|
||||
Rebased 1 descendant commits onto parents of abandoned commits
|
||||
Working copy now at: 11a2e10edf4e e
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Parent commit : fe2e8e8b50b3 c
|
||||
Added 0 files, modified 0 files, removed 1 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -77,6 +79,7 @@ fn test_rebase_branch_with_merge() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Abandoned commit 5557ece3e631 e
|
||||
Working copy now at: 6b5275139632 (no description set)
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Added 0 files, modified 0 files, removed 3 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -98,6 +101,7 @@ fn test_rebase_branch_with_merge() {
|
||||
b7c62f28ed10 d
|
||||
fe2e8e8b50b3 c
|
||||
Working copy now at: e7bb061217d5 (no description set)
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Added 0 files, modified 0 files, removed 3 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -134,6 +138,7 @@ fn test_rebase_branch_with_merge() {
|
||||
1394f625cbbd b
|
||||
2443ea76b0b1 a
|
||||
Working copy now at: af874bffee6e (no description set)
|
||||
Parent commit : 000000000000 (no description set)
|
||||
Added 0 files, modified 0 files, removed 4 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
|
@ -31,6 +31,7 @@ fn test_checkout() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["checkout", "@"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 05ce7118568d (no description set)
|
||||
Parent commit : 5c52832c3483 second
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ 05ce7118568d3007efc9163b055f9cb4a6becfde
|
||||
|
@ -28,6 +28,7 @@ fn test_describe() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["describe", "-m", "description from CLI"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: cf3e86731c67 description from CLI
|
||||
Parent commit : 000000000000 (no description set)
|
||||
"###);
|
||||
|
||||
// Set the same description using `-m` flag, but with explicit newline
|
||||
@ -55,6 +56,7 @@ fn test_describe() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["describe"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 100943aeee3f description from editor
|
||||
Parent commit : 000000000000 (no description set)
|
||||
"###);
|
||||
|
||||
// Lines in editor starting with "JJ: " are ignored
|
||||
@ -66,6 +68,7 @@ fn test_describe() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["describe"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: ccefa58bef47 description among comment
|
||||
Parent commit : 000000000000 (no description set)
|
||||
"###);
|
||||
|
||||
// Multi-line description
|
||||
@ -73,6 +76,7 @@ fn test_describe() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["describe"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: e932ba42cef0 line1
|
||||
Parent commit : 000000000000 (no description set)
|
||||
"###);
|
||||
let stdout =
|
||||
test_env.jj_cmd_success(&repo_path, &["log", "--no-graph", "-r@", "-Tdescription"]);
|
||||
@ -94,6 +98,7 @@ fn test_describe() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["describe", "-m", ""]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: d6957294acdc (no description set)
|
||||
Parent commit : 000000000000 (no description set)
|
||||
"###);
|
||||
std::fs::write(&edit_script, "write\n").unwrap();
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["describe"]);
|
||||
|
@ -65,6 +65,7 @@ fn test_diffedit() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created 1930da4a57e9 (no description set)
|
||||
Working copy now at: 1930da4a57e9 (no description set)
|
||||
Parent commit : 613028a4693c (no description set)
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
@ -80,6 +81,7 @@ fn test_diffedit() {
|
||||
Created c03ae96780b6 (no description set)
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: 2a4dc204a6ab (no description set)
|
||||
Parent commit : c03ae96780b6 (no description set)
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
let contents = String::from_utf8(std::fs::read(repo_path.join("file3")).unwrap()).unwrap();
|
||||
@ -98,6 +100,7 @@ fn test_diffedit() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created 15f2c966d508 (no description set)
|
||||
Working copy now at: 15f2c966d508 (no description set)
|
||||
Parent commit : 613028a4693c (no description set)
|
||||
Added 0 files, modified 0 files, removed 1 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
@ -148,6 +151,7 @@ fn test_diffedit_merge() {
|
||||
Created a70eded7af9e merge
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: a5f1ce845f74 (no description set)
|
||||
Parent commit : a70eded7af9e merge
|
||||
Added 0 files, modified 0 files, removed 1 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s", "-r", "@-"]);
|
||||
@ -213,6 +217,7 @@ fn test_diffedit_old_restore_interactive_tests() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created abdbf6271a1c (no description set)
|
||||
Working copy now at: abdbf6271a1c (no description set)
|
||||
Parent commit : 2375fa164210 (no description set)
|
||||
Added 0 files, modified 1 files, removed 1 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
@ -227,6 +232,7 @@ fn test_diffedit_old_restore_interactive_tests() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created e31f7f33ad07 (no description set)
|
||||
Working copy now at: e31f7f33ad07 (no description set)
|
||||
Parent commit : 2375fa164210 (no description set)
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "--git"]);
|
||||
|
@ -307,6 +307,7 @@ fn test_rebase_duplicates() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 4 commits
|
||||
Working copy now at: 29bd36b60e60 b
|
||||
Parent commit : 2f6dc5a1ffc2 a
|
||||
"###);
|
||||
// Some of the duplicate commits' timestamps were changed a little to make them
|
||||
// have distinct commit ids.
|
||||
|
@ -43,6 +43,7 @@ fn test_edit() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["edit", "@-"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: f41390a5efbf first
|
||||
Parent commit : 000000000000 (no description set)
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
|
@ -56,6 +56,7 @@ fn test_git_clone() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Fetching into new repo in "$TEST_ENV/clone"
|
||||
Working copy now at: 1f0b881a057d (no description set)
|
||||
Parent commit : 9f01a0e04879 message
|
||||
Added 1 files, modified 0 files, removed 0 files
|
||||
"###);
|
||||
assert!(test_env.env_root().join("clone").join("file").exists());
|
||||
|
@ -203,6 +203,7 @@ fn test_git_colocated_branches() {
|
||||
.unwrap();
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &workspace_root), @r###"
|
||||
Working copy now at: eb08b363bb5e (no description set)
|
||||
Parent commit : 230dd059e1b0 (no description set)
|
||||
@ eb08b363bb5ef8ee549314260488980d7bbe8f63
|
||||
│ ◉ 1e6f0b403ed2ff9713b5d6b1dc601e4804250cda master
|
||||
├─╯
|
||||
|
@ -196,6 +196,7 @@ fn test_git_import_move_export_undo() {
|
||||
// "git import" can be undone, but "git export" can't.
|
||||
insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["op", "restore", "@----"]), @r###"
|
||||
Working copy now at: 230dd059e1b0 (no description set)
|
||||
Parent commit : 000000000000 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @"");
|
||||
insta::assert_debug_snapshot!(get_git_refs(&git_repo), @r###"
|
||||
|
@ -86,6 +86,7 @@ fn test_init_git_external() {
|
||||
);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: f6950fc115ae (no description set)
|
||||
Parent commit : 8d698d4a8ee1 My commit message
|
||||
Added 1 files, modified 0 files, removed 0 files
|
||||
Initialized repo in "repo"
|
||||
"###);
|
||||
|
@ -87,6 +87,7 @@ fn test_move() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["move", "--from", "c"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 1c03e3d3c63f (no description set)
|
||||
Parent commit : e9515f21068c (no description set)
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -114,6 +115,7 @@ fn test_move() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["move", "--from", "@--"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: c8d83075e8c2 (no description set)
|
||||
Parent commit : 2c50bfc59c68 (no description set)
|
||||
"###);
|
||||
// The change has been removed from the source (the change pointed to by 'd'
|
||||
// became empty and was abandoned)
|
||||
@ -139,6 +141,7 @@ fn test_move() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: 2b723b1d6033 (no description set)
|
||||
Parent commit : 4293930d6333 (no description set)
|
||||
"###);
|
||||
// The change has been removed from the source (the change pointed to by 'e'
|
||||
// became empty and was abandoned)
|
||||
@ -201,6 +204,7 @@ fn test_move_partial() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["move", "-i", "--from", "c"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 71b69e433fbc (no description set)
|
||||
Parent commit : 3db0a2f5b535 (no description set)
|
||||
Added 0 files, modified 2 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -231,6 +235,7 @@ fn test_move_partial() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["move", "-i", "--from", "c"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 63f1a6e96edb (no description set)
|
||||
Parent commit : 3db0a2f5b535 (no description set)
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -264,6 +269,7 @@ fn test_move_partial() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["move", "--from", "c", "file1"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 17c2e6632cc5 (no description set)
|
||||
Parent commit : 3db0a2f5b535 (no description set)
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -324,6 +330,7 @@ fn test_move_partial() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["move", "--from", "c", "nonexistent"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: b670567d9438 (no description set)
|
||||
Parent commit : 3db0a2f5b535 (no description set)
|
||||
"###);
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,8 @@ fn test_new_insert_after() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 2 descendant commits
|
||||
Working copy now at: ca7c6481a8dd G
|
||||
Parent commit : 6041917ceeb5 B
|
||||
Parent commit : c9257eff5bf9 D
|
||||
"###);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###"
|
||||
◉ C
|
||||
@ -150,6 +152,7 @@ fn test_new_insert_after() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 3 descendant commits
|
||||
Working copy now at: fcf8281b4135 H
|
||||
Parent commit : c9257eff5bf9 D
|
||||
"###);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###"
|
||||
◉ C
|
||||
@ -194,6 +197,8 @@ fn test_new_insert_after_children() {
|
||||
test_env.jj_cmd_success(&repo_path, &["new", "--insert-after", "-m", "G", "A", "C"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: b48d4d73a39c G
|
||||
Parent commit : 65b1ef43c737 A
|
||||
Parent commit : ec18c57d72d8 C
|
||||
"###);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###"
|
||||
@ G
|
||||
@ -236,6 +241,9 @@ fn test_new_insert_before() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 2 descendant commits
|
||||
Working copy now at: ff6bbbc7b8df G
|
||||
Parent commit : 41a89ffcbba2 E
|
||||
Parent commit : c9257eff5bf9 D
|
||||
Parent commit : 6041917ceeb5 B
|
||||
"###);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###"
|
||||
◉ F
|
||||
@ -277,6 +285,7 @@ fn test_new_insert_before_root_successors() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 5 descendant commits
|
||||
Working copy now at: 3654197754f8 G
|
||||
Parent commit : 000000000000 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###"
|
||||
◉ F
|
||||
@ -345,6 +354,7 @@ fn test_new_insert_before_no_root_merge() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 4 descendant commits
|
||||
Working copy now at: bf9fc49331de G
|
||||
Parent commit : 65b1ef43c737 A
|
||||
"###);
|
||||
insta::assert_snapshot!(get_short_log_output(&test_env, &repo_path), @r###"
|
||||
◉ F
|
||||
|
@ -128,6 +128,7 @@ fn test_rebase_branch() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 2 commits
|
||||
Working copy now at: 9ca2a1544e5d e
|
||||
Parent commit : 1394f625cbbd b
|
||||
Added 1 files, modified 0 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -159,6 +160,7 @@ fn test_rebase_branch() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 2 commits
|
||||
Working copy now at: 817e3fb0dc64 e
|
||||
Parent commit : 1394f625cbbd b
|
||||
Added 1 files, modified 0 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -201,6 +203,7 @@ fn test_rebase_branch_with_merge() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 3 commits
|
||||
Working copy now at: 391c91a7defa e
|
||||
Parent commit : 1677f79555e4 d
|
||||
Added 1 files, modified 0 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -217,6 +220,7 @@ fn test_rebase_branch_with_merge() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 3 commits
|
||||
Working copy now at: 040ae3a6d358 e
|
||||
Parent commit : 3d0f3644db16 d
|
||||
Added 1 files, modified 0 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -260,6 +264,7 @@ fn test_rebase_single_revision() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Also rebased 2 descendant commits onto parent of rebased commit
|
||||
Working copy now at: 7e15b97a447f d
|
||||
Parent commit : 934236c8090e c
|
||||
Added 0 files, modified 0 files, removed 1 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -278,6 +283,8 @@ fn test_rebase_single_revision() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Also rebased 1 descendant commits onto parent of rebased commit
|
||||
Working copy now at: bf87078f4560 d
|
||||
Parent commit : d370aee184ba b
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Added 0 files, modified 0 files, removed 1 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -319,6 +326,8 @@ fn test_rebase_single_revision_merge_parent() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Also rebased 1 descendant commits onto parent of rebased commit
|
||||
Working copy now at: c62d0789e7c7 d
|
||||
Parent commit : d370aee184ba b
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Added 0 files, modified 0 files, removed 1 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -468,6 +477,7 @@ fn test_rebase_with_descendants() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 3 commits
|
||||
Working copy now at: 309336ffce22 d
|
||||
Parent commit : 244fa794aa18 c
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ d
|
||||
@ -483,6 +493,7 @@ fn test_rebase_with_descendants() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 2 commits
|
||||
Working copy now at: 92c2bc9a8623 d
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Added 0 files, modified 0 files, removed 2 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -513,6 +524,7 @@ fn test_rebase_with_descendants() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 3 commits
|
||||
Working copy now at: f1e71cb78a06 d
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Added 0 files, modified 0 files, removed 2 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -542,6 +554,7 @@ fn test_rebase_with_descendants() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 3 commits
|
||||
Working copy now at: d17539f7ea7c d
|
||||
Parent commit : 2443ea76b0b1 a
|
||||
Added 0 files, modified 0 files, removed 2 files
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
|
@ -88,6 +88,8 @@ fn test_resolution() {
|
||||
insta::assert_snapshot!(
|
||||
test_env.jj_cmd_success(&repo_path, &["resolve"]), @r###"
|
||||
Working copy now at: e069f0736a79 conflict
|
||||
Parent commit : aa493daf6659 a
|
||||
Parent commit : db6a4daf6ee7 b
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(
|
||||
@ -182,6 +184,8 @@ conflict
|
||||
),
|
||||
@r###"
|
||||
Working copy now at: 0bb40c908c8b conflict
|
||||
Parent commit : aa493daf6659 a
|
||||
Parent commit : db6a4daf6ee7 b
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
After this operation, some files at this revision still have conflicts:
|
||||
file 2-sided conflict
|
||||
@ -239,6 +243,8 @@ conflict
|
||||
insta::assert_snapshot!(
|
||||
test_env.jj_cmd_success(&repo_path, &["resolve"]), @r###"
|
||||
Working copy now at: 95418cb82ab1 conflict
|
||||
Parent commit : aa493daf6659 a
|
||||
Parent commit : db6a4daf6ee7 b
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(
|
||||
@ -628,6 +634,8 @@ fn test_multiple_conflicts() {
|
||||
insta::assert_snapshot!(
|
||||
test_env.jj_cmd_success(&repo_path, &["resolve", "another_file"]), @r###"
|
||||
Working copy now at: 07feb084c0d2 conflict
|
||||
Parent commit : de7553ef5f05 a
|
||||
Parent commit : f68bc2f0a292 b
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
After this operation, some files at this revision still have conflicts:
|
||||
this_file_has_a_very_long_name_to_test_padding 2-sided conflict
|
||||
@ -654,6 +662,8 @@ fn test_multiple_conflicts() {
|
||||
insta::assert_snapshot!(
|
||||
test_env.jj_cmd_success(&repo_path, &["resolve", "--quiet", "another_file"]), @r###"
|
||||
Working copy now at: ff142405c921 conflict
|
||||
Parent commit : de7553ef5f05 a
|
||||
Parent commit : f68bc2f0a292 b
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
|
||||
|
@ -37,6 +37,7 @@ fn test_restore() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created b05f8b84f2fc (no description set)
|
||||
Working copy now at: b05f8b84f2fc (no description set)
|
||||
Parent commit : 1a986a275de6 (no description set)
|
||||
Added 1 files, modified 1 files, removed 1 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
@ -48,6 +49,7 @@ fn test_restore() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created 9cb58509136b (no description set)
|
||||
Working copy now at: 9cb58509136b (no description set)
|
||||
Parent commit : 1a986a275de6 (no description set)
|
||||
Added 1 files, modified 0 files, removed 2 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
@ -62,6 +64,7 @@ fn test_restore() {
|
||||
Created 5ed06151e039 (no description set)
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: ca6c95b68bd2 (no description set)
|
||||
Parent commit : 5ed06151e039 (no description set)
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
insta::assert_snapshot!(stdout, @"");
|
||||
@ -79,6 +82,7 @@ fn test_restore() {
|
||||
Created c83e17dc46fd (no description set)
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: df9fb6892f99 (no description set)
|
||||
Parent commit : c83e17dc46fd (no description set)
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
insta::assert_snapshot!(stdout, @"");
|
||||
@ -95,6 +99,7 @@ fn test_restore() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created 28647642d4a5 (no description set)
|
||||
Working copy now at: 28647642d4a5 (no description set)
|
||||
Parent commit : 1a986a275de6 (no description set)
|
||||
Added 0 files, modified 1 files, removed 1 files
|
||||
"###);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]);
|
||||
@ -156,6 +161,8 @@ fn test_restore_conflicted_merge() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created 63198ca2e4aa conflict
|
||||
Working copy now at: 63198ca2e4aa conflict
|
||||
Parent commit : aa493daf6659 a
|
||||
Parent commit : db6a4daf6ee7 b
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(
|
||||
@ -192,6 +199,8 @@ fn test_restore_conflicted_merge() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Created d955febceac1 conflict
|
||||
Working copy now at: d955febceac1 conflict
|
||||
Parent commit : aa493daf6659 a
|
||||
Parent commit : db6a4daf6ee7 b
|
||||
Added 0 files, modified 1 files, removed 0 files
|
||||
"###);
|
||||
insta::assert_snapshot!(
|
||||
|
@ -44,6 +44,7 @@ fn test_split_by_paths() {
|
||||
First part: 5eebce1de3b0 (no description set)
|
||||
Second part: 45833353d94e (no description set)
|
||||
Working copy now at: 45833353d94e (no description set)
|
||||
Parent commit : 5eebce1de3b0 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(
|
||||
std::fs::read_to_string(test_env.env_root().join("editor0")).unwrap(), @r###"
|
||||
@ -89,6 +90,7 @@ fn test_split_by_paths() {
|
||||
First part: 31425b568fcf (no description set)
|
||||
Second part: af0963926ac3 (no description set)
|
||||
Working copy now at: 28d4ec20efa9 (no description set)
|
||||
Parent commit : af0963926ac3 (no description set)
|
||||
"###);
|
||||
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ -117,6 +119,7 @@ fn test_split_by_paths() {
|
||||
First part: 0647b2cbd0da (no description set)
|
||||
Second part: d5d77af65446 (no description set)
|
||||
Working copy now at: 86f228dc3a50 (no description set)
|
||||
Parent commit : d5d77af65446 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
|
||||
The given paths do not match any file: nonexistent
|
||||
|
@ -44,6 +44,7 @@ fn test_squash() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["squash"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: b9280a9898cb (no description set)
|
||||
Parent commit : 6ca29c9d2e7c (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ b9280a9898cb
|
||||
@ -62,6 +63,7 @@ fn test_squash() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: e87cf8ebc7e1 (no description set)
|
||||
Parent commit : 893c93ae2a87 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ e87cf8ebc7e1 c
|
||||
@ -107,6 +109,7 @@ fn test_squash() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["squash"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 959145c11426 (no description set)
|
||||
Parent commit : 80960125bb96 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ 959145c11426
|
||||
@ -157,6 +160,7 @@ fn test_squash_partial() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: f03d5ce4a973 (no description set)
|
||||
Parent commit : c9f931cd78af (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ f03d5ce4a973 c
|
||||
@ -175,6 +179,7 @@ fn test_squash_partial() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: e7a40106bee6 (no description set)
|
||||
Parent commit : 05d951646873 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ e7a40106bee6 c
|
||||
@ -207,6 +212,7 @@ fn test_squash_partial() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: a911fa1d0627 (no description set)
|
||||
Parent commit : fb73ad17899f (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ a911fa1d0627 c
|
||||
@ -238,6 +244,7 @@ fn test_squash_partial() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: 5e297967f76c (no description set)
|
||||
Parent commit : ac2586097a71 (no description set)
|
||||
"###);
|
||||
|
||||
// We get a warning if we pass a positional argument that looks like a revset
|
||||
@ -251,6 +258,7 @@ fn test_squash_partial() {
|
||||
"###);
|
||||
insta::assert_snapshot!(get_stdout_string(&assert), @r###"
|
||||
Working copy now at: 1c4e5596a511 (no description set)
|
||||
Parent commit : 16cc94b4efe9 (no description set)
|
||||
"###);
|
||||
}
|
||||
|
||||
@ -355,6 +363,7 @@ fn test_squash_empty() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["squash"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: e45abe2cd9a9 (no description set)
|
||||
Parent commit : 1265289bbbbf parent
|
||||
"###);
|
||||
insta::assert_snapshot!(get_description(&test_env, &repo_path, "@-"), @r###"
|
||||
parent
|
||||
|
@ -44,6 +44,7 @@ fn test_unsquash() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["unsquash"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 1b10d78f6136 (no description set)
|
||||
Parent commit : 90aeefd03044 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ 1b10d78f6136 c
|
||||
@ -61,6 +62,7 @@ fn test_unsquash() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: 45b8b3ddc25a (no description set)
|
||||
Parent commit : 9146bcc8d996 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ 45b8b3ddc25a c
|
||||
@ -106,6 +108,8 @@ fn test_unsquash() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["unsquash"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: 3217340cb761 merge
|
||||
Parent commit : 90fe0a96fc90 (no description set)
|
||||
Parent commit : 5658521e0f8b (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ 3217340cb761
|
||||
@ -155,6 +159,7 @@ fn test_unsquash_partial() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: 37c961d0d1e2 (no description set)
|
||||
Parent commit : 000af22057b9 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ 37c961d0d1e2 c
|
||||
@ -173,6 +178,7 @@ fn test_unsquash_partial() {
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["unsquash", "-i"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Working copy now at: a8e8fded1021 (no description set)
|
||||
Parent commit : 46cc06672a99 (no description set)
|
||||
"###);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &repo_path), @r###"
|
||||
@ a8e8fded1021 c
|
||||
|
@ -41,6 +41,7 @@ fn test_workspaces_add_second_workspace() {
|
||||
insta::assert_snapshot!(stdout.replace('\\', "/"), @r###"
|
||||
Created workspace in "../secondary"
|
||||
Working copy now at: 397eac932ad3 (no description set)
|
||||
Parent commit : 7d308bc9d934 initial
|
||||
Added 1 files, modified 0 files, removed 0 files
|
||||
"###);
|
||||
|
||||
@ -100,6 +101,7 @@ fn test_workspaces_conflicting_edits() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: fe8f41ed01d6 (no description set)
|
||||
Parent commit : c0d4a99ef98a (no description set)
|
||||
"###);
|
||||
|
||||
// The secondary workspace's working-copy commit was updated
|
||||
@ -182,6 +184,7 @@ fn test_workspaces_updated_by_other() {
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Rebased 1 descendant commits
|
||||
Working copy now at: fe8f41ed01d6 (no description set)
|
||||
Parent commit : c0d4a99ef98a (no description set)
|
||||
"###);
|
||||
|
||||
// The secondary workspace's working-copy commit was updated.
|
||||
|
Loading…
x
Reference in New Issue
Block a user