Skip to main content

LOG_TEMPLATE

Constant LOG_TEMPLATE 

Source
pub const LOG_TEMPLATE: &str = "\'{\"commitId\":\' ++ commit_id.short().escape_json() ++ \',\"changeId\":\' ++ change_id.short().escape_json() ++ \',\"authorName\":\' ++ author.name().escape_json() ++ \',\"authorEmail\":\' ++ stringify(author.email()).escape_json() ++ \',\"description\":\' ++ description.escape_json() ++ \',\"parents\":[\' ++ parents.map(|p| p.commit_id().short().escape_json()).join(\',\') ++ \']\' ++ \',\"localBookmarks\":[\' ++ local_bookmarks.map(|b| b.name().escape_json()).join(\',\') ++ \']\' ++ \',\"remoteBookmarks\":[\' ++ remote_bookmarks.map(|b| stringify(b.name() ++ \"@\" ++ b.remote()).escape_json()).join(\',\') ++ \']\' ++ \',\"isWorkingCopy\":\' ++ if(current_working_copy, \'\"true\"\', \'\"false\"\') ++ \',\"conflict\":\' ++ if(conflict, \'\"true\"\', \'\"false\"\') ++ \',\"empty\":\' ++ if(empty, \'\"true\"\', \'\"false\"\') ++ \'}\' ++ \"\\n\"";
Expand description

jj template for jj log producing line-delimited JSON entries.

Use with parse_log_output to get structured LogEntry values.