ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: fix missed working-copy "bookmark" colors

Quoting style changed because of insta v1.40.0.
This commit is contained in:
Yuya Nishihara 2024-09-12 08:27:58 +09:00
parent 78edc6aba5
commit d97a7ba86f
2 changed files with 30 additions and 25 deletions

View file

@ -29,7 +29,7 @@
"bookmarks" = "magenta"
"local_bookmarks" = "magenta"
"remote_bookmarks" = "magenta"
# TODO: Remove in jj 0.28+
# TODO: Remove *branch* in jj 0.28+
"branch" = "magenta"
"branches" = "magenta"
"local_branches" = "magenta"
@ -57,6 +57,11 @@
"working_copy email" = "yellow"
"working_copy timestamp" = "bright cyan"
"working_copy working_copies" = "bright green"
"working_copy bookmark" = "bright magenta"
"working_copy bookmarks" = "bright magenta"
"working_copy local_bookmarks" = "bright magenta"
"working_copy remote_bookmarks" = "bright magenta"
# TODO: Remove *branch* in jj 0.28+
"working_copy branch" = "bright magenta"
"working_copy branches" = "bright magenta"
"working_copy local_branches" = "bright magenta"

View file

@ -198,23 +198,23 @@ fn test_log_default() {
// Color
let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always"]);
insta::assert_snapshot!(stdout, @r###"
@ kkmpptxz test.user@example.com 2001-02-03 08:05:09 my-bookmark bac9ff9e
insta::assert_snapshot!(stdout, @r#"
@ kkmpptxz test.user@example.com 2001-02-03 08:05:09 my-bookmark bac9ff9e
(empty) description 1
qpvuntsm test.user@example.com 2001-02-03 08:05:08 aa2015d7
add a file
 zzzzzzzz root() 00000000
"###);
"#);
// Color without graph
let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always", "--no-graph"]);
insta::assert_snapshot!(stdout, @r###"
kkmpptxz test.user@example.com 2001-02-03 08:05:09 my-bookmark bac9ff9e
insta::assert_snapshot!(stdout, @r#"
kkmpptxz test.user@example.com 2001-02-03 08:05:09 my-bookmark bac9ff9e
(empty) description 1
qpvuntsm test.user@example.com 2001-02-03 08:05:08 aa2015d7
add a file
zzzzzzzz root() 00000000
"###);
"#);
}
#[test]
@ -310,22 +310,22 @@ fn test_log_builtin_templates_colored() {
);
test_env.jj_cmd_ok(&repo_path, &["bookmark", "create", "my-bookmark"]);
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r###"
@ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-bookmark dc315397 (empty) (no description set)
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#"
@ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-bookmark dc315397 (empty) (no description set)
qpvuntsm test.user 2001-02-03 08:05:07 230dd059 (empty) (no description set)
 zzzzzzzz root() 00000000
"###);
"#);
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###"
@ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-bookmark dc315397
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#"
@ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-bookmark dc315397
(empty) (no description set)
qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059
(empty) (no description set)
 zzzzzzzz root() 00000000
"###);
"#);
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###"
@ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-bookmark dc315397
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#"
@ rlvkpnrz (no email set) 2001-02-03 08:05:08 my-bookmark dc315397
(empty) (no description set)
qpvuntsm test.user@example.com 2001-02-03 08:05:07 230dd059
@ -333,7 +333,7 @@ fn test_log_builtin_templates_colored() {
 zzzzzzzz root() 00000000
"###);
"#);
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###"
@ Commit ID: dc31539712c7294d1d712cec63cef4504b94ca74
@ -379,22 +379,22 @@ fn test_log_builtin_templates_colored_debug() {
);
test_env.jj_cmd_ok(&repo_path, &["bookmark", "create", "my-bookmark"]);
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r###"
<<node working_copy::@>> <<log working_copy change_id shortest prefix::r>><<log working_copy change_id shortest rest::lvkpnrz>><<log working_copy:: >><<log working_copy email placeholder::(no email set)>><<log working_copy:: >><<log working_copy committer timestamp local format::2001-02-03 08:05:08>><<log working_copy:: >><<log working_copy bookmarks name::my-bookmark>><<log working_copy:: >><<log working_copy commit_id shortest prefix::d>><<log working_copy commit_id shortest rest::c315397>><<log working_copy:: >><<log working_copy empty::(empty)>><<log working_copy:: >><<log working_copy empty description placeholder::(no description set)>><<log working_copy::>>
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#"
<<node working_copy::@>> <<log working_copy change_id shortest prefix::r>><<log working_copy change_id shortest rest::lvkpnrz>><<log working_copy:: >><<log working_copy email placeholder::(no email set)>><<log working_copy:: >><<log working_copy committer timestamp local format::2001-02-03 08:05:08>><<log working_copy:: >><<log working_copy bookmarks name::my-bookmark>><<log working_copy:: >><<log working_copy commit_id shortest prefix::d>><<log working_copy commit_id shortest rest::c315397>><<log working_copy:: >><<log working_copy empty::(empty)>><<log working_copy:: >><<log working_copy empty description placeholder::(no description set)>><<log working_copy::>>
<<node::>> <<log change_id shortest prefix::q>><<log change_id shortest rest::pvuntsm>><<log:: >><<log author username::test.user>><<log:: >><<log committer timestamp local format::2001-02-03 08:05:07>><<log:: >><<log commit_id shortest prefix::2>><<log commit_id shortest rest::30dd059>><<log:: >><<log empty::(empty)>><<log:: >><<log empty description placeholder::(no description set)>><<log::>>
<<node immutable::>> <<log change_id shortest prefix::z>><<log change_id shortest rest::zzzzzzz>><<log:: >><<log root::root()>><<log:: >><<log commit_id shortest prefix::0>><<log commit_id shortest rest::0000000>><<log::>>
"###);
"#);
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###"
<<node working_copy::@>> <<log working_copy change_id shortest prefix::r>><<log working_copy change_id shortest rest::lvkpnrz>><<log working_copy:: >><<log working_copy email placeholder::(no email set)>><<log working_copy:: >><<log working_copy committer timestamp local format::2001-02-03 08:05:08>><<log working_copy:: >><<log working_copy bookmarks name::my-bookmark>><<log working_copy:: >><<log working_copy commit_id shortest prefix::d>><<log working_copy commit_id shortest rest::c315397>><<log working_copy::>>
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#"
<<node working_copy::@>> <<log working_copy change_id shortest prefix::r>><<log working_copy change_id shortest rest::lvkpnrz>><<log working_copy:: >><<log working_copy email placeholder::(no email set)>><<log working_copy:: >><<log working_copy committer timestamp local format::2001-02-03 08:05:08>><<log working_copy:: >><<log working_copy bookmarks name::my-bookmark>><<log working_copy:: >><<log working_copy commit_id shortest prefix::d>><<log working_copy commit_id shortest rest::c315397>><<log working_copy::>>
<<log working_copy empty::(empty)>><<log working_copy:: >><<log working_copy empty description placeholder::(no description set)>><<log working_copy::>>
<<node::>> <<log change_id shortest prefix::q>><<log change_id shortest rest::pvuntsm>><<log:: >><<log author email::test.user@example.com>><<log:: >><<log committer timestamp local format::2001-02-03 08:05:07>><<log:: >><<log commit_id shortest prefix::2>><<log commit_id shortest rest::30dd059>><<log::>>
<<log empty::(empty)>><<log:: >><<log empty description placeholder::(no description set)>><<log::>>
<<node immutable::>> <<log change_id shortest prefix::z>><<log change_id shortest rest::zzzzzzz>><<log:: >><<log root::root()>><<log:: >><<log commit_id shortest prefix::0>><<log commit_id shortest rest::0000000>><<log::>>
"###);
"#);
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###"
<<node working_copy::@>> <<log working_copy change_id shortest prefix::r>><<log working_copy change_id shortest rest::lvkpnrz>><<log working_copy:: >><<log working_copy email placeholder::(no email set)>><<log working_copy:: >><<log working_copy committer timestamp local format::2001-02-03 08:05:08>><<log working_copy:: >><<log working_copy bookmarks name::my-bookmark>><<log working_copy:: >><<log working_copy commit_id shortest prefix::d>><<log working_copy commit_id shortest rest::c315397>><<log working_copy::>>
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#"
<<node working_copy::@>> <<log working_copy change_id shortest prefix::r>><<log working_copy change_id shortest rest::lvkpnrz>><<log working_copy:: >><<log working_copy email placeholder::(no email set)>><<log working_copy:: >><<log working_copy committer timestamp local format::2001-02-03 08:05:08>><<log working_copy:: >><<log working_copy bookmarks name::my-bookmark>><<log working_copy:: >><<log working_copy commit_id shortest prefix::d>><<log working_copy commit_id shortest rest::c315397>><<log working_copy::>>
<<log working_copy empty::(empty)>><<log working_copy:: >><<log working_copy empty description placeholder::(no description set)>><<log working_copy::>>
<<log::>>
<<node::>> <<log change_id shortest prefix::q>><<log change_id shortest rest::pvuntsm>><<log:: >><<log author email::test.user@example.com>><<log:: >><<log committer timestamp local format::2001-02-03 08:05:07>><<log:: >><<log commit_id shortest prefix::2>><<log commit_id shortest rest::30dd059>><<log::>>
@ -402,7 +402,7 @@ fn test_log_builtin_templates_colored_debug() {
<<log::>>
<<node immutable::>> <<log change_id shortest prefix::z>><<log change_id shortest rest::zzzzzzz>><<log:: >><<log root::root()>><<log:: >><<log commit_id shortest prefix::0>><<log commit_id shortest rest::0000000>><<log::>>
<<log::>>
"###);
"#);
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###"
<<node working_copy::@>> <<log::Commit ID: >><<log commit_id::dc31539712c7294d1d712cec63cef4504b94ca74>><<log::>>