mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-01 00:50:57 +00:00
cli templates: include info on divergent change ids in short commit template
Fixes #2411
This commit is contained in:
parent
a91b6d9dd9
commit
1733ae22c7
4 changed files with 14 additions and 22 deletions
|
@ -1,11 +1,7 @@
|
||||||
[templates]
|
[templates]
|
||||||
commit_summary = '''
|
commit_summary = '''
|
||||||
separate(" ",
|
separate(" ",
|
||||||
label(
|
builtin_change_id_with_hidden_and_divergent_info,
|
||||||
if(hidden, "hidden"),
|
|
||||||
separate(" ",
|
|
||||||
format_short_change_id(change_id),
|
|
||||||
if(hidden, "hidden"))),
|
|
||||||
format_short_commit_id(commit_id),
|
format_short_commit_id(commit_id),
|
||||||
separate(commit_summary_separator,
|
separate(commit_summary_separator,
|
||||||
branches,
|
branches,
|
||||||
|
@ -20,11 +16,7 @@ separate(" ",
|
||||||
|
|
||||||
commit_summary_no_branches = '''
|
commit_summary_no_branches = '''
|
||||||
separate(" ",
|
separate(" ",
|
||||||
label(
|
builtin_change_id_with_hidden_and_divergent_info,
|
||||||
if(hidden, "hidden"),
|
|
||||||
separate(" ",
|
|
||||||
format_short_change_id(change_id),
|
|
||||||
if(hidden, "hidden"))),
|
|
||||||
format_short_commit_id(commit_id),
|
format_short_commit_id(commit_id),
|
||||||
if(conflict, label("conflict", "(conflict)")),
|
if(conflict, label("conflict", "(conflict)")),
|
||||||
if(empty, label("empty", "(empty)")),
|
if(empty, label("empty", "(empty)")),
|
||||||
|
|
|
@ -152,8 +152,8 @@ fn test_checkout_conflicting_change_ids() {
|
||||||
insta::assert_snapshot!(stderr, @r###"
|
insta::assert_snapshot!(stderr, @r###"
|
||||||
Error: Revset "qpvuntsm" resolved to more than one revision
|
Error: Revset "qpvuntsm" resolved to more than one revision
|
||||||
Hint: The revset "qpvuntsm" resolved to these revisions:
|
Hint: The revset "qpvuntsm" resolved to these revisions:
|
||||||
qpvuntsm d2ae6806 (empty) two
|
qpvuntsm?? d2ae6806 (empty) two
|
||||||
qpvuntsm a9330854 (empty) one
|
qpvuntsm?? a9330854 (empty) one
|
||||||
Some of these commits have the same change id. Abandon one of them with `jj abandon -r <REVISION>`.
|
Some of these commits have the same change id. Abandon one of them with `jj abandon -r <REVISION>`.
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,10 +112,10 @@ fn test_git_push_undo() {
|
||||||
// git fetch && jj undo && jj git fetch` would become a no-op.
|
// git fetch && jj undo && jj git fetch` would become a no-op.
|
||||||
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
|
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
|
||||||
main (conflicted):
|
main (conflicted):
|
||||||
- qpvuntsm hidden 0cffb614 (empty) AA
|
- qpvuntsm?? hidden 0cffb614 (empty) AA
|
||||||
+ qpvuntsm 0a3e99f0 (empty) CC
|
+ qpvuntsm?? 0a3e99f0 (empty) CC
|
||||||
+ qpvuntsm 8c05de15 (empty) BB
|
+ qpvuntsm?? 8c05de15 (empty) BB
|
||||||
@origin (behind by 1 commits): qpvuntsm 8c05de15 (empty) BB
|
@origin (behind by 1 commits): qpvuntsm?? 8c05de15 (empty) BB
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,11 +270,11 @@ fn test_git_push_undo_colocated() {
|
||||||
// same result in a seemingly different way?
|
// same result in a seemingly different way?
|
||||||
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
|
insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
|
||||||
main (conflicted):
|
main (conflicted):
|
||||||
- qpvuntsm hidden 0cffb614 (empty) AA
|
- qpvuntsm?? hidden 0cffb614 (empty) AA
|
||||||
+ qpvuntsm 0a3e99f0 (empty) CC
|
+ qpvuntsm?? 0a3e99f0 (empty) CC
|
||||||
+ qpvuntsm 8c05de15 (empty) BB
|
+ qpvuntsm?? 8c05de15 (empty) BB
|
||||||
@git (behind by 1 commits): qpvuntsm 0a3e99f0 (empty) CC
|
@git (behind by 1 commits): qpvuntsm?? 0a3e99f0 (empty) CC
|
||||||
@origin (behind by 1 commits): qpvuntsm 8c05de15 (empty) BB
|
@origin (behind by 1 commits): qpvuntsm?? 8c05de15 (empty) BB
|
||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ fn test_workspaces_conflicting_edits() {
|
||||||
insta::assert_snapshot!(stderr, @r###"
|
insta::assert_snapshot!(stderr, @r###"
|
||||||
Concurrent modification detected, resolving automatically.
|
Concurrent modification detected, resolving automatically.
|
||||||
Rebased 1 descendant commits onto commits rewritten by other operation
|
Rebased 1 descendant commits onto commits rewritten by other operation
|
||||||
Working copy now at: pmmvwywv a1896a17 (empty) (no description set)
|
Working copy now at: pmmvwywv?? a1896a17 (empty) (no description set)
|
||||||
Added 0 files, modified 1 files, removed 0 files
|
Added 0 files, modified 1 files, removed 0 files
|
||||||
"###);
|
"###);
|
||||||
insta::assert_snapshot!(get_log_output(&test_env, &secondary_path),
|
insta::assert_snapshot!(get_log_output(&test_env, &secondary_path),
|
||||||
|
|
Loading…
Reference in a new issue