##// END OF EJS Templates
templatekw: add p1rev, p1node, p2rev, p2node keywords...
epriestley -
r17357:bd605568 default
parent child Browse files
Show More
@@ -1,341 +1,367 b''
1 1 # templatekw.py - common changeset template keywords
2 2 #
3 3 # Copyright 2005-2009 Matt Mackall <mpm@selenic.com>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from node import hex
9 9 import patch, util, error
10 10 import hbisect
11 11
12 12 def showlist(name, values, plural=None, **args):
13 13 '''expand set of values.
14 14 name is name of key in template map.
15 15 values is list of strings or dicts.
16 16 plural is plural of name, if not simply name + 's'.
17 17
18 18 expansion works like this, given name 'foo'.
19 19
20 20 if values is empty, expand 'no_foos'.
21 21
22 22 if 'foo' not in template map, return values as a string,
23 23 joined by space.
24 24
25 25 expand 'start_foos'.
26 26
27 27 for each value, expand 'foo'. if 'last_foo' in template
28 28 map, expand it instead of 'foo' for last key.
29 29
30 30 expand 'end_foos'.
31 31 '''
32 32 templ = args['templ']
33 33 if plural:
34 34 names = plural
35 35 else: names = name + 's'
36 36 if not values:
37 37 noname = 'no_' + names
38 38 if noname in templ:
39 39 yield templ(noname, **args)
40 40 return
41 41 if name not in templ:
42 42 if isinstance(values[0], str):
43 43 yield ' '.join(values)
44 44 else:
45 45 for v in values:
46 46 yield dict(v, **args)
47 47 return
48 48 startname = 'start_' + names
49 49 if startname in templ:
50 50 yield templ(startname, **args)
51 51 vargs = args.copy()
52 52 def one(v, tag=name):
53 53 try:
54 54 vargs.update(v)
55 55 except (AttributeError, ValueError):
56 56 try:
57 57 for a, b in v:
58 58 vargs[a] = b
59 59 except ValueError:
60 60 vargs[name] = v
61 61 return templ(tag, **vargs)
62 62 lastname = 'last_' + name
63 63 if lastname in templ:
64 64 last = values.pop()
65 65 else:
66 66 last = None
67 67 for v in values:
68 68 yield one(v)
69 69 if last is not None:
70 70 yield one(last, tag=lastname)
71 71 endname = 'end_' + names
72 72 if endname in templ:
73 73 yield templ(endname, **args)
74 74
75 75 def getfiles(repo, ctx, revcache):
76 76 if 'files' not in revcache:
77 77 revcache['files'] = repo.status(ctx.p1().node(), ctx.node())[:3]
78 78 return revcache['files']
79 79
80 80 def getlatesttags(repo, ctx, cache):
81 81 '''return date, distance and name for the latest tag of rev'''
82 82
83 83 if 'latesttags' not in cache:
84 84 # Cache mapping from rev to a tuple with tag date, tag
85 85 # distance and tag name
86 86 cache['latesttags'] = {-1: (0, 0, 'null')}
87 87 latesttags = cache['latesttags']
88 88
89 89 rev = ctx.rev()
90 90 todo = [rev]
91 91 while todo:
92 92 rev = todo.pop()
93 93 if rev in latesttags:
94 94 continue
95 95 ctx = repo[rev]
96 96 tags = [t for t in ctx.tags() if repo.tagtype(t) == 'global']
97 97 if tags:
98 98 latesttags[rev] = ctx.date()[0], 0, ':'.join(sorted(tags))
99 99 continue
100 100 try:
101 101 # The tuples are laid out so the right one can be found by
102 102 # comparison.
103 103 pdate, pdist, ptag = max(
104 104 latesttags[p.rev()] for p in ctx.parents())
105 105 except KeyError:
106 106 # Cache miss - recurse
107 107 todo.append(rev)
108 108 todo.extend(p.rev() for p in ctx.parents())
109 109 continue
110 110 latesttags[rev] = pdate, pdist + 1, ptag
111 111 return latesttags[rev]
112 112
113 113 def getrenamedfn(repo, endrev=None):
114 114 rcache = {}
115 115 if endrev is None:
116 116 endrev = len(repo)
117 117
118 118 def getrenamed(fn, rev):
119 119 '''looks up all renames for a file (up to endrev) the first
120 120 time the file is given. It indexes on the changerev and only
121 121 parses the manifest if linkrev != changerev.
122 122 Returns rename info for fn at changerev rev.'''
123 123 if fn not in rcache:
124 124 rcache[fn] = {}
125 125 fl = repo.file(fn)
126 126 for i in fl:
127 127 lr = fl.linkrev(i)
128 128 renamed = fl.renamed(fl.node(i))
129 129 rcache[fn][lr] = renamed
130 130 if lr >= endrev:
131 131 break
132 132 if rev in rcache[fn]:
133 133 return rcache[fn][rev]
134 134
135 135 # If linkrev != rev (i.e. rev not found in rcache) fallback to
136 136 # filectx logic.
137 137 try:
138 138 return repo[rev][fn].renamed()
139 139 except error.LookupError:
140 140 return None
141 141
142 142 return getrenamed
143 143
144 144
145 145 def showauthor(repo, ctx, templ, **args):
146 146 """:author: String. The unmodified author of the changeset."""
147 147 return ctx.user()
148 148
149 149 def showbisect(repo, ctx, templ, **args):
150 150 """:bisect: String. The changeset bisection status."""
151 151 return hbisect.label(repo, ctx.node())
152 152
153 153 def showbranch(**args):
154 154 """:branch: String. The name of the branch on which the changeset was
155 155 committed.
156 156 """
157 157 return args['ctx'].branch()
158 158
159 159 def showbranches(**args):
160 160 """:branches: List of strings. The name of the branch on which the
161 161 changeset was committed. Will be empty if the branch name was
162 162 default.
163 163 """
164 164 branch = args['ctx'].branch()
165 165 if branch != 'default':
166 166 return showlist('branch', [branch], plural='branches', **args)
167 167
168 168 def showbookmarks(**args):
169 169 """:bookmarks: List of strings. Any bookmarks associated with the
170 170 changeset.
171 171 """
172 172 bookmarks = args['ctx'].bookmarks()
173 173 return showlist('bookmark', bookmarks, **args)
174 174
175 175 def showchildren(**args):
176 176 """:children: List of strings. The children of the changeset."""
177 177 ctx = args['ctx']
178 178 childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()]
179 179 return showlist('children', childrevs, **args)
180 180
181 181 def showdate(repo, ctx, templ, **args):
182 182 """:date: Date information. The date when the changeset was committed."""
183 183 return ctx.date()
184 184
185 185 def showdescription(repo, ctx, templ, **args):
186 186 """:desc: String. The text of the changeset description."""
187 187 return ctx.description().strip()
188 188
189 189 def showdiffstat(repo, ctx, templ, **args):
190 190 """:diffstat: String. Statistics of changes with the following format:
191 191 "modified files: +added/-removed lines"
192 192 """
193 193 stats = patch.diffstatdata(util.iterlines(ctx.diff()))
194 194 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
195 195 return '%s: +%s/-%s' % (len(stats), adds, removes)
196 196
197 197 def showextras(**args):
198 198 templ = args['templ']
199 199 for key, value in sorted(args['ctx'].extra().items()):
200 200 args = args.copy()
201 201 args.update(dict(key=key, value=value))
202 202 yield templ('extra', **args)
203 203
204 204 def showfileadds(**args):
205 205 """:file_adds: List of strings. Files added by this changeset."""
206 206 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
207 207 return showlist('file_add', getfiles(repo, ctx, revcache)[1], **args)
208 208
209 209 def showfilecopies(**args):
210 210 """:file_copies: List of strings. Files copied in this changeset with
211 211 their sources.
212 212 """
213 213 cache, ctx = args['cache'], args['ctx']
214 214 copies = args['revcache'].get('copies')
215 215 if copies is None:
216 216 if 'getrenamed' not in cache:
217 217 cache['getrenamed'] = getrenamedfn(args['repo'])
218 218 copies = []
219 219 getrenamed = cache['getrenamed']
220 220 for fn in ctx.files():
221 221 rename = getrenamed(fn, ctx.rev())
222 222 if rename:
223 223 copies.append((fn, rename[0]))
224 224
225 225 c = [{'name': x[0], 'source': x[1]} for x in copies]
226 226 return showlist('file_copy', c, plural='file_copies', **args)
227 227
228 228 # showfilecopiesswitch() displays file copies only if copy records are
229 229 # provided before calling the templater, usually with a --copies
230 230 # command line switch.
231 231 def showfilecopiesswitch(**args):
232 232 """:file_copies_switch: List of strings. Like "file_copies" but displayed
233 233 only if the --copied switch is set.
234 234 """
235 235 copies = args['revcache'].get('copies') or []
236 236 c = [{'name': x[0], 'source': x[1]} for x in copies]
237 237 return showlist('file_copy', c, plural='file_copies', **args)
238 238
239 239 def showfiledels(**args):
240 240 """:file_dels: List of strings. Files removed by this changeset."""
241 241 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
242 242 return showlist('file_del', getfiles(repo, ctx, revcache)[2], **args)
243 243
244 244 def showfilemods(**args):
245 245 """:file_mods: List of strings. Files modified by this changeset."""
246 246 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
247 247 return showlist('file_mod', getfiles(repo, ctx, revcache)[0], **args)
248 248
249 249 def showfiles(**args):
250 250 """:files: List of strings. All files modified, added, or removed by this
251 251 changeset.
252 252 """
253 253 return showlist('file', args['ctx'].files(), **args)
254 254
255 255 def showlatesttag(repo, ctx, templ, cache, **args):
256 256 """:latesttag: String. Most recent global tag in the ancestors of this
257 257 changeset.
258 258 """
259 259 return getlatesttags(repo, ctx, cache)[2]
260 260
261 261 def showlatesttagdistance(repo, ctx, templ, cache, **args):
262 262 """:latesttagdistance: Integer. Longest path to the latest tag."""
263 263 return getlatesttags(repo, ctx, cache)[1]
264 264
265 265 def showmanifest(**args):
266 266 repo, ctx, templ = args['repo'], args['ctx'], args['templ']
267 267 args = args.copy()
268 268 args.update(dict(rev=repo.manifest.rev(ctx.changeset()[0]),
269 269 node=hex(ctx.changeset()[0])))
270 270 return templ('manifest', **args)
271 271
272 272 def shownode(repo, ctx, templ, **args):
273 273 """:node: String. The changeset identification hash, as a 40 hexadecimal
274 274 digit string.
275 275 """
276 276 return ctx.hex()
277 277
278 def showp1rev(repo, ctx, templ, **args):
279 """:p1rev: Integer. The repository-local revision number of the changeset's
280 first parent, or -1 if the changeset has no parents."""
281 return ctx.p1().rev()
282
283 def showp2rev(repo, ctx, templ, **args):
284 """:p2rev: Integer. The repository-local revision number of the changeset's
285 second parent, or -1 if the changeset has no second parent."""
286 return ctx.p2().rev()
287
288 def showp1node(repo, ctx, templ, **args):
289 """:p1node: String. The identification hash of the changeset's first parent,
290 as a 40 digit hexadecimal string. If the changeset has no parents, all
291 digits are 0."""
292 return ctx.p1().hex()
293
294 def showp2node(repo, ctx, templ, **args):
295 """:p2node: String. The identification hash of the changeset's second
296 parent, as a 40 digit hexadecimal string. If the changeset has no second
297 parent, all digits are 0."""
298 return ctx.p2().hex()
299
278 300 def showphase(repo, ctx, templ, **args):
279 301 """:phase: String. The changeset phase name."""
280 302 return ctx.phasestr()
281 303
282 304 def showphaseidx(repo, ctx, templ, **args):
283 305 """:phaseidx: Integer. The changeset phase index."""
284 306 return ctx.phase()
285 307
286 308 def showrev(repo, ctx, templ, **args):
287 309 """:rev: Integer. The repository-local changeset revision number."""
288 310 return ctx.rev()
289 311
290 312 def showtags(**args):
291 313 """:tags: List of strings. Any tags associated with the changeset."""
292 314 return showlist('tag', args['ctx'].tags(), **args)
293 315
294 316 # keywords are callables like:
295 317 # fn(repo, ctx, templ, cache, revcache, **args)
296 318 # with:
297 319 # repo - current repository instance
298 320 # ctx - the changectx being displayed
299 321 # templ - the templater instance
300 322 # cache - a cache dictionary for the whole templater run
301 323 # revcache - a cache dictionary for the current revision
302 324 keywords = {
303 325 'author': showauthor,
304 326 'bisect': showbisect,
305 327 'branch': showbranch,
306 328 'branches': showbranches,
307 329 'bookmarks': showbookmarks,
308 330 'children': showchildren,
309 331 'date': showdate,
310 332 'desc': showdescription,
311 333 'diffstat': showdiffstat,
312 334 'extras': showextras,
313 335 'file_adds': showfileadds,
314 336 'file_copies': showfilecopies,
315 337 'file_copies_switch': showfilecopiesswitch,
316 338 'file_dels': showfiledels,
317 339 'file_mods': showfilemods,
318 340 'files': showfiles,
319 341 'latesttag': showlatesttag,
320 342 'latesttagdistance': showlatesttagdistance,
321 343 'manifest': showmanifest,
322 344 'node': shownode,
345 'p1rev': showp1rev,
346 'p1node': showp1node,
347 'p2rev': showp2rev,
348 'p2node': showp2node,
323 349 'phase': showphase,
324 350 'phaseidx': showphaseidx,
325 351 'rev': showrev,
326 352 'tags': showtags,
327 353 }
328 354
329 355 def _showparents(**args):
330 356 """:parents: List of strings. The parents of the changeset in "rev:node"
331 357 format. If the changeset has only one "natural" parent (the predecessor
332 358 revision) nothing is shown."""
333 359 pass
334 360
335 361 dockeywords = {
336 362 'parents': _showparents,
337 363 }
338 364 dockeywords.update(keywords)
339 365
340 366 # tell hggettext to extract docstrings from these functions:
341 367 i18nfunctions = dockeywords.values()
@@ -1,1390 +1,1498 b''
1 1 $ hg init a
2 2 $ cd a
3 3 $ echo a > a
4 4 $ hg add a
5 5 $ echo line 1 > b
6 6 $ echo line 2 >> b
7 7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
8 8
9 9 $ hg add b
10 10 $ echo other 1 > c
11 11 $ echo other 2 >> c
12 12 $ echo >> c
13 13 $ echo other 3 >> c
14 14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
15 15
16 16 $ hg add c
17 17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
18 18 $ echo c >> c
19 19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
20 20
21 21 $ echo foo > .hg/branch
22 22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
23 23
24 24 $ hg co -q 3
25 25 $ echo other 4 >> d
26 26 $ hg add d
27 27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
28 28
29 29 $ hg merge -q foo
30 30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
31 31
32 32 Second branch starting at nullrev:
33 33
34 34 $ hg update null
35 35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
36 36 $ echo second > second
37 37 $ hg add second
38 38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
39 39 created new head
40 40
41 41 $ echo third > third
42 42 $ hg add third
43 43 $ hg mv second fourth
44 44 $ hg commit -m third -d "2020-01-01 10:01"
45 45
46 46 Quoting for ui.logtemplate
47 47
48 48 $ hg tip --config "ui.logtemplate={rev}\n"
49 49 8
50 50 $ hg tip --config "ui.logtemplate='{rev}\n'"
51 51 8
52 52 $ hg tip --config 'ui.logtemplate="{rev}\n"'
53 53 8
54 54
55 55 Make sure user/global hgrc does not affect tests
56 56
57 57 $ echo '[ui]' > .hg/hgrc
58 58 $ echo 'logtemplate =' >> .hg/hgrc
59 59 $ echo 'style =' >> .hg/hgrc
60 60
61 61 Default style is like normal output:
62 62
63 63 $ hg log > log.out
64 64 $ hg log --style default > style.out
65 65 $ cmp log.out style.out || diff -u log.out style.out
66 66
67 67 $ hg log -v > log.out
68 68 $ hg log -v --style default > style.out
69 69 $ cmp log.out style.out || diff -u log.out style.out
70 70
71 71 $ hg log --debug > log.out
72 72 $ hg log --debug --style default > style.out
73 73 $ cmp log.out style.out || diff -u log.out style.out
74 74
75 75 Revision with no copies (used to print a traceback):
76 76
77 77 $ hg tip -v --template '\n'
78 78
79 79
80 80 Compact style works:
81 81
82 82 $ hg log --style compact
83 83 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
84 84 third
85 85
86 86 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
87 87 second
88 88
89 89 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
90 90 merge
91 91
92 92 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
93 93 new head
94 94
95 95 4 bbe44766e73d 1970-01-17 04:53 +0000 person
96 96 new branch
97 97
98 98 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
99 99 no user, no domain
100 100
101 101 2 97054abb4ab8 1970-01-14 21:20 +0000 other
102 102 no person
103 103
104 104 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
105 105 other 1
106 106
107 107 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
108 108 line 1
109 109
110 110
111 111 $ hg log -v --style compact
112 112 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
113 113 third
114 114
115 115 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
116 116 second
117 117
118 118 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
119 119 merge
120 120
121 121 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
122 122 new head
123 123
124 124 4 bbe44766e73d 1970-01-17 04:53 +0000 person
125 125 new branch
126 126
127 127 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
128 128 no user, no domain
129 129
130 130 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
131 131 no person
132 132
133 133 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
134 134 other 1
135 135 other 2
136 136
137 137 other 3
138 138
139 139 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
140 140 line 1
141 141 line 2
142 142
143 143
144 144 $ hg log --debug --style compact
145 145 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
146 146 third
147 147
148 148 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
149 149 second
150 150
151 151 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
152 152 merge
153 153
154 154 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
155 155 new head
156 156
157 157 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
158 158 new branch
159 159
160 160 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
161 161 no user, no domain
162 162
163 163 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
164 164 no person
165 165
166 166 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
167 167 other 1
168 168 other 2
169 169
170 170 other 3
171 171
172 172 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
173 173 line 1
174 174 line 2
175 175
176 176
177 177 Test xml styles:
178 178
179 179 $ hg log --style xml
180 180 <?xml version="1.0"?>
181 181 <log>
182 182 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
183 183 <tag>tip</tag>
184 184 <author email="test">test</author>
185 185 <date>2020-01-01T10:01:00+00:00</date>
186 186 <msg xml:space="preserve">third</msg>
187 187 </logentry>
188 188 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
189 189 <parent revision="-1" node="0000000000000000000000000000000000000000" />
190 190 <author email="user@hostname">User Name</author>
191 191 <date>1970-01-12T13:46:40+00:00</date>
192 192 <msg xml:space="preserve">second</msg>
193 193 </logentry>
194 194 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
195 195 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
196 196 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
197 197 <author email="person">person</author>
198 198 <date>1970-01-18T08:40:01+00:00</date>
199 199 <msg xml:space="preserve">merge</msg>
200 200 </logentry>
201 201 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
202 202 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
203 203 <author email="person">person</author>
204 204 <date>1970-01-18T08:40:00+00:00</date>
205 205 <msg xml:space="preserve">new head</msg>
206 206 </logentry>
207 207 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
208 208 <branch>foo</branch>
209 209 <author email="person">person</author>
210 210 <date>1970-01-17T04:53:20+00:00</date>
211 211 <msg xml:space="preserve">new branch</msg>
212 212 </logentry>
213 213 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
214 214 <author email="person">person</author>
215 215 <date>1970-01-16T01:06:40+00:00</date>
216 216 <msg xml:space="preserve">no user, no domain</msg>
217 217 </logentry>
218 218 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
219 219 <author email="other@place">other</author>
220 220 <date>1970-01-14T21:20:00+00:00</date>
221 221 <msg xml:space="preserve">no person</msg>
222 222 </logentry>
223 223 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
224 224 <author email="other@place">A. N. Other</author>
225 225 <date>1970-01-13T17:33:20+00:00</date>
226 226 <msg xml:space="preserve">other 1
227 227 other 2
228 228
229 229 other 3</msg>
230 230 </logentry>
231 231 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
232 232 <author email="user@hostname">User Name</author>
233 233 <date>1970-01-12T13:46:40+00:00</date>
234 234 <msg xml:space="preserve">line 1
235 235 line 2</msg>
236 236 </logentry>
237 237 </log>
238 238
239 239 $ hg log -v --style xml
240 240 <?xml version="1.0"?>
241 241 <log>
242 242 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
243 243 <tag>tip</tag>
244 244 <author email="test">test</author>
245 245 <date>2020-01-01T10:01:00+00:00</date>
246 246 <msg xml:space="preserve">third</msg>
247 247 <paths>
248 248 <path action="A">fourth</path>
249 249 <path action="A">third</path>
250 250 <path action="R">second</path>
251 251 </paths>
252 252 <copies>
253 253 <copy source="second">fourth</copy>
254 254 </copies>
255 255 </logentry>
256 256 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
257 257 <parent revision="-1" node="0000000000000000000000000000000000000000" />
258 258 <author email="user@hostname">User Name</author>
259 259 <date>1970-01-12T13:46:40+00:00</date>
260 260 <msg xml:space="preserve">second</msg>
261 261 <paths>
262 262 <path action="A">second</path>
263 263 </paths>
264 264 </logentry>
265 265 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
266 266 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
267 267 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
268 268 <author email="person">person</author>
269 269 <date>1970-01-18T08:40:01+00:00</date>
270 270 <msg xml:space="preserve">merge</msg>
271 271 <paths>
272 272 </paths>
273 273 </logentry>
274 274 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
275 275 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
276 276 <author email="person">person</author>
277 277 <date>1970-01-18T08:40:00+00:00</date>
278 278 <msg xml:space="preserve">new head</msg>
279 279 <paths>
280 280 <path action="A">d</path>
281 281 </paths>
282 282 </logentry>
283 283 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
284 284 <branch>foo</branch>
285 285 <author email="person">person</author>
286 286 <date>1970-01-17T04:53:20+00:00</date>
287 287 <msg xml:space="preserve">new branch</msg>
288 288 <paths>
289 289 </paths>
290 290 </logentry>
291 291 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
292 292 <author email="person">person</author>
293 293 <date>1970-01-16T01:06:40+00:00</date>
294 294 <msg xml:space="preserve">no user, no domain</msg>
295 295 <paths>
296 296 <path action="M">c</path>
297 297 </paths>
298 298 </logentry>
299 299 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
300 300 <author email="other@place">other</author>
301 301 <date>1970-01-14T21:20:00+00:00</date>
302 302 <msg xml:space="preserve">no person</msg>
303 303 <paths>
304 304 <path action="A">c</path>
305 305 </paths>
306 306 </logentry>
307 307 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
308 308 <author email="other@place">A. N. Other</author>
309 309 <date>1970-01-13T17:33:20+00:00</date>
310 310 <msg xml:space="preserve">other 1
311 311 other 2
312 312
313 313 other 3</msg>
314 314 <paths>
315 315 <path action="A">b</path>
316 316 </paths>
317 317 </logentry>
318 318 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
319 319 <author email="user@hostname">User Name</author>
320 320 <date>1970-01-12T13:46:40+00:00</date>
321 321 <msg xml:space="preserve">line 1
322 322 line 2</msg>
323 323 <paths>
324 324 <path action="A">a</path>
325 325 </paths>
326 326 </logentry>
327 327 </log>
328 328
329 329 $ hg log --debug --style xml
330 330 <?xml version="1.0"?>
331 331 <log>
332 332 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
333 333 <tag>tip</tag>
334 334 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
335 335 <parent revision="-1" node="0000000000000000000000000000000000000000" />
336 336 <author email="test">test</author>
337 337 <date>2020-01-01T10:01:00+00:00</date>
338 338 <msg xml:space="preserve">third</msg>
339 339 <paths>
340 340 <path action="A">fourth</path>
341 341 <path action="A">third</path>
342 342 <path action="R">second</path>
343 343 </paths>
344 344 <copies>
345 345 <copy source="second">fourth</copy>
346 346 </copies>
347 347 <extra key="branch">default</extra>
348 348 </logentry>
349 349 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
350 350 <parent revision="-1" node="0000000000000000000000000000000000000000" />
351 351 <parent revision="-1" node="0000000000000000000000000000000000000000" />
352 352 <author email="user@hostname">User Name</author>
353 353 <date>1970-01-12T13:46:40+00:00</date>
354 354 <msg xml:space="preserve">second</msg>
355 355 <paths>
356 356 <path action="A">second</path>
357 357 </paths>
358 358 <extra key="branch">default</extra>
359 359 </logentry>
360 360 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
361 361 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
362 362 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
363 363 <author email="person">person</author>
364 364 <date>1970-01-18T08:40:01+00:00</date>
365 365 <msg xml:space="preserve">merge</msg>
366 366 <paths>
367 367 </paths>
368 368 <extra key="branch">default</extra>
369 369 </logentry>
370 370 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
371 371 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
372 372 <parent revision="-1" node="0000000000000000000000000000000000000000" />
373 373 <author email="person">person</author>
374 374 <date>1970-01-18T08:40:00+00:00</date>
375 375 <msg xml:space="preserve">new head</msg>
376 376 <paths>
377 377 <path action="A">d</path>
378 378 </paths>
379 379 <extra key="branch">default</extra>
380 380 </logentry>
381 381 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
382 382 <branch>foo</branch>
383 383 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
384 384 <parent revision="-1" node="0000000000000000000000000000000000000000" />
385 385 <author email="person">person</author>
386 386 <date>1970-01-17T04:53:20+00:00</date>
387 387 <msg xml:space="preserve">new branch</msg>
388 388 <paths>
389 389 </paths>
390 390 <extra key="branch">foo</extra>
391 391 </logentry>
392 392 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
393 393 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
394 394 <parent revision="-1" node="0000000000000000000000000000000000000000" />
395 395 <author email="person">person</author>
396 396 <date>1970-01-16T01:06:40+00:00</date>
397 397 <msg xml:space="preserve">no user, no domain</msg>
398 398 <paths>
399 399 <path action="M">c</path>
400 400 </paths>
401 401 <extra key="branch">default</extra>
402 402 </logentry>
403 403 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
404 404 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
405 405 <parent revision="-1" node="0000000000000000000000000000000000000000" />
406 406 <author email="other@place">other</author>
407 407 <date>1970-01-14T21:20:00+00:00</date>
408 408 <msg xml:space="preserve">no person</msg>
409 409 <paths>
410 410 <path action="A">c</path>
411 411 </paths>
412 412 <extra key="branch">default</extra>
413 413 </logentry>
414 414 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
415 415 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
416 416 <parent revision="-1" node="0000000000000000000000000000000000000000" />
417 417 <author email="other@place">A. N. Other</author>
418 418 <date>1970-01-13T17:33:20+00:00</date>
419 419 <msg xml:space="preserve">other 1
420 420 other 2
421 421
422 422 other 3</msg>
423 423 <paths>
424 424 <path action="A">b</path>
425 425 </paths>
426 426 <extra key="branch">default</extra>
427 427 </logentry>
428 428 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
429 429 <parent revision="-1" node="0000000000000000000000000000000000000000" />
430 430 <parent revision="-1" node="0000000000000000000000000000000000000000" />
431 431 <author email="user@hostname">User Name</author>
432 432 <date>1970-01-12T13:46:40+00:00</date>
433 433 <msg xml:space="preserve">line 1
434 434 line 2</msg>
435 435 <paths>
436 436 <path action="A">a</path>
437 437 </paths>
438 438 <extra key="branch">default</extra>
439 439 </logentry>
440 440 </log>
441 441
442 442
443 443 Error if style not readable:
444 444
445 445 #if unix-permissions
446 446 $ touch q
447 447 $ chmod 0 q
448 448 $ hg log --style ./q
449 449 abort: Permission denied: ./q
450 450 [255]
451 451 #endif
452 452
453 453 Error if no style:
454 454
455 455 $ hg log --style notexist
456 456 abort: style not found: notexist
457 457 [255]
458 458
459 459 Error if style missing key:
460 460
461 461 $ echo 'q = q' > t
462 462 $ hg log --style ./t
463 463 abort: "changeset" not in template map
464 464 [255]
465 465
466 466 Error if style missing value:
467 467
468 468 $ echo 'changeset =' > t
469 469 $ hg log --style t
470 470 abort: t:1: missing value
471 471 [255]
472 472
473 473 Error if include fails:
474 474
475 475 $ echo 'changeset = q' >> t
476 476 #if unix-permissions
477 477 $ hg log --style ./t
478 478 abort: template file ./q: Permission denied
479 479 [255]
480 480 $ rm q
481 481 #endif
482 482
483 483 Include works:
484 484
485 485 $ echo '{rev}' > q
486 486 $ hg log --style ./t
487 487 8
488 488 7
489 489 6
490 490 5
491 491 4
492 492 3
493 493 2
494 494 1
495 495 0
496 496
497 497 ui.style works:
498 498
499 499 $ echo '[ui]' > .hg/hgrc
500 500 $ echo 'style = t' >> .hg/hgrc
501 501 $ hg log
502 502 8
503 503 7
504 504 6
505 505 5
506 506 4
507 507 3
508 508 2
509 509 1
510 510 0
511 511
512 512
513 513 Issue338:
514 514
515 515 $ hg log --style=changelog > changelog
516 516
517 517 $ cat changelog
518 518 2020-01-01 test <test>
519 519
520 520 * fourth, second, third:
521 521 third
522 522 [95c24699272e] [tip]
523 523
524 524 1970-01-12 User Name <user@hostname>
525 525
526 526 * second:
527 527 second
528 528 [29114dbae42b]
529 529
530 530 1970-01-18 person <person>
531 531
532 532 * merge
533 533 [d41e714fe50d]
534 534
535 535 * d:
536 536 new head
537 537 [13207e5a10d9]
538 538
539 539 1970-01-17 person <person>
540 540
541 541 * new branch
542 542 [bbe44766e73d] <foo>
543 543
544 544 1970-01-16 person <person>
545 545
546 546 * c:
547 547 no user, no domain
548 548 [10e46f2dcbf4]
549 549
550 550 1970-01-14 other <other@place>
551 551
552 552 * c:
553 553 no person
554 554 [97054abb4ab8]
555 555
556 556 1970-01-13 A. N. Other <other@place>
557 557
558 558 * b:
559 559 other 1 other 2
560 560
561 561 other 3
562 562 [b608e9d1a3f0]
563 563
564 564 1970-01-12 User Name <user@hostname>
565 565
566 566 * a:
567 567 line 1 line 2
568 568 [1e4e1b8f71e0]
569 569
570 570
571 571 Issue2130: xml output for 'hg heads' is malformed
572 572
573 573 $ hg heads --style changelog
574 574 2020-01-01 test <test>
575 575
576 576 * fourth, second, third:
577 577 third
578 578 [95c24699272e] [tip]
579 579
580 580 1970-01-18 person <person>
581 581
582 582 * merge
583 583 [d41e714fe50d]
584 584
585 585 1970-01-17 person <person>
586 586
587 587 * new branch
588 588 [bbe44766e73d] <foo>
589 589
590 590
591 591 Keys work:
592 592
593 593 $ for key in author branch branches date desc file_adds file_dels file_mods \
594 594 > file_copies file_copies_switch files \
595 > manifest node parents rev tags diffstat extras; do
595 > manifest node parents rev tags diffstat extras \
596 > p1rev p2rev p1node p2node; do
596 597 > for mode in '' --verbose --debug; do
597 598 > hg log $mode --template "$key$mode: {$key}\n"
598 599 > done
599 600 > done
600 601 author: test
601 602 author: User Name <user@hostname>
602 603 author: person
603 604 author: person
604 605 author: person
605 606 author: person
606 607 author: other@place
607 608 author: A. N. Other <other@place>
608 609 author: User Name <user@hostname>
609 610 author--verbose: test
610 611 author--verbose: User Name <user@hostname>
611 612 author--verbose: person
612 613 author--verbose: person
613 614 author--verbose: person
614 615 author--verbose: person
615 616 author--verbose: other@place
616 617 author--verbose: A. N. Other <other@place>
617 618 author--verbose: User Name <user@hostname>
618 619 author--debug: test
619 620 author--debug: User Name <user@hostname>
620 621 author--debug: person
621 622 author--debug: person
622 623 author--debug: person
623 624 author--debug: person
624 625 author--debug: other@place
625 626 author--debug: A. N. Other <other@place>
626 627 author--debug: User Name <user@hostname>
627 628 branch: default
628 629 branch: default
629 630 branch: default
630 631 branch: default
631 632 branch: foo
632 633 branch: default
633 634 branch: default
634 635 branch: default
635 636 branch: default
636 637 branch--verbose: default
637 638 branch--verbose: default
638 639 branch--verbose: default
639 640 branch--verbose: default
640 641 branch--verbose: foo
641 642 branch--verbose: default
642 643 branch--verbose: default
643 644 branch--verbose: default
644 645 branch--verbose: default
645 646 branch--debug: default
646 647 branch--debug: default
647 648 branch--debug: default
648 649 branch--debug: default
649 650 branch--debug: foo
650 651 branch--debug: default
651 652 branch--debug: default
652 653 branch--debug: default
653 654 branch--debug: default
654 655 branches:
655 656 branches:
656 657 branches:
657 658 branches:
658 659 branches: foo
659 660 branches:
660 661 branches:
661 662 branches:
662 663 branches:
663 664 branches--verbose:
664 665 branches--verbose:
665 666 branches--verbose:
666 667 branches--verbose:
667 668 branches--verbose: foo
668 669 branches--verbose:
669 670 branches--verbose:
670 671 branches--verbose:
671 672 branches--verbose:
672 673 branches--debug:
673 674 branches--debug:
674 675 branches--debug:
675 676 branches--debug:
676 677 branches--debug: foo
677 678 branches--debug:
678 679 branches--debug:
679 680 branches--debug:
680 681 branches--debug:
681 682 date: 1577872860.00
682 683 date: 1000000.00
683 684 date: 1500001.00
684 685 date: 1500000.00
685 686 date: 1400000.00
686 687 date: 1300000.00
687 688 date: 1200000.00
688 689 date: 1100000.00
689 690 date: 1000000.00
690 691 date--verbose: 1577872860.00
691 692 date--verbose: 1000000.00
692 693 date--verbose: 1500001.00
693 694 date--verbose: 1500000.00
694 695 date--verbose: 1400000.00
695 696 date--verbose: 1300000.00
696 697 date--verbose: 1200000.00
697 698 date--verbose: 1100000.00
698 699 date--verbose: 1000000.00
699 700 date--debug: 1577872860.00
700 701 date--debug: 1000000.00
701 702 date--debug: 1500001.00
702 703 date--debug: 1500000.00
703 704 date--debug: 1400000.00
704 705 date--debug: 1300000.00
705 706 date--debug: 1200000.00
706 707 date--debug: 1100000.00
707 708 date--debug: 1000000.00
708 709 desc: third
709 710 desc: second
710 711 desc: merge
711 712 desc: new head
712 713 desc: new branch
713 714 desc: no user, no domain
714 715 desc: no person
715 716 desc: other 1
716 717 other 2
717 718
718 719 other 3
719 720 desc: line 1
720 721 line 2
721 722 desc--verbose: third
722 723 desc--verbose: second
723 724 desc--verbose: merge
724 725 desc--verbose: new head
725 726 desc--verbose: new branch
726 727 desc--verbose: no user, no domain
727 728 desc--verbose: no person
728 729 desc--verbose: other 1
729 730 other 2
730 731
731 732 other 3
732 733 desc--verbose: line 1
733 734 line 2
734 735 desc--debug: third
735 736 desc--debug: second
736 737 desc--debug: merge
737 738 desc--debug: new head
738 739 desc--debug: new branch
739 740 desc--debug: no user, no domain
740 741 desc--debug: no person
741 742 desc--debug: other 1
742 743 other 2
743 744
744 745 other 3
745 746 desc--debug: line 1
746 747 line 2
747 748 file_adds: fourth third
748 749 file_adds: second
749 750 file_adds:
750 751 file_adds: d
751 752 file_adds:
752 753 file_adds:
753 754 file_adds: c
754 755 file_adds: b
755 756 file_adds: a
756 757 file_adds--verbose: fourth third
757 758 file_adds--verbose: second
758 759 file_adds--verbose:
759 760 file_adds--verbose: d
760 761 file_adds--verbose:
761 762 file_adds--verbose:
762 763 file_adds--verbose: c
763 764 file_adds--verbose: b
764 765 file_adds--verbose: a
765 766 file_adds--debug: fourth third
766 767 file_adds--debug: second
767 768 file_adds--debug:
768 769 file_adds--debug: d
769 770 file_adds--debug:
770 771 file_adds--debug:
771 772 file_adds--debug: c
772 773 file_adds--debug: b
773 774 file_adds--debug: a
774 775 file_dels: second
775 776 file_dels:
776 777 file_dels:
777 778 file_dels:
778 779 file_dels:
779 780 file_dels:
780 781 file_dels:
781 782 file_dels:
782 783 file_dels:
783 784 file_dels--verbose: second
784 785 file_dels--verbose:
785 786 file_dels--verbose:
786 787 file_dels--verbose:
787 788 file_dels--verbose:
788 789 file_dels--verbose:
789 790 file_dels--verbose:
790 791 file_dels--verbose:
791 792 file_dels--verbose:
792 793 file_dels--debug: second
793 794 file_dels--debug:
794 795 file_dels--debug:
795 796 file_dels--debug:
796 797 file_dels--debug:
797 798 file_dels--debug:
798 799 file_dels--debug:
799 800 file_dels--debug:
800 801 file_dels--debug:
801 802 file_mods:
802 803 file_mods:
803 804 file_mods:
804 805 file_mods:
805 806 file_mods:
806 807 file_mods: c
807 808 file_mods:
808 809 file_mods:
809 810 file_mods:
810 811 file_mods--verbose:
811 812 file_mods--verbose:
812 813 file_mods--verbose:
813 814 file_mods--verbose:
814 815 file_mods--verbose:
815 816 file_mods--verbose: c
816 817 file_mods--verbose:
817 818 file_mods--verbose:
818 819 file_mods--verbose:
819 820 file_mods--debug:
820 821 file_mods--debug:
821 822 file_mods--debug:
822 823 file_mods--debug:
823 824 file_mods--debug:
824 825 file_mods--debug: c
825 826 file_mods--debug:
826 827 file_mods--debug:
827 828 file_mods--debug:
828 829 file_copies: fourth (second)
829 830 file_copies:
830 831 file_copies:
831 832 file_copies:
832 833 file_copies:
833 834 file_copies:
834 835 file_copies:
835 836 file_copies:
836 837 file_copies:
837 838 file_copies--verbose: fourth (second)
838 839 file_copies--verbose:
839 840 file_copies--verbose:
840 841 file_copies--verbose:
841 842 file_copies--verbose:
842 843 file_copies--verbose:
843 844 file_copies--verbose:
844 845 file_copies--verbose:
845 846 file_copies--verbose:
846 847 file_copies--debug: fourth (second)
847 848 file_copies--debug:
848 849 file_copies--debug:
849 850 file_copies--debug:
850 851 file_copies--debug:
851 852 file_copies--debug:
852 853 file_copies--debug:
853 854 file_copies--debug:
854 855 file_copies--debug:
855 856 file_copies_switch:
856 857 file_copies_switch:
857 858 file_copies_switch:
858 859 file_copies_switch:
859 860 file_copies_switch:
860 861 file_copies_switch:
861 862 file_copies_switch:
862 863 file_copies_switch:
863 864 file_copies_switch:
864 865 file_copies_switch--verbose:
865 866 file_copies_switch--verbose:
866 867 file_copies_switch--verbose:
867 868 file_copies_switch--verbose:
868 869 file_copies_switch--verbose:
869 870 file_copies_switch--verbose:
870 871 file_copies_switch--verbose:
871 872 file_copies_switch--verbose:
872 873 file_copies_switch--verbose:
873 874 file_copies_switch--debug:
874 875 file_copies_switch--debug:
875 876 file_copies_switch--debug:
876 877 file_copies_switch--debug:
877 878 file_copies_switch--debug:
878 879 file_copies_switch--debug:
879 880 file_copies_switch--debug:
880 881 file_copies_switch--debug:
881 882 file_copies_switch--debug:
882 883 files: fourth second third
883 884 files: second
884 885 files:
885 886 files: d
886 887 files:
887 888 files: c
888 889 files: c
889 890 files: b
890 891 files: a
891 892 files--verbose: fourth second third
892 893 files--verbose: second
893 894 files--verbose:
894 895 files--verbose: d
895 896 files--verbose:
896 897 files--verbose: c
897 898 files--verbose: c
898 899 files--verbose: b
899 900 files--verbose: a
900 901 files--debug: fourth second third
901 902 files--debug: second
902 903 files--debug:
903 904 files--debug: d
904 905 files--debug:
905 906 files--debug: c
906 907 files--debug: c
907 908 files--debug: b
908 909 files--debug: a
909 910 manifest: 6:94961b75a2da
910 911 manifest: 5:f2dbc354b94e
911 912 manifest: 4:4dc3def4f9b4
912 913 manifest: 4:4dc3def4f9b4
913 914 manifest: 3:cb5a1327723b
914 915 manifest: 3:cb5a1327723b
915 916 manifest: 2:6e0e82995c35
916 917 manifest: 1:4e8d705b1e53
917 918 manifest: 0:a0c8bcbbb45c
918 919 manifest--verbose: 6:94961b75a2da
919 920 manifest--verbose: 5:f2dbc354b94e
920 921 manifest--verbose: 4:4dc3def4f9b4
921 922 manifest--verbose: 4:4dc3def4f9b4
922 923 manifest--verbose: 3:cb5a1327723b
923 924 manifest--verbose: 3:cb5a1327723b
924 925 manifest--verbose: 2:6e0e82995c35
925 926 manifest--verbose: 1:4e8d705b1e53
926 927 manifest--verbose: 0:a0c8bcbbb45c
927 928 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
928 929 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
929 930 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
930 931 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
931 932 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
932 933 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
933 934 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
934 935 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
935 936 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
936 937 node: 95c24699272ef57d062b8bccc32c878bf841784a
937 938 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
938 939 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
939 940 node: 13207e5a10d9fd28ec424934298e176197f2c67f
940 941 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
941 942 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
942 943 node: 97054abb4ab824450e9164180baf491ae0078465
943 944 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
944 945 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
945 946 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
946 947 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
947 948 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
948 949 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
949 950 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
950 951 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
951 952 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
952 953 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
953 954 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
954 955 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
955 956 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
956 957 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
957 958 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
958 959 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
959 960 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
960 961 node--debug: 97054abb4ab824450e9164180baf491ae0078465
961 962 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
962 963 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
963 964 parents:
964 965 parents: -1:000000000000
965 966 parents: 5:13207e5a10d9 4:bbe44766e73d
966 967 parents: 3:10e46f2dcbf4
967 968 parents:
968 969 parents:
969 970 parents:
970 971 parents:
971 972 parents:
972 973 parents--verbose:
973 974 parents--verbose: -1:000000000000
974 975 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
975 976 parents--verbose: 3:10e46f2dcbf4
976 977 parents--verbose:
977 978 parents--verbose:
978 979 parents--verbose:
979 980 parents--verbose:
980 981 parents--verbose:
981 982 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
982 983 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
983 984 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
984 985 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
985 986 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
986 987 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
987 988 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
988 989 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
989 990 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
990 991 rev: 8
991 992 rev: 7
992 993 rev: 6
993 994 rev: 5
994 995 rev: 4
995 996 rev: 3
996 997 rev: 2
997 998 rev: 1
998 999 rev: 0
999 1000 rev--verbose: 8
1000 1001 rev--verbose: 7
1001 1002 rev--verbose: 6
1002 1003 rev--verbose: 5
1003 1004 rev--verbose: 4
1004 1005 rev--verbose: 3
1005 1006 rev--verbose: 2
1006 1007 rev--verbose: 1
1007 1008 rev--verbose: 0
1008 1009 rev--debug: 8
1009 1010 rev--debug: 7
1010 1011 rev--debug: 6
1011 1012 rev--debug: 5
1012 1013 rev--debug: 4
1013 1014 rev--debug: 3
1014 1015 rev--debug: 2
1015 1016 rev--debug: 1
1016 1017 rev--debug: 0
1017 1018 tags: tip
1018 1019 tags:
1019 1020 tags:
1020 1021 tags:
1021 1022 tags:
1022 1023 tags:
1023 1024 tags:
1024 1025 tags:
1025 1026 tags:
1026 1027 tags--verbose: tip
1027 1028 tags--verbose:
1028 1029 tags--verbose:
1029 1030 tags--verbose:
1030 1031 tags--verbose:
1031 1032 tags--verbose:
1032 1033 tags--verbose:
1033 1034 tags--verbose:
1034 1035 tags--verbose:
1035 1036 tags--debug: tip
1036 1037 tags--debug:
1037 1038 tags--debug:
1038 1039 tags--debug:
1039 1040 tags--debug:
1040 1041 tags--debug:
1041 1042 tags--debug:
1042 1043 tags--debug:
1043 1044 tags--debug:
1044 1045 diffstat: 3: +2/-1
1045 1046 diffstat: 1: +1/-0
1046 1047 diffstat: 0: +0/-0
1047 1048 diffstat: 1: +1/-0
1048 1049 diffstat: 0: +0/-0
1049 1050 diffstat: 1: +1/-0
1050 1051 diffstat: 1: +4/-0
1051 1052 diffstat: 1: +2/-0
1052 1053 diffstat: 1: +1/-0
1053 1054 diffstat--verbose: 3: +2/-1
1054 1055 diffstat--verbose: 1: +1/-0
1055 1056 diffstat--verbose: 0: +0/-0
1056 1057 diffstat--verbose: 1: +1/-0
1057 1058 diffstat--verbose: 0: +0/-0
1058 1059 diffstat--verbose: 1: +1/-0
1059 1060 diffstat--verbose: 1: +4/-0
1060 1061 diffstat--verbose: 1: +2/-0
1061 1062 diffstat--verbose: 1: +1/-0
1062 1063 diffstat--debug: 3: +2/-1
1063 1064 diffstat--debug: 1: +1/-0
1064 1065 diffstat--debug: 0: +0/-0
1065 1066 diffstat--debug: 1: +1/-0
1066 1067 diffstat--debug: 0: +0/-0
1067 1068 diffstat--debug: 1: +1/-0
1068 1069 diffstat--debug: 1: +4/-0
1069 1070 diffstat--debug: 1: +2/-0
1070 1071 diffstat--debug: 1: +1/-0
1071 1072 extras: branch=default
1072 1073 extras: branch=default
1073 1074 extras: branch=default
1074 1075 extras: branch=default
1075 1076 extras: branch=foo
1076 1077 extras: branch=default
1077 1078 extras: branch=default
1078 1079 extras: branch=default
1079 1080 extras: branch=default
1080 1081 extras--verbose: branch=default
1081 1082 extras--verbose: branch=default
1082 1083 extras--verbose: branch=default
1083 1084 extras--verbose: branch=default
1084 1085 extras--verbose: branch=foo
1085 1086 extras--verbose: branch=default
1086 1087 extras--verbose: branch=default
1087 1088 extras--verbose: branch=default
1088 1089 extras--verbose: branch=default
1089 1090 extras--debug: branch=default
1090 1091 extras--debug: branch=default
1091 1092 extras--debug: branch=default
1092 1093 extras--debug: branch=default
1093 1094 extras--debug: branch=foo
1094 1095 extras--debug: branch=default
1095 1096 extras--debug: branch=default
1096 1097 extras--debug: branch=default
1097 1098 extras--debug: branch=default
1098
1099 p1rev: 7
1100 p1rev: -1
1101 p1rev: 5
1102 p1rev: 3
1103 p1rev: 3
1104 p1rev: 2
1105 p1rev: 1
1106 p1rev: 0
1107 p1rev: -1
1108 p1rev--verbose: 7
1109 p1rev--verbose: -1
1110 p1rev--verbose: 5
1111 p1rev--verbose: 3
1112 p1rev--verbose: 3
1113 p1rev--verbose: 2
1114 p1rev--verbose: 1
1115 p1rev--verbose: 0
1116 p1rev--verbose: -1
1117 p1rev--debug: 7
1118 p1rev--debug: -1
1119 p1rev--debug: 5
1120 p1rev--debug: 3
1121 p1rev--debug: 3
1122 p1rev--debug: 2
1123 p1rev--debug: 1
1124 p1rev--debug: 0
1125 p1rev--debug: -1
1126 p2rev: -1
1127 p2rev: -1
1128 p2rev: 4
1129 p2rev: -1
1130 p2rev: -1
1131 p2rev: -1
1132 p2rev: -1
1133 p2rev: -1
1134 p2rev: -1
1135 p2rev--verbose: -1
1136 p2rev--verbose: -1
1137 p2rev--verbose: 4
1138 p2rev--verbose: -1
1139 p2rev--verbose: -1
1140 p2rev--verbose: -1
1141 p2rev--verbose: -1
1142 p2rev--verbose: -1
1143 p2rev--verbose: -1
1144 p2rev--debug: -1
1145 p2rev--debug: -1
1146 p2rev--debug: 4
1147 p2rev--debug: -1
1148 p2rev--debug: -1
1149 p2rev--debug: -1
1150 p2rev--debug: -1
1151 p2rev--debug: -1
1152 p2rev--debug: -1
1153 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1154 p1node: 0000000000000000000000000000000000000000
1155 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1156 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1157 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1158 p1node: 97054abb4ab824450e9164180baf491ae0078465
1159 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1160 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1161 p1node: 0000000000000000000000000000000000000000
1162 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1163 p1node--verbose: 0000000000000000000000000000000000000000
1164 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1165 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1166 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1167 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1168 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1169 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1170 p1node--verbose: 0000000000000000000000000000000000000000
1171 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1172 p1node--debug: 0000000000000000000000000000000000000000
1173 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1174 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1175 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1176 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1177 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1178 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1179 p1node--debug: 0000000000000000000000000000000000000000
1180 p2node: 0000000000000000000000000000000000000000
1181 p2node: 0000000000000000000000000000000000000000
1182 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1183 p2node: 0000000000000000000000000000000000000000
1184 p2node: 0000000000000000000000000000000000000000
1185 p2node: 0000000000000000000000000000000000000000
1186 p2node: 0000000000000000000000000000000000000000
1187 p2node: 0000000000000000000000000000000000000000
1188 p2node: 0000000000000000000000000000000000000000
1189 p2node--verbose: 0000000000000000000000000000000000000000
1190 p2node--verbose: 0000000000000000000000000000000000000000
1191 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1192 p2node--verbose: 0000000000000000000000000000000000000000
1193 p2node--verbose: 0000000000000000000000000000000000000000
1194 p2node--verbose: 0000000000000000000000000000000000000000
1195 p2node--verbose: 0000000000000000000000000000000000000000
1196 p2node--verbose: 0000000000000000000000000000000000000000
1197 p2node--verbose: 0000000000000000000000000000000000000000
1198 p2node--debug: 0000000000000000000000000000000000000000
1199 p2node--debug: 0000000000000000000000000000000000000000
1200 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1201 p2node--debug: 0000000000000000000000000000000000000000
1202 p2node--debug: 0000000000000000000000000000000000000000
1203 p2node--debug: 0000000000000000000000000000000000000000
1204 p2node--debug: 0000000000000000000000000000000000000000
1205 p2node--debug: 0000000000000000000000000000000000000000
1206 p2node--debug: 0000000000000000000000000000000000000000
1099 1207
1100 1208 Filters work:
1101 1209
1102 1210 $ hg log --template '{author|domain}\n'
1103 1211
1104 1212 hostname
1105 1213
1106 1214
1107 1215
1108 1216
1109 1217 place
1110 1218 place
1111 1219 hostname
1112 1220
1113 1221 $ hg log --template '{author|person}\n'
1114 1222 test
1115 1223 User Name
1116 1224 person
1117 1225 person
1118 1226 person
1119 1227 person
1120 1228 other
1121 1229 A. N. Other
1122 1230 User Name
1123 1231
1124 1232 $ hg log --template '{author|user}\n'
1125 1233 test
1126 1234 user
1127 1235 person
1128 1236 person
1129 1237 person
1130 1238 person
1131 1239 other
1132 1240 other
1133 1241 user
1134 1242
1135 1243 $ hg log --template '{date|date}\n'
1136 1244 Wed Jan 01 10:01:00 2020 +0000
1137 1245 Mon Jan 12 13:46:40 1970 +0000
1138 1246 Sun Jan 18 08:40:01 1970 +0000
1139 1247 Sun Jan 18 08:40:00 1970 +0000
1140 1248 Sat Jan 17 04:53:20 1970 +0000
1141 1249 Fri Jan 16 01:06:40 1970 +0000
1142 1250 Wed Jan 14 21:20:00 1970 +0000
1143 1251 Tue Jan 13 17:33:20 1970 +0000
1144 1252 Mon Jan 12 13:46:40 1970 +0000
1145 1253
1146 1254 $ hg log --template '{date|isodate}\n'
1147 1255 2020-01-01 10:01 +0000
1148 1256 1970-01-12 13:46 +0000
1149 1257 1970-01-18 08:40 +0000
1150 1258 1970-01-18 08:40 +0000
1151 1259 1970-01-17 04:53 +0000
1152 1260 1970-01-16 01:06 +0000
1153 1261 1970-01-14 21:20 +0000
1154 1262 1970-01-13 17:33 +0000
1155 1263 1970-01-12 13:46 +0000
1156 1264
1157 1265 $ hg log --template '{date|isodatesec}\n'
1158 1266 2020-01-01 10:01:00 +0000
1159 1267 1970-01-12 13:46:40 +0000
1160 1268 1970-01-18 08:40:01 +0000
1161 1269 1970-01-18 08:40:00 +0000
1162 1270 1970-01-17 04:53:20 +0000
1163 1271 1970-01-16 01:06:40 +0000
1164 1272 1970-01-14 21:20:00 +0000
1165 1273 1970-01-13 17:33:20 +0000
1166 1274 1970-01-12 13:46:40 +0000
1167 1275
1168 1276 $ hg log --template '{date|rfc822date}\n'
1169 1277 Wed, 01 Jan 2020 10:01:00 +0000
1170 1278 Mon, 12 Jan 1970 13:46:40 +0000
1171 1279 Sun, 18 Jan 1970 08:40:01 +0000
1172 1280 Sun, 18 Jan 1970 08:40:00 +0000
1173 1281 Sat, 17 Jan 1970 04:53:20 +0000
1174 1282 Fri, 16 Jan 1970 01:06:40 +0000
1175 1283 Wed, 14 Jan 1970 21:20:00 +0000
1176 1284 Tue, 13 Jan 1970 17:33:20 +0000
1177 1285 Mon, 12 Jan 1970 13:46:40 +0000
1178 1286
1179 1287 $ hg log --template '{desc|firstline}\n'
1180 1288 third
1181 1289 second
1182 1290 merge
1183 1291 new head
1184 1292 new branch
1185 1293 no user, no domain
1186 1294 no person
1187 1295 other 1
1188 1296 line 1
1189 1297
1190 1298 $ hg log --template '{node|short}\n'
1191 1299 95c24699272e
1192 1300 29114dbae42b
1193 1301 d41e714fe50d
1194 1302 13207e5a10d9
1195 1303 bbe44766e73d
1196 1304 10e46f2dcbf4
1197 1305 97054abb4ab8
1198 1306 b608e9d1a3f0
1199 1307 1e4e1b8f71e0
1200 1308
1201 1309 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1202 1310 <changeset author="test"/>
1203 1311 <changeset author="User Name &lt;user@hostname&gt;"/>
1204 1312 <changeset author="person"/>
1205 1313 <changeset author="person"/>
1206 1314 <changeset author="person"/>
1207 1315 <changeset author="person"/>
1208 1316 <changeset author="other@place"/>
1209 1317 <changeset author="A. N. Other &lt;other@place&gt;"/>
1210 1318 <changeset author="User Name &lt;user@hostname&gt;"/>
1211 1319
1212 1320 $ hg log --template '{rev}: {children}\n'
1213 1321 8:
1214 1322 7: 8:95c24699272e
1215 1323 6:
1216 1324 5: 6:d41e714fe50d
1217 1325 4: 6:d41e714fe50d
1218 1326 3: 4:bbe44766e73d 5:13207e5a10d9
1219 1327 2: 3:10e46f2dcbf4
1220 1328 1: 2:97054abb4ab8
1221 1329 0: 1:b608e9d1a3f0
1222 1330
1223 1331 Formatnode filter works:
1224 1332
1225 1333 $ hg -q log -r 0 --template '{node|formatnode}\n'
1226 1334 1e4e1b8f71e0
1227 1335
1228 1336 $ hg log -r 0 --template '{node|formatnode}\n'
1229 1337 1e4e1b8f71e0
1230 1338
1231 1339 $ hg -v log -r 0 --template '{node|formatnode}\n'
1232 1340 1e4e1b8f71e0
1233 1341
1234 1342 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1235 1343 1e4e1b8f71e05681d422154f5421e385fec3454f
1236 1344
1237 1345 Age filter:
1238 1346
1239 1347 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1240 1348
1241 1349 >>> from datetime import datetime
1242 1350 >>> fp = open('a', 'w')
1243 1351 >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00')
1244 1352 >>> fp.close()
1245 1353 $ hg add a
1246 1354 $ hg commit -m future -d "`cat a`"
1247 1355
1248 1356 $ hg log -l1 --template '{date|age}\n'
1249 1357 7 years from now
1250 1358
1251 1359 Error on syntax:
1252 1360
1253 1361 $ echo 'x = "f' >> t
1254 1362 $ hg log
1255 1363 abort: t:3: unmatched quotes
1256 1364 [255]
1257 1365
1258 1366 $ cd ..
1259 1367
1260 1368
1261 1369 latesttag:
1262 1370
1263 1371 $ hg init latesttag
1264 1372 $ cd latesttag
1265 1373
1266 1374 $ echo a > file
1267 1375 $ hg ci -Am a -d '0 0'
1268 1376 adding file
1269 1377
1270 1378 $ echo b >> file
1271 1379 $ hg ci -m b -d '1 0'
1272 1380
1273 1381 $ echo c >> head1
1274 1382 $ hg ci -Am h1c -d '2 0'
1275 1383 adding head1
1276 1384
1277 1385 $ hg update -q 1
1278 1386 $ echo d >> head2
1279 1387 $ hg ci -Am h2d -d '3 0'
1280 1388 adding head2
1281 1389 created new head
1282 1390
1283 1391 $ echo e >> head2
1284 1392 $ hg ci -m h2e -d '4 0'
1285 1393
1286 1394 $ hg merge -q
1287 1395 $ hg ci -m merge -d '5 0'
1288 1396
1289 1397 No tag set:
1290 1398
1291 1399 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1292 1400 5: null+5
1293 1401 4: null+4
1294 1402 3: null+3
1295 1403 2: null+3
1296 1404 1: null+2
1297 1405 0: null+1
1298 1406
1299 1407 One common tag: longuest path wins:
1300 1408
1301 1409 $ hg tag -r 1 -m t1 -d '6 0' t1
1302 1410 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1303 1411 6: t1+4
1304 1412 5: t1+3
1305 1413 4: t1+2
1306 1414 3: t1+1
1307 1415 2: t1+1
1308 1416 1: t1+0
1309 1417 0: null+1
1310 1418
1311 1419 One ancestor tag: more recent wins:
1312 1420
1313 1421 $ hg tag -r 2 -m t2 -d '7 0' t2
1314 1422 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1315 1423 7: t2+3
1316 1424 6: t2+2
1317 1425 5: t2+1
1318 1426 4: t1+2
1319 1427 3: t1+1
1320 1428 2: t2+0
1321 1429 1: t1+0
1322 1430 0: null+1
1323 1431
1324 1432 Two branch tags: more recent wins:
1325 1433
1326 1434 $ hg tag -r 3 -m t3 -d '8 0' t3
1327 1435 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1328 1436 8: t3+5
1329 1437 7: t3+4
1330 1438 6: t3+3
1331 1439 5: t3+2
1332 1440 4: t3+1
1333 1441 3: t3+0
1334 1442 2: t2+0
1335 1443 1: t1+0
1336 1444 0: null+1
1337 1445
1338 1446 Merged tag overrides:
1339 1447
1340 1448 $ hg tag -r 5 -m t5 -d '9 0' t5
1341 1449 $ hg tag -r 3 -m at3 -d '10 0' at3
1342 1450 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1343 1451 10: t5+5
1344 1452 9: t5+4
1345 1453 8: t5+3
1346 1454 7: t5+2
1347 1455 6: t5+1
1348 1456 5: t5+0
1349 1457 4: at3:t3+1
1350 1458 3: at3:t3+0
1351 1459 2: t2+0
1352 1460 1: t1+0
1353 1461 0: null+1
1354 1462
1355 1463 $ cd ..
1356 1464
1357 1465
1358 1466 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1359 1467 if it is a relative path
1360 1468
1361 1469 $ mkdir -p home/styles
1362 1470
1363 1471 $ cat > home/styles/teststyle <<EOF
1364 1472 > changeset = 'test {rev}:{node|short}\n'
1365 1473 > EOF
1366 1474
1367 1475 $ HOME=`pwd`/home; export HOME
1368 1476
1369 1477 $ cat > latesttag/.hg/hgrc <<EOF
1370 1478 > [ui]
1371 1479 > style = ~/styles/teststyle
1372 1480 > EOF
1373 1481
1374 1482 $ hg -R latesttag tip
1375 1483 test 10:dee8f28249af
1376 1484
1377 1485 Test recursive showlist template (issue1989):
1378 1486
1379 1487 $ cat > style1989 <<EOF
1380 1488 > changeset = '{file_mods}{manifest}{extras}'
1381 1489 > file_mod = 'M|{author|person}\n'
1382 1490 > manifest = '{rev},{author}\n'
1383 1491 > extra = '{key}: {author}\n'
1384 1492 > EOF
1385 1493
1386 1494 $ hg -R latesttag log -r tip --style=style1989
1387 1495 M|test
1388 1496 10,test
1389 1497 branch: test
1390 1498
General Comments 0
You need to be logged in to leave comments. Login now