mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-01 00:50:57 +00:00
templates: Change builtin_log_root to be consistent with other hooks
This commit is contained in:
parent
0f2573abae
commit
feaaa48ed0
2 changed files with 14 additions and 12 deletions
|
@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
* The default template alias `builtin_op_log_root(op_id: OperationId)` was replaced by `format_root_operation(root: Operation)`.
|
* The default template alias `builtin_op_log_root(op_id: OperationId)` was replaced by `format_root_operation(root: Operation)`.
|
||||||
|
|
||||||
|
* The default template alias `builtin_log_root(change_id: ChangeId, commit_id: CommitId)` was replaced by `format_root_commit(root: Commit)`.
|
||||||
|
|
||||||
### New features
|
### New features
|
||||||
|
|
||||||
* The list of conflicted paths is printed whenever the working copy changes.
|
* The list of conflicted paths is printed whenever the working copy changes.
|
||||||
|
|
|
@ -42,7 +42,7 @@ show = 'builtin_log_detailed'
|
||||||
[template-aliases]
|
[template-aliases]
|
||||||
builtin_log_oneline = '''
|
builtin_log_oneline = '''
|
||||||
if(root,
|
if(root,
|
||||||
builtin_log_root(change_id, commit_id),
|
format_root_commit(self),
|
||||||
label(if(current_working_copy, "working_copy"),
|
label(if(current_working_copy, "working_copy"),
|
||||||
concat(
|
concat(
|
||||||
separate(" ",
|
separate(" ",
|
||||||
|
@ -64,7 +64,7 @@ if(root,
|
||||||
'''
|
'''
|
||||||
builtin_log_compact = '''
|
builtin_log_compact = '''
|
||||||
if(root,
|
if(root,
|
||||||
builtin_log_root(change_id, commit_id),
|
format_root_commit(self),
|
||||||
label(if(current_working_copy, "working_copy"),
|
label(if(current_working_copy, "working_copy"),
|
||||||
concat(
|
concat(
|
||||||
separate(" ",
|
separate(" ",
|
||||||
|
@ -87,7 +87,7 @@ if(root,
|
||||||
)
|
)
|
||||||
'''
|
'''
|
||||||
builtin_log_comfortable = 'builtin_log_compact ++ "\n"'
|
builtin_log_comfortable = 'builtin_log_compact ++ "\n"'
|
||||||
'builtin_log_detailed' = '''
|
builtin_log_detailed = '''
|
||||||
concat(
|
concat(
|
||||||
"Commit ID: " ++ commit_id ++ "\n",
|
"Commit ID: " ++ commit_id ++ "\n",
|
||||||
"Change ID: " ++ change_id ++ "\n",
|
"Change ID: " ++ change_id ++ "\n",
|
||||||
|
@ -112,15 +112,6 @@ label(if(current_operation, "current_operation"),
|
||||||
'''
|
'''
|
||||||
builtin_op_log_comfortable = 'builtin_op_log_compact ++ "\n"'
|
builtin_op_log_comfortable = 'builtin_op_log_compact ++ "\n"'
|
||||||
|
|
||||||
'builtin_log_root(change_id, commit_id)' = '''
|
|
||||||
separate(" ",
|
|
||||||
format_short_change_id(change_id),
|
|
||||||
label("root", "root()"),
|
|
||||||
format_short_commit_id(commit_id),
|
|
||||||
branches
|
|
||||||
) ++ "\n"
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
description_placeholder = '''
|
description_placeholder = '''
|
||||||
label(if(empty, "empty ") ++ "description placeholder", "(no description set)")'''
|
label(if(empty, "empty ") ++ "description placeholder", "(no description set)")'''
|
||||||
|
@ -142,6 +133,15 @@ commit_summary_separator = 'label("separator", " | ")'
|
||||||
time_range.start().ago() ++ label("time", ", lasted ") ++ time_range.duration()'''
|
time_range.start().ago() ++ label("time", ", lasted ") ++ time_range.duration()'''
|
||||||
'format_timestamp(timestamp)' = 'timestamp.local().format("%Y-%m-%d %H:%M:%S")'
|
'format_timestamp(timestamp)' = 'timestamp.local().format("%Y-%m-%d %H:%M:%S")'
|
||||||
|
|
||||||
|
'format_root_commit(root)' = '''
|
||||||
|
separate(" ",
|
||||||
|
format_short_change_id(root.change_id()),
|
||||||
|
label("root", "root()"),
|
||||||
|
format_short_commit_id(root.commit_id()),
|
||||||
|
root.branches()
|
||||||
|
) ++ "\n"
|
||||||
|
'''
|
||||||
|
|
||||||
'format_operation(op)' = '''
|
'format_operation(op)' = '''
|
||||||
concat(
|
concat(
|
||||||
separate(" ", op.id().short(), op.user(), format_time_range(op.time())), "\n",
|
separate(" ", op.id().short(), op.user(), format_time_range(op.time())), "\n",
|
||||||
|
|
Loading…
Reference in a new issue