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:
parent
78edc6aba5
commit
d97a7ba86f
2 changed files with 30 additions and 25 deletions
|
@ -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"
|
||||
|
|
|
@ -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###"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 08:05:09[39m [38;5;5mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 08:05:09[39m [38;5;13mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m
|
||||
│ [1m[38;5;10m(empty)[39m description 1[0m
|
||||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;3mtest.user@example.com[39m [38;5;6m2001-02-03 08:05:08[39m [1m[38;5;4ma[0m[38;5;8ma2015d7[39m
|
||||
│ add a file
|
||||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m
|
||||
"###);
|
||||
"#);
|
||||
|
||||
// Color without graph
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always", "--no-graph"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
[1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 08:05:09[39m [38;5;5mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
[1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 08:05:09[39m [38;5;13mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m
|
||||
[1m[38;5;10m(empty)[39m description 1[0m
|
||||
[1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;3mtest.user@example.com[39m [38;5;6m2001-02-03 08:05:08[39m [1m[38;5;4ma[0m[38;5;8ma2015d7[39m
|
||||
add a file
|
||||
[1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[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###"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;5mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m [38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m
|
||||
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;13mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m [38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m
|
||||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;3mtest.user[39m [38;5;6m2001-02-03 08:05:07[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m [38;5;2m(empty)[39m [38;5;2m(no description set)[39m
|
||||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m
|
||||
"###);
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;5mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m
|
||||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;13mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m
|
||||
│ [1m[38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m
|
||||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;3mtest.user@example.com[39m [38;5;6m2001-02-03 08:05:07[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m
|
||||
│ [38;5;2m(empty)[39m [38;5;2m(no description set)[39m
|
||||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m
|
||||
"###);
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;5mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m
|
||||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#"
|
||||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;13mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m
|
||||
│ [1m[38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m
|
||||
│
|
||||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;3mtest.user@example.com[39m [38;5;6m2001-02-03 08:05:07[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m
|
||||
|
@ -333,7 +333,7 @@ fn test_log_builtin_templates_colored() {
|
|||
│
|
||||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m
|
||||
|
||||
"###);
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###"
|
||||
[1m[38;5;2m@[0m Commit ID: [38;5;4mdc31539712c7294d1d712cec63cef4504b94ca74[39m
|
||||
|
@ -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###"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;5m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m
|
||||
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;13m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m
|
||||
<<node::○>> [1m[38;5;5m<<log change_id shortest prefix::q>>[0m[38;5;8m<<log change_id shortest rest::pvuntsm>>[39m<<log:: >>[38;5;3m<<log author username::test.user>>[39m<<log:: >>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::2>>[0m[38;5;8m<<log commit_id shortest rest::30dd059>>[39m<<log:: >>[38;5;2m<<log empty::(empty)>>[39m<<log:: >>[38;5;2m<<log empty description placeholder::(no description set)>>[39m<<log::>>
|
||||
[1m[38;5;14m<<node immutable::◆>>[0m [1m[38;5;5m<<log change_id shortest prefix::z>>[0m[38;5;8m<<log change_id shortest rest::zzzzzzz>>[39m<<log:: >>[38;5;2m<<log root::root()>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::0>>[0m[38;5;8m<<log commit_id shortest rest::0000000>>[39m<<log::>>
|
||||
"###);
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;5m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m
|
||||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;13m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m
|
||||
│ [1m[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m
|
||||
<<node::○>> [1m[38;5;5m<<log change_id shortest prefix::q>>[0m[38;5;8m<<log change_id shortest rest::pvuntsm>>[39m<<log:: >>[38;5;3m<<log author email::test.user@example.com>>[39m<<log:: >>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::2>>[0m[38;5;8m<<log commit_id shortest rest::30dd059>>[39m<<log::>>
|
||||
│ [38;5;2m<<log empty::(empty)>>[39m<<log:: >>[38;5;2m<<log empty description placeholder::(no description set)>>[39m<<log::>>
|
||||
[1m[38;5;14m<<node immutable::◆>>[0m [1m[38;5;5m<<log change_id shortest prefix::z>>[0m[38;5;8m<<log change_id shortest rest::zzzzzzz>>[39m<<log:: >>[38;5;2m<<log root::root()>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::0>>[0m[38;5;8m<<log commit_id shortest rest::0000000>>[39m<<log::>>
|
||||
"###);
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;5m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m
|
||||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;13m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m
|
||||
│ [1m[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m
|
||||
│ <<log::>>
|
||||
<<node::○>> [1m[38;5;5m<<log change_id shortest prefix::q>>[0m[38;5;8m<<log change_id shortest rest::pvuntsm>>[39m<<log:: >>[38;5;3m<<log author email::test.user@example.com>>[39m<<log:: >>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::2>>[0m[38;5;8m<<log commit_id shortest rest::30dd059>>[39m<<log::>>
|
||||
|
@ -402,7 +402,7 @@ fn test_log_builtin_templates_colored_debug() {
|
|||
│ <<log::>>
|
||||
[1m[38;5;14m<<node immutable::◆>>[0m [1m[38;5;5m<<log change_id shortest prefix::z>>[0m[38;5;8m<<log change_id shortest rest::zzzzzzz>>[39m<<log:: >>[38;5;2m<<log root::root()>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::0>>[0m[38;5;8m<<log commit_id shortest rest::0000000>>[39m<<log::>>
|
||||
<<log::>>
|
||||
"###);
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m <<log::Commit ID: >>[38;5;4m<<log commit_id::dc31539712c7294d1d712cec63cef4504b94ca74>>[39m<<log::>>
|
||||
|
|
Loading…
Reference in a new issue