terminal user interface to jujutsu. Focused on speed and clarity
1#!/usr/bin/env bash
2
3
4# [templates]
5# log_node='''
6# coalesce(
7# if(!self, label("elided", "~")),
8# label(
9# separate(" ",
10# if(current_working_copy, "working_copy"),
11# if(immutable, "immutable"),
12# if(conflict, "conflict"),
13# ),
14# coalesce(
15# if(current_working_copy, "@"),
16# if(immutable, "◆"),
17# if(conflict, "×"),
18# if(self.contained_in("private()"), "◌"),
19# "○",
20# )
21# )
22# )'''
23
24# This is the start. now we add metadata before and above
25# "$$--"++if(!self, "YES")++"--$$\n"++
26# jj log -T '
27# "$$--START--$$"++"|"++change_id++"|"++commit_id++"|\n"++
28# "$$--END--$$\n"
29# '
30TMP='
31if(root,
32 format_root_commit(self),
33 label(if(current_working_copy, "working_copy"),
34 concat(
35 format_short_commit_header(self)++"\n" ,
36 separate(" ",
37 if(empty, label("empty", "(empty)")),
38 if(description,
39 description.first_line(),
40 label(if(empty, "empty"), description_placeholder),
41 ),
42 ) ,
43 ),
44 )
45)'
46
47IDS='"|"++++"|"++commit_id++"|"'
48TMP="$IDS++$TMP"
49jj log -T "
50\"\$\$--START--\$\$\"++$TMP++\"\$\$--END--\$\$\"
51"