forked from mirrors/jj
cli: rename checkout
to working_copy
in template
This commit is contained in:
parent
6e23b5b052
commit
c36b720dd4
4 changed files with 23 additions and 20 deletions
|
@ -54,6 +54,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
* `jj git push` now pushes only branches pointing to the `@` by default. Use
|
||||
`--all` to push all branches.
|
||||
|
||||
* The `checkouts` template keyword is now called `working_copies`, and
|
||||
`current_checkout` is called `current_working_copy`.
|
||||
|
||||
### New features
|
||||
|
||||
* The new `jj interdiff` command compares the changes in commits, ignoring
|
||||
|
|
|
@ -3102,7 +3102,7 @@ fn log_template(settings: &UserSettings) -> String {
|
|||
" " label("timestamp", author.timestamp())
|
||||
" " branches
|
||||
" " tags
|
||||
" " checkouts
|
||||
" " working_copies
|
||||
if(is_git_head, label("git_head", " HEAD@git"))
|
||||
if(divergent, label("divergent", " divergent"))
|
||||
if(conflict, label("conflict", " conflict"))
|
||||
|
@ -3193,7 +3193,7 @@ fn cmd_log(ui: &mut Ui, command: &CommandHelper, args: &LogArgs) -> Result<(), C
|
|||
let writer = Box::new(&mut buffer);
|
||||
let mut formatter = ui.new_formatter(writer);
|
||||
if is_checkout {
|
||||
formatter.add_label("checkout".to_string())?;
|
||||
formatter.add_label("working_copy".to_string())?;
|
||||
}
|
||||
template.format(&commit, formatter.as_mut())?;
|
||||
if is_checkout {
|
||||
|
|
|
@ -90,7 +90,7 @@ fn config_colors(user_settings: &UserSettings) -> HashMap<String, String> {
|
|||
result.insert(String::from("author timestamp"), String::from("cyan"));
|
||||
result.insert(String::from("committer"), String::from("yellow"));
|
||||
result.insert(String::from("committer timestamp"), String::from("cyan"));
|
||||
result.insert(String::from("checkouts"), String::from("magenta"));
|
||||
result.insert(String::from("working_copies"), String::from("magenta"));
|
||||
result.insert(String::from("branch"), String::from("magenta"));
|
||||
result.insert(String::from("branches"), String::from("magenta"));
|
||||
result.insert(String::from("tags"), String::from("magenta"));
|
||||
|
@ -104,63 +104,63 @@ fn config_colors(user_settings: &UserSettings) -> HashMap<String, String> {
|
|||
// use a different background color? (We don't have support for background
|
||||
// colors yet.)
|
||||
result.insert(
|
||||
String::from("checkout commit_id"),
|
||||
String::from("working_copy commit_id"),
|
||||
String::from("bright blue"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout commit_id open"),
|
||||
String::from("working_copy commit_id open"),
|
||||
String::from("bright green"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout change_id"),
|
||||
String::from("working_copy change_id"),
|
||||
String::from("bright magenta"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout author"),
|
||||
String::from("working_copy author"),
|
||||
String::from("bright yellow"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout author timestamp"),
|
||||
String::from("working_copy author timestamp"),
|
||||
String::from("bright cyan"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout committer"),
|
||||
String::from("working_copy committer"),
|
||||
String::from("bright yellow"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout committer timestamp"),
|
||||
String::from("working_copy committer timestamp"),
|
||||
String::from("bright cyan"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout checkouts"),
|
||||
String::from("working_copy working_copies"),
|
||||
String::from("bright magenta"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout branch"),
|
||||
String::from("working_copy branch"),
|
||||
String::from("bright magenta"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout branches"),
|
||||
String::from("working_copy branches"),
|
||||
String::from("bright magenta"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout tags"),
|
||||
String::from("working_copy tags"),
|
||||
String::from("bright magenta"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout git_refs"),
|
||||
String::from("working_copy git_refs"),
|
||||
String::from("bright magenta"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout divergent"),
|
||||
String::from("working_copy divergent"),
|
||||
String::from("bright red"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout conflict"),
|
||||
String::from("working_copy conflict"),
|
||||
String::from("bright red"),
|
||||
);
|
||||
result.insert(
|
||||
String::from("checkout description"),
|
||||
String::from("working_copy description"),
|
||||
String::from("bright white"),
|
||||
);
|
||||
|
||||
|
|
|
@ -243,8 +243,8 @@ fn parse_commit_keyword<'a>(
|
|||
"author" => Property::Signature(Box::new(AuthorProperty)),
|
||||
"committer" => Property::Signature(Box::new(CommitterProperty)),
|
||||
"open" => Property::Boolean(Box::new(OpenProperty)),
|
||||
"checkouts" => Property::String(Box::new(CheckoutsProperty { repo })),
|
||||
"current_checkout" => Property::Boolean(Box::new(CurrentCheckoutProperty {
|
||||
"working_copies" => Property::String(Box::new(CheckoutsProperty { repo })),
|
||||
"current_working_copy" => Property::Boolean(Box::new(CurrentCheckoutProperty {
|
||||
repo,
|
||||
workspace_id: workspace_id.clone(),
|
||||
})),
|
||||
|
|
Loading…
Reference in a new issue