##// END OF EJS Templates
log: add a status template...
Jordi Gutiérrez Hermoso -
r25006:517763f8 default
parent child Browse files
Show More
@@ -0,0 +1,25 b''
1 %include map-cmdline.default
2
3 # Override base templates
4 changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}{lfiles}\n'
5 changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{description}{lfiles}\n'
6 changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{extras}{description}{lfiles}\n'
7
8 # Override the file templates
9 lfiles = '{if(files,
10 label('ui.note log.files',
11 'files:\n'))}{lfile_mods}{lfile_adds}{lfile_copies_switch}{lfile_dels}'
12
13 # Exclude copied files, will display those in lfile_copies_switch
14 lfile_adds = '{file_adds % "{ifcontains(file, file_copies_switch,
15 '',
16 '{lfile_add}')}"}'
17 lfile_add = '{label("status.added", "A {file}\n")}'
18
19 lfile_copies_switch = '{file_copies_switch % "{lfile_copy_orig}{lfile_copy_dest}"'
20 lfile_copy_orig = '{label("status.added", "A {name}\n")}'
21 lfile_copy_dest = '{label("status.copied", " {source}\n")}'
22
23 lfile_mods = '{file_mods % "{label('status.modified', 'M {file}\n')}"}'
24
25 lfile_dels = '{file_dels % "{label('status.removed', 'R {file}\n')}"}'
@@ -992,11 +992,11 b' Error if no style:'
992 992
993 993 $ hg log --style notexist
994 994 abort: style 'notexist' not found
995 (available styles: bisect, changelog, compact, default, phases, xml)
995 (available styles: bisect, changelog, compact, default, phases, status, xml)
996 996 [255]
997 997
998 998 $ hg log -T list
999 available styles: bisect, changelog, compact, default, phases, xml
999 available styles: bisect, changelog, compact, default, phases, status, xml
1000 1000 abort: specify a template
1001 1001 [255]
1002 1002
@@ -2013,6 +2013,147 b' Add a commit that does all possible modi'
2013 2013 $ hg rm a
2014 2014 $ hg ci -m "Modify, add, remove, rename"
2015 2015
2016 Check the status template
2017
2018 $ cat <<EOF >> $HGRCPATH
2019 > [extensions]
2020 > color=
2021 > EOF
2022
2023 $ hg log -T status -r 10
2024 changeset: 10:0f9759ec227a
2025 tag: tip
2026 user: test
2027 date: Thu Jan 01 00:00:00 1970 +0000
2028 summary: Modify, add, remove, rename
2029 files:
2030 M third
2031 A b
2032 A fifth
2033 R a
2034 R fourth
2035
2036 $ hg log -T status -C -r 10
2037 changeset: 10:0f9759ec227a
2038 tag: tip
2039 user: test
2040 date: Thu Jan 01 00:00:00 1970 +0000
2041 summary: Modify, add, remove, rename
2042 files:
2043 M third
2044 A b
2045 A fifth
2046 fourth
2047 R a
2048 R fourth
2049
2050 $ hg log -T status -C -r 10 -v
2051 changeset: 10:0f9759ec227a
2052 tag: tip
2053 user: test
2054 date: Thu Jan 01 00:00:00 1970 +0000
2055 description:
2056 Modify, add, remove, rename
2057
2058 files:
2059 M third
2060 A b
2061 A fifth
2062 fourth
2063 R a
2064 R fourth
2065
2066 $ hg log -T status -C -r 10 --debug
2067 changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c
2068 tag: tip
2069 phase: secret
2070 parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066
2071 parent: -1:0000000000000000000000000000000000000000
2072 manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567
2073 user: test
2074 date: Thu Jan 01 00:00:00 1970 +0000
2075 extra: branch=default
2076 description:
2077 Modify, add, remove, rename
2078
2079 files:
2080 M third
2081 A b
2082 A fifth
2083 fourth
2084 R a
2085 R fourth
2086
2087 $ hg log -T status -C -r 10 --quiet
2088 10:0f9759ec227a
2089 $ hg --color=debug log -T status -r 10
2090 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2091 [log.tag|tag: tip]
2092 [log.user|user: test]
2093 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2094 [log.summary|summary: Modify, add, remove, rename]
2095 [ui.note log.files|files:]
2096 [status.modified|M third]
2097 [status.added|A b]
2098 [status.added|A fifth]
2099 [status.removed|R a]
2100 [status.removed|R fourth]
2101
2102 $ hg --color=debug log -T status -C -r 10
2103 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2104 [log.tag|tag: tip]
2105 [log.user|user: test]
2106 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2107 [log.summary|summary: Modify, add, remove, rename]
2108 [ui.note log.files|files:]
2109 [status.modified|M third]
2110 [status.added|A b]
2111 [status.added|A fifth]
2112 [status.copied| fourth]
2113 [status.removed|R a]
2114 [status.removed|R fourth]
2115
2116 $ hg --color=debug log -T status -C -r 10 -v
2117 [log.changeset changeset.secret|changeset: 10:0f9759ec227a]
2118 [log.tag|tag: tip]
2119 [log.user|user: test]
2120 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2121 [ui.note log.description|description:]
2122 [ui.note log.description|Modify, add, remove, rename]
2123
2124 [ui.note log.files|files:]
2125 [status.modified|M third]
2126 [status.added|A b]
2127 [status.added|A fifth]
2128 [status.copied| fourth]
2129 [status.removed|R a]
2130 [status.removed|R fourth]
2131
2132 $ hg --color=debug log -T status -C -r 10 --debug
2133 [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
2134 [log.tag|tag: tip]
2135 [log.phase|phase: secret]
2136 [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066]
2137 [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000]
2138 [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567]
2139 [log.user|user: test]
2140 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
2141 [ui.debug log.extra|extra: branch=default]
2142 [ui.note log.description|description:]
2143 [ui.note log.description|Modify, add, remove, rename]
2144
2145 [ui.note log.files|files:]
2146 [status.modified|M third]
2147 [status.added|A b]
2148 [status.added|A fifth]
2149 [status.copied| fourth]
2150 [status.removed|R a]
2151 [status.removed|R fourth]
2152
2153 $ hg --color=debug log -T status -C -r 10 --quiet
2154 [log.node|10:0f9759ec227a]
2155
2156
2016 2157 Error on syntax:
2017 2158
2018 2159 $ echo 'x = "f' >> t
@@ -148,7 +148,7 b' log on directory'
148 148
149 149 $ hg log -f -l1 --style something
150 150 abort: style 'something' not found
151 (available styles: bisect, changelog, compact, default, phases, xml)
151 (available styles: bisect, changelog, compact, default, phases, status, xml)
152 152 [255]
153 153
154 154 -f, phases style
General Comments 0
You need to be logged in to leave comments. Login now