##// END OF EJS Templates
templatekw: add 'currentbookmark' keyword to show current bookmark easily...
FUJIWARA Katsunori -
r21896:2b41ee1b default
parent child Browse files
Show More
@@ -1,404 +1,416 b''
1 # templatekw.py - common changeset template keywords
1 # templatekw.py - common changeset template keywords
2 #
2 #
3 # Copyright 2005-2009 Matt Mackall <mpm@selenic.com>
3 # Copyright 2005-2009 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from node import hex
8 from node import hex
9 import patch, util, error
9 import patch, util, error
10 import hbisect
10 import hbisect
11
11
12 # This helper class allows us to handle both:
12 # This helper class allows us to handle both:
13 # "{files}" (legacy command-line-specific list hack) and
13 # "{files}" (legacy command-line-specific list hack) and
14 # "{files % '{file}\n'}" (hgweb-style with inlining and function support)
14 # "{files % '{file}\n'}" (hgweb-style with inlining and function support)
15
15
16 class _hybrid(object):
16 class _hybrid(object):
17 def __init__(self, gen, values, joinfmt=None):
17 def __init__(self, gen, values, joinfmt=None):
18 self.gen = gen
18 self.gen = gen
19 self.values = values
19 self.values = values
20 if joinfmt:
20 if joinfmt:
21 self.joinfmt = joinfmt
21 self.joinfmt = joinfmt
22 else:
22 else:
23 self.joinfmt = lambda x: x.values()[0]
23 self.joinfmt = lambda x: x.values()[0]
24 def __iter__(self):
24 def __iter__(self):
25 return self.gen
25 return self.gen
26 def __call__(self):
26 def __call__(self):
27 for x in self.values:
27 for x in self.values:
28 yield x
28 yield x
29
29
30 def showlist(name, values, plural=None, element=None, **args):
30 def showlist(name, values, plural=None, element=None, **args):
31 if not element:
31 if not element:
32 element = name
32 element = name
33 f = _showlist(name, values, plural, **args)
33 f = _showlist(name, values, plural, **args)
34 return _hybrid(f, [{element: x} for x in values])
34 return _hybrid(f, [{element: x} for x in values])
35
35
36 def _showlist(name, values, plural=None, **args):
36 def _showlist(name, values, plural=None, **args):
37 '''expand set of values.
37 '''expand set of values.
38 name is name of key in template map.
38 name is name of key in template map.
39 values is list of strings or dicts.
39 values is list of strings or dicts.
40 plural is plural of name, if not simply name + 's'.
40 plural is plural of name, if not simply name + 's'.
41
41
42 expansion works like this, given name 'foo'.
42 expansion works like this, given name 'foo'.
43
43
44 if values is empty, expand 'no_foos'.
44 if values is empty, expand 'no_foos'.
45
45
46 if 'foo' not in template map, return values as a string,
46 if 'foo' not in template map, return values as a string,
47 joined by space.
47 joined by space.
48
48
49 expand 'start_foos'.
49 expand 'start_foos'.
50
50
51 for each value, expand 'foo'. if 'last_foo' in template
51 for each value, expand 'foo'. if 'last_foo' in template
52 map, expand it instead of 'foo' for last key.
52 map, expand it instead of 'foo' for last key.
53
53
54 expand 'end_foos'.
54 expand 'end_foos'.
55 '''
55 '''
56 templ = args['templ']
56 templ = args['templ']
57 if plural:
57 if plural:
58 names = plural
58 names = plural
59 else: names = name + 's'
59 else: names = name + 's'
60 if not values:
60 if not values:
61 noname = 'no_' + names
61 noname = 'no_' + names
62 if noname in templ:
62 if noname in templ:
63 yield templ(noname, **args)
63 yield templ(noname, **args)
64 return
64 return
65 if name not in templ:
65 if name not in templ:
66 if isinstance(values[0], str):
66 if isinstance(values[0], str):
67 yield ' '.join(values)
67 yield ' '.join(values)
68 else:
68 else:
69 for v in values:
69 for v in values:
70 yield dict(v, **args)
70 yield dict(v, **args)
71 return
71 return
72 startname = 'start_' + names
72 startname = 'start_' + names
73 if startname in templ:
73 if startname in templ:
74 yield templ(startname, **args)
74 yield templ(startname, **args)
75 vargs = args.copy()
75 vargs = args.copy()
76 def one(v, tag=name):
76 def one(v, tag=name):
77 try:
77 try:
78 vargs.update(v)
78 vargs.update(v)
79 except (AttributeError, ValueError):
79 except (AttributeError, ValueError):
80 try:
80 try:
81 for a, b in v:
81 for a, b in v:
82 vargs[a] = b
82 vargs[a] = b
83 except ValueError:
83 except ValueError:
84 vargs[name] = v
84 vargs[name] = v
85 return templ(tag, **vargs)
85 return templ(tag, **vargs)
86 lastname = 'last_' + name
86 lastname = 'last_' + name
87 if lastname in templ:
87 if lastname in templ:
88 last = values.pop()
88 last = values.pop()
89 else:
89 else:
90 last = None
90 last = None
91 for v in values:
91 for v in values:
92 yield one(v)
92 yield one(v)
93 if last is not None:
93 if last is not None:
94 yield one(last, tag=lastname)
94 yield one(last, tag=lastname)
95 endname = 'end_' + names
95 endname = 'end_' + names
96 if endname in templ:
96 if endname in templ:
97 yield templ(endname, **args)
97 yield templ(endname, **args)
98
98
99 def getfiles(repo, ctx, revcache):
99 def getfiles(repo, ctx, revcache):
100 if 'files' not in revcache:
100 if 'files' not in revcache:
101 revcache['files'] = repo.status(ctx.p1().node(), ctx.node())[:3]
101 revcache['files'] = repo.status(ctx.p1().node(), ctx.node())[:3]
102 return revcache['files']
102 return revcache['files']
103
103
104 def getlatesttags(repo, ctx, cache):
104 def getlatesttags(repo, ctx, cache):
105 '''return date, distance and name for the latest tag of rev'''
105 '''return date, distance and name for the latest tag of rev'''
106
106
107 if 'latesttags' not in cache:
107 if 'latesttags' not in cache:
108 # Cache mapping from rev to a tuple with tag date, tag
108 # Cache mapping from rev to a tuple with tag date, tag
109 # distance and tag name
109 # distance and tag name
110 cache['latesttags'] = {-1: (0, 0, 'null')}
110 cache['latesttags'] = {-1: (0, 0, 'null')}
111 latesttags = cache['latesttags']
111 latesttags = cache['latesttags']
112
112
113 rev = ctx.rev()
113 rev = ctx.rev()
114 todo = [rev]
114 todo = [rev]
115 while todo:
115 while todo:
116 rev = todo.pop()
116 rev = todo.pop()
117 if rev in latesttags:
117 if rev in latesttags:
118 continue
118 continue
119 ctx = repo[rev]
119 ctx = repo[rev]
120 tags = [t for t in ctx.tags()
120 tags = [t for t in ctx.tags()
121 if (repo.tagtype(t) and repo.tagtype(t) != 'local')]
121 if (repo.tagtype(t) and repo.tagtype(t) != 'local')]
122 if tags:
122 if tags:
123 latesttags[rev] = ctx.date()[0], 0, ':'.join(sorted(tags))
123 latesttags[rev] = ctx.date()[0], 0, ':'.join(sorted(tags))
124 continue
124 continue
125 try:
125 try:
126 # The tuples are laid out so the right one can be found by
126 # The tuples are laid out so the right one can be found by
127 # comparison.
127 # comparison.
128 pdate, pdist, ptag = max(
128 pdate, pdist, ptag = max(
129 latesttags[p.rev()] for p in ctx.parents())
129 latesttags[p.rev()] for p in ctx.parents())
130 except KeyError:
130 except KeyError:
131 # Cache miss - recurse
131 # Cache miss - recurse
132 todo.append(rev)
132 todo.append(rev)
133 todo.extend(p.rev() for p in ctx.parents())
133 todo.extend(p.rev() for p in ctx.parents())
134 continue
134 continue
135 latesttags[rev] = pdate, pdist + 1, ptag
135 latesttags[rev] = pdate, pdist + 1, ptag
136 return latesttags[rev]
136 return latesttags[rev]
137
137
138 def getrenamedfn(repo, endrev=None):
138 def getrenamedfn(repo, endrev=None):
139 rcache = {}
139 rcache = {}
140 if endrev is None:
140 if endrev is None:
141 endrev = len(repo)
141 endrev = len(repo)
142
142
143 def getrenamed(fn, rev):
143 def getrenamed(fn, rev):
144 '''looks up all renames for a file (up to endrev) the first
144 '''looks up all renames for a file (up to endrev) the first
145 time the file is given. It indexes on the changerev and only
145 time the file is given. It indexes on the changerev and only
146 parses the manifest if linkrev != changerev.
146 parses the manifest if linkrev != changerev.
147 Returns rename info for fn at changerev rev.'''
147 Returns rename info for fn at changerev rev.'''
148 if fn not in rcache:
148 if fn not in rcache:
149 rcache[fn] = {}
149 rcache[fn] = {}
150 fl = repo.file(fn)
150 fl = repo.file(fn)
151 for i in fl:
151 for i in fl:
152 lr = fl.linkrev(i)
152 lr = fl.linkrev(i)
153 renamed = fl.renamed(fl.node(i))
153 renamed = fl.renamed(fl.node(i))
154 rcache[fn][lr] = renamed
154 rcache[fn][lr] = renamed
155 if lr >= endrev:
155 if lr >= endrev:
156 break
156 break
157 if rev in rcache[fn]:
157 if rev in rcache[fn]:
158 return rcache[fn][rev]
158 return rcache[fn][rev]
159
159
160 # If linkrev != rev (i.e. rev not found in rcache) fallback to
160 # If linkrev != rev (i.e. rev not found in rcache) fallback to
161 # filectx logic.
161 # filectx logic.
162 try:
162 try:
163 return repo[rev][fn].renamed()
163 return repo[rev][fn].renamed()
164 except error.LookupError:
164 except error.LookupError:
165 return None
165 return None
166
166
167 return getrenamed
167 return getrenamed
168
168
169
169
170 def showauthor(repo, ctx, templ, **args):
170 def showauthor(repo, ctx, templ, **args):
171 """:author: String. The unmodified author of the changeset."""
171 """:author: String. The unmodified author of the changeset."""
172 return ctx.user()
172 return ctx.user()
173
173
174 def showbisect(repo, ctx, templ, **args):
174 def showbisect(repo, ctx, templ, **args):
175 """:bisect: String. The changeset bisection status."""
175 """:bisect: String. The changeset bisection status."""
176 return hbisect.label(repo, ctx.node())
176 return hbisect.label(repo, ctx.node())
177
177
178 def showbranch(**args):
178 def showbranch(**args):
179 """:branch: String. The name of the branch on which the changeset was
179 """:branch: String. The name of the branch on which the changeset was
180 committed.
180 committed.
181 """
181 """
182 return args['ctx'].branch()
182 return args['ctx'].branch()
183
183
184 def showbranches(**args):
184 def showbranches(**args):
185 """:branches: List of strings. The name of the branch on which the
185 """:branches: List of strings. The name of the branch on which the
186 changeset was committed. Will be empty if the branch name was
186 changeset was committed. Will be empty if the branch name was
187 default.
187 default.
188 """
188 """
189 branch = args['ctx'].branch()
189 branch = args['ctx'].branch()
190 if branch != 'default':
190 if branch != 'default':
191 return showlist('branch', [branch], plural='branches', **args)
191 return showlist('branch', [branch], plural='branches', **args)
192 return showlist('branch', [], plural='branches', **args)
192 return showlist('branch', [], plural='branches', **args)
193
193
194 def showbookmarks(**args):
194 def showbookmarks(**args):
195 """:bookmarks: List of strings. Any bookmarks associated with the
195 """:bookmarks: List of strings. Any bookmarks associated with the
196 changeset.
196 changeset.
197 """
197 """
198 repo = args['ctx']._repo
198 repo = args['ctx']._repo
199 bookmarks = args['ctx'].bookmarks()
199 bookmarks = args['ctx'].bookmarks()
200 hybrid = showlist('bookmark', bookmarks, **args)
200 hybrid = showlist('bookmark', bookmarks, **args)
201 for value in hybrid.values:
201 for value in hybrid.values:
202 value['current'] = repo._bookmarkcurrent
202 value['current'] = repo._bookmarkcurrent
203 return hybrid
203 return hybrid
204
204
205 def showchildren(**args):
205 def showchildren(**args):
206 """:children: List of strings. The children of the changeset."""
206 """:children: List of strings. The children of the changeset."""
207 ctx = args['ctx']
207 ctx = args['ctx']
208 childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()]
208 childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()]
209 return showlist('children', childrevs, element='child', **args)
209 return showlist('children', childrevs, element='child', **args)
210
210
211 def showcurrentbookmark(**args):
212 """:currentbookmark: String. The active bookmark, if it is
213 associated with the changeset"""
214 import bookmarks as bookmarks # to avoid circular import issues
215 repo = args['repo']
216 if bookmarks.iscurrent(repo):
217 current = repo._bookmarkcurrent
218 if current in args['ctx'].bookmarks():
219 return current
220 return ''
221
211 def showdate(repo, ctx, templ, **args):
222 def showdate(repo, ctx, templ, **args):
212 """:date: Date information. The date when the changeset was committed."""
223 """:date: Date information. The date when the changeset was committed."""
213 return ctx.date()
224 return ctx.date()
214
225
215 def showdescription(repo, ctx, templ, **args):
226 def showdescription(repo, ctx, templ, **args):
216 """:desc: String. The text of the changeset description."""
227 """:desc: String. The text of the changeset description."""
217 return ctx.description().strip()
228 return ctx.description().strip()
218
229
219 def showdiffstat(repo, ctx, templ, **args):
230 def showdiffstat(repo, ctx, templ, **args):
220 """:diffstat: String. Statistics of changes with the following format:
231 """:diffstat: String. Statistics of changes with the following format:
221 "modified files: +added/-removed lines"
232 "modified files: +added/-removed lines"
222 """
233 """
223 stats = patch.diffstatdata(util.iterlines(ctx.diff()))
234 stats = patch.diffstatdata(util.iterlines(ctx.diff()))
224 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
235 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
225 return '%s: +%s/-%s' % (len(stats), adds, removes)
236 return '%s: +%s/-%s' % (len(stats), adds, removes)
226
237
227 def showextras(**args):
238 def showextras(**args):
228 """:extras: List of dicts with key, value entries of the 'extras'
239 """:extras: List of dicts with key, value entries of the 'extras'
229 field of this changeset."""
240 field of this changeset."""
230 extras = args['ctx'].extra()
241 extras = args['ctx'].extra()
231 c = [{'key': x[0], 'value': x[1]} for x in sorted(extras.items())]
242 c = [{'key': x[0], 'value': x[1]} for x in sorted(extras.items())]
232 f = _showlist('extra', c, plural='extras', **args)
243 f = _showlist('extra', c, plural='extras', **args)
233 return _hybrid(f, c, lambda x: '%s=%s' % (x['key'], x['value']))
244 return _hybrid(f, c, lambda x: '%s=%s' % (x['key'], x['value']))
234
245
235 def showfileadds(**args):
246 def showfileadds(**args):
236 """:file_adds: List of strings. Files added by this changeset."""
247 """:file_adds: List of strings. Files added by this changeset."""
237 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
248 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
238 return showlist('file_add', getfiles(repo, ctx, revcache)[1],
249 return showlist('file_add', getfiles(repo, ctx, revcache)[1],
239 element='file', **args)
250 element='file', **args)
240
251
241 def showfilecopies(**args):
252 def showfilecopies(**args):
242 """:file_copies: List of strings. Files copied in this changeset with
253 """:file_copies: List of strings. Files copied in this changeset with
243 their sources.
254 their sources.
244 """
255 """
245 cache, ctx = args['cache'], args['ctx']
256 cache, ctx = args['cache'], args['ctx']
246 copies = args['revcache'].get('copies')
257 copies = args['revcache'].get('copies')
247 if copies is None:
258 if copies is None:
248 if 'getrenamed' not in cache:
259 if 'getrenamed' not in cache:
249 cache['getrenamed'] = getrenamedfn(args['repo'])
260 cache['getrenamed'] = getrenamedfn(args['repo'])
250 copies = []
261 copies = []
251 getrenamed = cache['getrenamed']
262 getrenamed = cache['getrenamed']
252 for fn in ctx.files():
263 for fn in ctx.files():
253 rename = getrenamed(fn, ctx.rev())
264 rename = getrenamed(fn, ctx.rev())
254 if rename:
265 if rename:
255 copies.append((fn, rename[0]))
266 copies.append((fn, rename[0]))
256
267
257 c = [{'name': x[0], 'source': x[1]} for x in copies]
268 c = [{'name': x[0], 'source': x[1]} for x in copies]
258 f = _showlist('file_copy', c, plural='file_copies', **args)
269 f = _showlist('file_copy', c, plural='file_copies', **args)
259 return _hybrid(f, c, lambda x: '%s (%s)' % (x['name'], x['source']))
270 return _hybrid(f, c, lambda x: '%s (%s)' % (x['name'], x['source']))
260
271
261 # showfilecopiesswitch() displays file copies only if copy records are
272 # showfilecopiesswitch() displays file copies only if copy records are
262 # provided before calling the templater, usually with a --copies
273 # provided before calling the templater, usually with a --copies
263 # command line switch.
274 # command line switch.
264 def showfilecopiesswitch(**args):
275 def showfilecopiesswitch(**args):
265 """:file_copies_switch: List of strings. Like "file_copies" but displayed
276 """:file_copies_switch: List of strings. Like "file_copies" but displayed
266 only if the --copied switch is set.
277 only if the --copied switch is set.
267 """
278 """
268 copies = args['revcache'].get('copies') or []
279 copies = args['revcache'].get('copies') or []
269 c = [{'name': x[0], 'source': x[1]} for x in copies]
280 c = [{'name': x[0], 'source': x[1]} for x in copies]
270 f = _showlist('file_copy', c, plural='file_copies', **args)
281 f = _showlist('file_copy', c, plural='file_copies', **args)
271 return _hybrid(f, c, lambda x: '%s (%s)' % (x['name'], x['source']))
282 return _hybrid(f, c, lambda x: '%s (%s)' % (x['name'], x['source']))
272
283
273 def showfiledels(**args):
284 def showfiledels(**args):
274 """:file_dels: List of strings. Files removed by this changeset."""
285 """:file_dels: List of strings. Files removed by this changeset."""
275 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
286 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
276 return showlist('file_del', getfiles(repo, ctx, revcache)[2],
287 return showlist('file_del', getfiles(repo, ctx, revcache)[2],
277 element='file', **args)
288 element='file', **args)
278
289
279 def showfilemods(**args):
290 def showfilemods(**args):
280 """:file_mods: List of strings. Files modified by this changeset."""
291 """:file_mods: List of strings. Files modified by this changeset."""
281 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
292 repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
282 return showlist('file_mod', getfiles(repo, ctx, revcache)[0],
293 return showlist('file_mod', getfiles(repo, ctx, revcache)[0],
283 element='file', **args)
294 element='file', **args)
284
295
285 def showfiles(**args):
296 def showfiles(**args):
286 """:files: List of strings. All files modified, added, or removed by this
297 """:files: List of strings. All files modified, added, or removed by this
287 changeset.
298 changeset.
288 """
299 """
289 return showlist('file', args['ctx'].files(), **args)
300 return showlist('file', args['ctx'].files(), **args)
290
301
291 def showlatesttag(repo, ctx, templ, cache, **args):
302 def showlatesttag(repo, ctx, templ, cache, **args):
292 """:latesttag: String. Most recent global tag in the ancestors of this
303 """:latesttag: String. Most recent global tag in the ancestors of this
293 changeset.
304 changeset.
294 """
305 """
295 return getlatesttags(repo, ctx, cache)[2]
306 return getlatesttags(repo, ctx, cache)[2]
296
307
297 def showlatesttagdistance(repo, ctx, templ, cache, **args):
308 def showlatesttagdistance(repo, ctx, templ, cache, **args):
298 """:latesttagdistance: Integer. Longest path to the latest tag."""
309 """:latesttagdistance: Integer. Longest path to the latest tag."""
299 return getlatesttags(repo, ctx, cache)[1]
310 return getlatesttags(repo, ctx, cache)[1]
300
311
301 def showmanifest(**args):
312 def showmanifest(**args):
302 repo, ctx, templ = args['repo'], args['ctx'], args['templ']
313 repo, ctx, templ = args['repo'], args['ctx'], args['templ']
303 args = args.copy()
314 args = args.copy()
304 args.update({'rev': repo.manifest.rev(ctx.changeset()[0]),
315 args.update({'rev': repo.manifest.rev(ctx.changeset()[0]),
305 'node': hex(ctx.changeset()[0])})
316 'node': hex(ctx.changeset()[0])})
306 return templ('manifest', **args)
317 return templ('manifest', **args)
307
318
308 def shownode(repo, ctx, templ, **args):
319 def shownode(repo, ctx, templ, **args):
309 """:node: String. The changeset identification hash, as a 40 hexadecimal
320 """:node: String. The changeset identification hash, as a 40 hexadecimal
310 digit string.
321 digit string.
311 """
322 """
312 return ctx.hex()
323 return ctx.hex()
313
324
314 def showp1rev(repo, ctx, templ, **args):
325 def showp1rev(repo, ctx, templ, **args):
315 """:p1rev: Integer. The repository-local revision number of the changeset's
326 """:p1rev: Integer. The repository-local revision number of the changeset's
316 first parent, or -1 if the changeset has no parents."""
327 first parent, or -1 if the changeset has no parents."""
317 return ctx.p1().rev()
328 return ctx.p1().rev()
318
329
319 def showp2rev(repo, ctx, templ, **args):
330 def showp2rev(repo, ctx, templ, **args):
320 """:p2rev: Integer. The repository-local revision number of the changeset's
331 """:p2rev: Integer. The repository-local revision number of the changeset's
321 second parent, or -1 if the changeset has no second parent."""
332 second parent, or -1 if the changeset has no second parent."""
322 return ctx.p2().rev()
333 return ctx.p2().rev()
323
334
324 def showp1node(repo, ctx, templ, **args):
335 def showp1node(repo, ctx, templ, **args):
325 """:p1node: String. The identification hash of the changeset's first parent,
336 """:p1node: String. The identification hash of the changeset's first parent,
326 as a 40 digit hexadecimal string. If the changeset has no parents, all
337 as a 40 digit hexadecimal string. If the changeset has no parents, all
327 digits are 0."""
338 digits are 0."""
328 return ctx.p1().hex()
339 return ctx.p1().hex()
329
340
330 def showp2node(repo, ctx, templ, **args):
341 def showp2node(repo, ctx, templ, **args):
331 """:p2node: String. The identification hash of the changeset's second
342 """:p2node: String. The identification hash of the changeset's second
332 parent, as a 40 digit hexadecimal string. If the changeset has no second
343 parent, as a 40 digit hexadecimal string. If the changeset has no second
333 parent, all digits are 0."""
344 parent, all digits are 0."""
334 return ctx.p2().hex()
345 return ctx.p2().hex()
335
346
336 def showphase(repo, ctx, templ, **args):
347 def showphase(repo, ctx, templ, **args):
337 """:phase: String. The changeset phase name."""
348 """:phase: String. The changeset phase name."""
338 return ctx.phasestr()
349 return ctx.phasestr()
339
350
340 def showphaseidx(repo, ctx, templ, **args):
351 def showphaseidx(repo, ctx, templ, **args):
341 """:phaseidx: Integer. The changeset phase index."""
352 """:phaseidx: Integer. The changeset phase index."""
342 return ctx.phase()
353 return ctx.phase()
343
354
344 def showrev(repo, ctx, templ, **args):
355 def showrev(repo, ctx, templ, **args):
345 """:rev: Integer. The repository-local changeset revision number."""
356 """:rev: Integer. The repository-local changeset revision number."""
346 return ctx.rev()
357 return ctx.rev()
347
358
348 def showtags(**args):
359 def showtags(**args):
349 """:tags: List of strings. Any tags associated with the changeset."""
360 """:tags: List of strings. Any tags associated with the changeset."""
350 return showlist('tag', args['ctx'].tags(), **args)
361 return showlist('tag', args['ctx'].tags(), **args)
351
362
352 # keywords are callables like:
363 # keywords are callables like:
353 # fn(repo, ctx, templ, cache, revcache, **args)
364 # fn(repo, ctx, templ, cache, revcache, **args)
354 # with:
365 # with:
355 # repo - current repository instance
366 # repo - current repository instance
356 # ctx - the changectx being displayed
367 # ctx - the changectx being displayed
357 # templ - the templater instance
368 # templ - the templater instance
358 # cache - a cache dictionary for the whole templater run
369 # cache - a cache dictionary for the whole templater run
359 # revcache - a cache dictionary for the current revision
370 # revcache - a cache dictionary for the current revision
360 keywords = {
371 keywords = {
361 'author': showauthor,
372 'author': showauthor,
362 'bisect': showbisect,
373 'bisect': showbisect,
363 'branch': showbranch,
374 'branch': showbranch,
364 'branches': showbranches,
375 'branches': showbranches,
365 'bookmarks': showbookmarks,
376 'bookmarks': showbookmarks,
366 'children': showchildren,
377 'children': showchildren,
378 'currentbookmark': showcurrentbookmark,
367 'date': showdate,
379 'date': showdate,
368 'desc': showdescription,
380 'desc': showdescription,
369 'diffstat': showdiffstat,
381 'diffstat': showdiffstat,
370 'extras': showextras,
382 'extras': showextras,
371 'file_adds': showfileadds,
383 'file_adds': showfileadds,
372 'file_copies': showfilecopies,
384 'file_copies': showfilecopies,
373 'file_copies_switch': showfilecopiesswitch,
385 'file_copies_switch': showfilecopiesswitch,
374 'file_dels': showfiledels,
386 'file_dels': showfiledels,
375 'file_mods': showfilemods,
387 'file_mods': showfilemods,
376 'files': showfiles,
388 'files': showfiles,
377 'latesttag': showlatesttag,
389 'latesttag': showlatesttag,
378 'latesttagdistance': showlatesttagdistance,
390 'latesttagdistance': showlatesttagdistance,
379 'manifest': showmanifest,
391 'manifest': showmanifest,
380 'node': shownode,
392 'node': shownode,
381 'p1rev': showp1rev,
393 'p1rev': showp1rev,
382 'p1node': showp1node,
394 'p1node': showp1node,
383 'p2rev': showp2rev,
395 'p2rev': showp2rev,
384 'p2node': showp2node,
396 'p2node': showp2node,
385 'phase': showphase,
397 'phase': showphase,
386 'phaseidx': showphaseidx,
398 'phaseidx': showphaseidx,
387 'rev': showrev,
399 'rev': showrev,
388 'tags': showtags,
400 'tags': showtags,
389 }
401 }
390
402
391 def _showparents(**args):
403 def _showparents(**args):
392 """:parents: List of strings. The parents of the changeset in "rev:node"
404 """:parents: List of strings. The parents of the changeset in "rev:node"
393 format. If the changeset has only one "natural" parent (the predecessor
405 format. If the changeset has only one "natural" parent (the predecessor
394 revision) nothing is shown."""
406 revision) nothing is shown."""
395 pass
407 pass
396
408
397 dockeywords = {
409 dockeywords = {
398 'parents': _showparents,
410 'parents': _showparents,
399 }
411 }
400 dockeywords.update(keywords)
412 dockeywords.update(keywords)
401 del dockeywords['branches']
413 del dockeywords['branches']
402
414
403 # tell hggettext to extract docstrings from these functions:
415 # tell hggettext to extract docstrings from these functions:
404 i18nfunctions = dockeywords.values()
416 i18nfunctions = dockeywords.values()
@@ -1,1977 +1,1986 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3 $ echo a > a
3 $ echo a > a
4 $ hg add a
4 $ hg add a
5 $ echo line 1 > b
5 $ echo line 1 > b
6 $ echo line 2 >> b
6 $ echo line 2 >> b
7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
7 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
8
8
9 $ hg add b
9 $ hg add b
10 $ echo other 1 > c
10 $ echo other 1 > c
11 $ echo other 2 >> c
11 $ echo other 2 >> c
12 $ echo >> c
12 $ echo >> c
13 $ echo other 3 >> c
13 $ echo other 3 >> c
14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
14 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
15
15
16 $ hg add c
16 $ hg add c
17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
17 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
18 $ echo c >> c
18 $ echo c >> c
19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
19 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
20
20
21 $ echo foo > .hg/branch
21 $ echo foo > .hg/branch
22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
22 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
23
23
24 $ hg co -q 3
24 $ hg co -q 3
25 $ echo other 4 >> d
25 $ echo other 4 >> d
26 $ hg add d
26 $ hg add d
27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
27 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
28
28
29 $ hg merge -q foo
29 $ hg merge -q foo
30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
30 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
31
31
32 Second branch starting at nullrev:
32 Second branch starting at nullrev:
33
33
34 $ hg update null
34 $ hg update null
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
35 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
36 $ echo second > second
36 $ echo second > second
37 $ hg add second
37 $ hg add second
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
38 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
39 created new head
39 created new head
40
40
41 $ echo third > third
41 $ echo third > third
42 $ hg add third
42 $ hg add third
43 $ hg mv second fourth
43 $ hg mv second fourth
44 $ hg commit -m third -d "2020-01-01 10:01"
44 $ hg commit -m third -d "2020-01-01 10:01"
45
45
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
46 $ hg log --template '{join(file_copies, ",\n")}\n' -r .
47 fourth (second)
47 fourth (second)
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
48 $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r .
49 second -> fourth
49 second -> fourth
50
50
51 Quoting for ui.logtemplate
51 Quoting for ui.logtemplate
52
52
53 $ hg tip --config "ui.logtemplate={rev}\n"
53 $ hg tip --config "ui.logtemplate={rev}\n"
54 8
54 8
55 $ hg tip --config "ui.logtemplate='{rev}\n'"
55 $ hg tip --config "ui.logtemplate='{rev}\n'"
56 8
56 8
57 $ hg tip --config 'ui.logtemplate="{rev}\n"'
57 $ hg tip --config 'ui.logtemplate="{rev}\n"'
58 8
58 8
59
59
60 Make sure user/global hgrc does not affect tests
60 Make sure user/global hgrc does not affect tests
61
61
62 $ echo '[ui]' > .hg/hgrc
62 $ echo '[ui]' > .hg/hgrc
63 $ echo 'logtemplate =' >> .hg/hgrc
63 $ echo 'logtemplate =' >> .hg/hgrc
64 $ echo 'style =' >> .hg/hgrc
64 $ echo 'style =' >> .hg/hgrc
65
65
66 Add some simple styles to settings
66 Add some simple styles to settings
67
67
68 $ echo '[templates]' >> .hg/hgrc
68 $ echo '[templates]' >> .hg/hgrc
69 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
69 $ printf 'simple = "{rev}\\n"\n' >> .hg/hgrc
70 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
70 $ printf 'simple2 = {rev}\\n\n' >> .hg/hgrc
71
71
72 $ hg log -l1 -Tsimple
72 $ hg log -l1 -Tsimple
73 8
73 8
74 $ hg log -l1 -Tsimple2
74 $ hg log -l1 -Tsimple2
75 8
75 8
76
76
77 Test templates and style maps in files:
77 Test templates and style maps in files:
78
78
79 $ echo "{rev}" > tmpl
79 $ echo "{rev}" > tmpl
80 $ hg log -l1 -T./tmpl
80 $ hg log -l1 -T./tmpl
81 8
81 8
82 $ hg log -l1 -Tblah/blah
82 $ hg log -l1 -Tblah/blah
83 blah/blah (no-eol)
83 blah/blah (no-eol)
84
84
85 $ printf 'changeset = "{rev}\\n"\n' > map-simple
85 $ printf 'changeset = "{rev}\\n"\n' > map-simple
86 $ hg log -l1 -T./map-simple
86 $ hg log -l1 -T./map-simple
87 8
87 8
88
88
89 Default style is like normal output:
89 Default style is like normal output:
90
90
91 $ hg log > log.out
91 $ hg log > log.out
92 $ hg log --style default > style.out
92 $ hg log --style default > style.out
93 $ cmp log.out style.out || diff -u log.out style.out
93 $ cmp log.out style.out || diff -u log.out style.out
94
94
95 $ hg log -v > log.out
95 $ hg log -v > log.out
96 $ hg log -v --style default > style.out
96 $ hg log -v --style default > style.out
97 $ cmp log.out style.out || diff -u log.out style.out
97 $ cmp log.out style.out || diff -u log.out style.out
98
98
99 $ hg log --debug > log.out
99 $ hg log --debug > log.out
100 $ hg log --debug --style default > style.out
100 $ hg log --debug --style default > style.out
101 $ cmp log.out style.out || diff -u log.out style.out
101 $ cmp log.out style.out || diff -u log.out style.out
102
102
103 Revision with no copies (used to print a traceback):
103 Revision with no copies (used to print a traceback):
104
104
105 $ hg tip -v --template '\n'
105 $ hg tip -v --template '\n'
106
106
107
107
108 Compact style works:
108 Compact style works:
109
109
110 $ hg log -Tcompact
110 $ hg log -Tcompact
111 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
111 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
112 third
112 third
113
113
114 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
114 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
115 second
115 second
116
116
117 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
117 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
118 merge
118 merge
119
119
120 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
120 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
121 new head
121 new head
122
122
123 4 bbe44766e73d 1970-01-17 04:53 +0000 person
123 4 bbe44766e73d 1970-01-17 04:53 +0000 person
124 new branch
124 new branch
125
125
126 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
126 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
127 no user, no domain
127 no user, no domain
128
128
129 2 97054abb4ab8 1970-01-14 21:20 +0000 other
129 2 97054abb4ab8 1970-01-14 21:20 +0000 other
130 no person
130 no person
131
131
132 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
132 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
133 other 1
133 other 1
134
134
135 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
135 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
136 line 1
136 line 1
137
137
138
138
139 $ hg log -v --style compact
139 $ hg log -v --style compact
140 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
140 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
141 third
141 third
142
142
143 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
143 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
144 second
144 second
145
145
146 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
146 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
147 merge
147 merge
148
148
149 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
149 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
150 new head
150 new head
151
151
152 4 bbe44766e73d 1970-01-17 04:53 +0000 person
152 4 bbe44766e73d 1970-01-17 04:53 +0000 person
153 new branch
153 new branch
154
154
155 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
155 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
156 no user, no domain
156 no user, no domain
157
157
158 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
158 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
159 no person
159 no person
160
160
161 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
161 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
162 other 1
162 other 1
163 other 2
163 other 2
164
164
165 other 3
165 other 3
166
166
167 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
167 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
168 line 1
168 line 1
169 line 2
169 line 2
170
170
171
171
172 $ hg log --debug --style compact
172 $ hg log --debug --style compact
173 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
173 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
174 third
174 third
175
175
176 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
176 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
177 second
177 second
178
178
179 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
179 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
180 merge
180 merge
181
181
182 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
182 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
183 new head
183 new head
184
184
185 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
185 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
186 new branch
186 new branch
187
187
188 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
188 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
189 no user, no domain
189 no user, no domain
190
190
191 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
191 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
192 no person
192 no person
193
193
194 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
194 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
195 other 1
195 other 1
196 other 2
196 other 2
197
197
198 other 3
198 other 3
199
199
200 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
200 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
201 line 1
201 line 1
202 line 2
202 line 2
203
203
204
204
205 Test xml styles:
205 Test xml styles:
206
206
207 $ hg log --style xml
207 $ hg log --style xml
208 <?xml version="1.0"?>
208 <?xml version="1.0"?>
209 <log>
209 <log>
210 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
210 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
211 <tag>tip</tag>
211 <tag>tip</tag>
212 <author email="test">test</author>
212 <author email="test">test</author>
213 <date>2020-01-01T10:01:00+00:00</date>
213 <date>2020-01-01T10:01:00+00:00</date>
214 <msg xml:space="preserve">third</msg>
214 <msg xml:space="preserve">third</msg>
215 </logentry>
215 </logentry>
216 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
216 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
217 <parent revision="-1" node="0000000000000000000000000000000000000000" />
217 <parent revision="-1" node="0000000000000000000000000000000000000000" />
218 <author email="user@hostname">User Name</author>
218 <author email="user@hostname">User Name</author>
219 <date>1970-01-12T13:46:40+00:00</date>
219 <date>1970-01-12T13:46:40+00:00</date>
220 <msg xml:space="preserve">second</msg>
220 <msg xml:space="preserve">second</msg>
221 </logentry>
221 </logentry>
222 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
222 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
223 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
223 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
224 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
224 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
225 <author email="person">person</author>
225 <author email="person">person</author>
226 <date>1970-01-18T08:40:01+00:00</date>
226 <date>1970-01-18T08:40:01+00:00</date>
227 <msg xml:space="preserve">merge</msg>
227 <msg xml:space="preserve">merge</msg>
228 </logentry>
228 </logentry>
229 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
229 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
230 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
230 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
231 <author email="person">person</author>
231 <author email="person">person</author>
232 <date>1970-01-18T08:40:00+00:00</date>
232 <date>1970-01-18T08:40:00+00:00</date>
233 <msg xml:space="preserve">new head</msg>
233 <msg xml:space="preserve">new head</msg>
234 </logentry>
234 </logentry>
235 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
235 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
236 <branch>foo</branch>
236 <branch>foo</branch>
237 <author email="person">person</author>
237 <author email="person">person</author>
238 <date>1970-01-17T04:53:20+00:00</date>
238 <date>1970-01-17T04:53:20+00:00</date>
239 <msg xml:space="preserve">new branch</msg>
239 <msg xml:space="preserve">new branch</msg>
240 </logentry>
240 </logentry>
241 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
241 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
242 <author email="person">person</author>
242 <author email="person">person</author>
243 <date>1970-01-16T01:06:40+00:00</date>
243 <date>1970-01-16T01:06:40+00:00</date>
244 <msg xml:space="preserve">no user, no domain</msg>
244 <msg xml:space="preserve">no user, no domain</msg>
245 </logentry>
245 </logentry>
246 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
246 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
247 <author email="other@place">other</author>
247 <author email="other@place">other</author>
248 <date>1970-01-14T21:20:00+00:00</date>
248 <date>1970-01-14T21:20:00+00:00</date>
249 <msg xml:space="preserve">no person</msg>
249 <msg xml:space="preserve">no person</msg>
250 </logentry>
250 </logentry>
251 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
251 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
252 <author email="other@place">A. N. Other</author>
252 <author email="other@place">A. N. Other</author>
253 <date>1970-01-13T17:33:20+00:00</date>
253 <date>1970-01-13T17:33:20+00:00</date>
254 <msg xml:space="preserve">other 1
254 <msg xml:space="preserve">other 1
255 other 2
255 other 2
256
256
257 other 3</msg>
257 other 3</msg>
258 </logentry>
258 </logentry>
259 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
259 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
260 <author email="user@hostname">User Name</author>
260 <author email="user@hostname">User Name</author>
261 <date>1970-01-12T13:46:40+00:00</date>
261 <date>1970-01-12T13:46:40+00:00</date>
262 <msg xml:space="preserve">line 1
262 <msg xml:space="preserve">line 1
263 line 2</msg>
263 line 2</msg>
264 </logentry>
264 </logentry>
265 </log>
265 </log>
266
266
267 $ hg log -v --style xml
267 $ hg log -v --style xml
268 <?xml version="1.0"?>
268 <?xml version="1.0"?>
269 <log>
269 <log>
270 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
270 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
271 <tag>tip</tag>
271 <tag>tip</tag>
272 <author email="test">test</author>
272 <author email="test">test</author>
273 <date>2020-01-01T10:01:00+00:00</date>
273 <date>2020-01-01T10:01:00+00:00</date>
274 <msg xml:space="preserve">third</msg>
274 <msg xml:space="preserve">third</msg>
275 <paths>
275 <paths>
276 <path action="A">fourth</path>
276 <path action="A">fourth</path>
277 <path action="A">third</path>
277 <path action="A">third</path>
278 <path action="R">second</path>
278 <path action="R">second</path>
279 </paths>
279 </paths>
280 <copies>
280 <copies>
281 <copy source="second">fourth</copy>
281 <copy source="second">fourth</copy>
282 </copies>
282 </copies>
283 </logentry>
283 </logentry>
284 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
284 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
285 <parent revision="-1" node="0000000000000000000000000000000000000000" />
285 <parent revision="-1" node="0000000000000000000000000000000000000000" />
286 <author email="user@hostname">User Name</author>
286 <author email="user@hostname">User Name</author>
287 <date>1970-01-12T13:46:40+00:00</date>
287 <date>1970-01-12T13:46:40+00:00</date>
288 <msg xml:space="preserve">second</msg>
288 <msg xml:space="preserve">second</msg>
289 <paths>
289 <paths>
290 <path action="A">second</path>
290 <path action="A">second</path>
291 </paths>
291 </paths>
292 </logentry>
292 </logentry>
293 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
293 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
294 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
294 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
295 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
295 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
296 <author email="person">person</author>
296 <author email="person">person</author>
297 <date>1970-01-18T08:40:01+00:00</date>
297 <date>1970-01-18T08:40:01+00:00</date>
298 <msg xml:space="preserve">merge</msg>
298 <msg xml:space="preserve">merge</msg>
299 <paths>
299 <paths>
300 </paths>
300 </paths>
301 </logentry>
301 </logentry>
302 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
302 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
303 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
303 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
304 <author email="person">person</author>
304 <author email="person">person</author>
305 <date>1970-01-18T08:40:00+00:00</date>
305 <date>1970-01-18T08:40:00+00:00</date>
306 <msg xml:space="preserve">new head</msg>
306 <msg xml:space="preserve">new head</msg>
307 <paths>
307 <paths>
308 <path action="A">d</path>
308 <path action="A">d</path>
309 </paths>
309 </paths>
310 </logentry>
310 </logentry>
311 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
311 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
312 <branch>foo</branch>
312 <branch>foo</branch>
313 <author email="person">person</author>
313 <author email="person">person</author>
314 <date>1970-01-17T04:53:20+00:00</date>
314 <date>1970-01-17T04:53:20+00:00</date>
315 <msg xml:space="preserve">new branch</msg>
315 <msg xml:space="preserve">new branch</msg>
316 <paths>
316 <paths>
317 </paths>
317 </paths>
318 </logentry>
318 </logentry>
319 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
319 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
320 <author email="person">person</author>
320 <author email="person">person</author>
321 <date>1970-01-16T01:06:40+00:00</date>
321 <date>1970-01-16T01:06:40+00:00</date>
322 <msg xml:space="preserve">no user, no domain</msg>
322 <msg xml:space="preserve">no user, no domain</msg>
323 <paths>
323 <paths>
324 <path action="M">c</path>
324 <path action="M">c</path>
325 </paths>
325 </paths>
326 </logentry>
326 </logentry>
327 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
327 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
328 <author email="other@place">other</author>
328 <author email="other@place">other</author>
329 <date>1970-01-14T21:20:00+00:00</date>
329 <date>1970-01-14T21:20:00+00:00</date>
330 <msg xml:space="preserve">no person</msg>
330 <msg xml:space="preserve">no person</msg>
331 <paths>
331 <paths>
332 <path action="A">c</path>
332 <path action="A">c</path>
333 </paths>
333 </paths>
334 </logentry>
334 </logentry>
335 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
335 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
336 <author email="other@place">A. N. Other</author>
336 <author email="other@place">A. N. Other</author>
337 <date>1970-01-13T17:33:20+00:00</date>
337 <date>1970-01-13T17:33:20+00:00</date>
338 <msg xml:space="preserve">other 1
338 <msg xml:space="preserve">other 1
339 other 2
339 other 2
340
340
341 other 3</msg>
341 other 3</msg>
342 <paths>
342 <paths>
343 <path action="A">b</path>
343 <path action="A">b</path>
344 </paths>
344 </paths>
345 </logentry>
345 </logentry>
346 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
346 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
347 <author email="user@hostname">User Name</author>
347 <author email="user@hostname">User Name</author>
348 <date>1970-01-12T13:46:40+00:00</date>
348 <date>1970-01-12T13:46:40+00:00</date>
349 <msg xml:space="preserve">line 1
349 <msg xml:space="preserve">line 1
350 line 2</msg>
350 line 2</msg>
351 <paths>
351 <paths>
352 <path action="A">a</path>
352 <path action="A">a</path>
353 </paths>
353 </paths>
354 </logentry>
354 </logentry>
355 </log>
355 </log>
356
356
357 $ hg log --debug --style xml
357 $ hg log --debug --style xml
358 <?xml version="1.0"?>
358 <?xml version="1.0"?>
359 <log>
359 <log>
360 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
360 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
361 <tag>tip</tag>
361 <tag>tip</tag>
362 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
362 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
363 <parent revision="-1" node="0000000000000000000000000000000000000000" />
363 <parent revision="-1" node="0000000000000000000000000000000000000000" />
364 <author email="test">test</author>
364 <author email="test">test</author>
365 <date>2020-01-01T10:01:00+00:00</date>
365 <date>2020-01-01T10:01:00+00:00</date>
366 <msg xml:space="preserve">third</msg>
366 <msg xml:space="preserve">third</msg>
367 <paths>
367 <paths>
368 <path action="A">fourth</path>
368 <path action="A">fourth</path>
369 <path action="A">third</path>
369 <path action="A">third</path>
370 <path action="R">second</path>
370 <path action="R">second</path>
371 </paths>
371 </paths>
372 <copies>
372 <copies>
373 <copy source="second">fourth</copy>
373 <copy source="second">fourth</copy>
374 </copies>
374 </copies>
375 <extra key="branch">default</extra>
375 <extra key="branch">default</extra>
376 </logentry>
376 </logentry>
377 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
377 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
378 <parent revision="-1" node="0000000000000000000000000000000000000000" />
378 <parent revision="-1" node="0000000000000000000000000000000000000000" />
379 <parent revision="-1" node="0000000000000000000000000000000000000000" />
379 <parent revision="-1" node="0000000000000000000000000000000000000000" />
380 <author email="user@hostname">User Name</author>
380 <author email="user@hostname">User Name</author>
381 <date>1970-01-12T13:46:40+00:00</date>
381 <date>1970-01-12T13:46:40+00:00</date>
382 <msg xml:space="preserve">second</msg>
382 <msg xml:space="preserve">second</msg>
383 <paths>
383 <paths>
384 <path action="A">second</path>
384 <path action="A">second</path>
385 </paths>
385 </paths>
386 <extra key="branch">default</extra>
386 <extra key="branch">default</extra>
387 </logentry>
387 </logentry>
388 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
388 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
389 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
389 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
390 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
390 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
391 <author email="person">person</author>
391 <author email="person">person</author>
392 <date>1970-01-18T08:40:01+00:00</date>
392 <date>1970-01-18T08:40:01+00:00</date>
393 <msg xml:space="preserve">merge</msg>
393 <msg xml:space="preserve">merge</msg>
394 <paths>
394 <paths>
395 </paths>
395 </paths>
396 <extra key="branch">default</extra>
396 <extra key="branch">default</extra>
397 </logentry>
397 </logentry>
398 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
398 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
399 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
399 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
400 <parent revision="-1" node="0000000000000000000000000000000000000000" />
400 <parent revision="-1" node="0000000000000000000000000000000000000000" />
401 <author email="person">person</author>
401 <author email="person">person</author>
402 <date>1970-01-18T08:40:00+00:00</date>
402 <date>1970-01-18T08:40:00+00:00</date>
403 <msg xml:space="preserve">new head</msg>
403 <msg xml:space="preserve">new head</msg>
404 <paths>
404 <paths>
405 <path action="A">d</path>
405 <path action="A">d</path>
406 </paths>
406 </paths>
407 <extra key="branch">default</extra>
407 <extra key="branch">default</extra>
408 </logentry>
408 </logentry>
409 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
409 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
410 <branch>foo</branch>
410 <branch>foo</branch>
411 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
411 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
412 <parent revision="-1" node="0000000000000000000000000000000000000000" />
412 <parent revision="-1" node="0000000000000000000000000000000000000000" />
413 <author email="person">person</author>
413 <author email="person">person</author>
414 <date>1970-01-17T04:53:20+00:00</date>
414 <date>1970-01-17T04:53:20+00:00</date>
415 <msg xml:space="preserve">new branch</msg>
415 <msg xml:space="preserve">new branch</msg>
416 <paths>
416 <paths>
417 </paths>
417 </paths>
418 <extra key="branch">foo</extra>
418 <extra key="branch">foo</extra>
419 </logentry>
419 </logentry>
420 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
420 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
421 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
421 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
422 <parent revision="-1" node="0000000000000000000000000000000000000000" />
422 <parent revision="-1" node="0000000000000000000000000000000000000000" />
423 <author email="person">person</author>
423 <author email="person">person</author>
424 <date>1970-01-16T01:06:40+00:00</date>
424 <date>1970-01-16T01:06:40+00:00</date>
425 <msg xml:space="preserve">no user, no domain</msg>
425 <msg xml:space="preserve">no user, no domain</msg>
426 <paths>
426 <paths>
427 <path action="M">c</path>
427 <path action="M">c</path>
428 </paths>
428 </paths>
429 <extra key="branch">default</extra>
429 <extra key="branch">default</extra>
430 </logentry>
430 </logentry>
431 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
431 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
432 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
432 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
433 <parent revision="-1" node="0000000000000000000000000000000000000000" />
433 <parent revision="-1" node="0000000000000000000000000000000000000000" />
434 <author email="other@place">other</author>
434 <author email="other@place">other</author>
435 <date>1970-01-14T21:20:00+00:00</date>
435 <date>1970-01-14T21:20:00+00:00</date>
436 <msg xml:space="preserve">no person</msg>
436 <msg xml:space="preserve">no person</msg>
437 <paths>
437 <paths>
438 <path action="A">c</path>
438 <path action="A">c</path>
439 </paths>
439 </paths>
440 <extra key="branch">default</extra>
440 <extra key="branch">default</extra>
441 </logentry>
441 </logentry>
442 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
442 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
443 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
443 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
444 <parent revision="-1" node="0000000000000000000000000000000000000000" />
444 <parent revision="-1" node="0000000000000000000000000000000000000000" />
445 <author email="other@place">A. N. Other</author>
445 <author email="other@place">A. N. Other</author>
446 <date>1970-01-13T17:33:20+00:00</date>
446 <date>1970-01-13T17:33:20+00:00</date>
447 <msg xml:space="preserve">other 1
447 <msg xml:space="preserve">other 1
448 other 2
448 other 2
449
449
450 other 3</msg>
450 other 3</msg>
451 <paths>
451 <paths>
452 <path action="A">b</path>
452 <path action="A">b</path>
453 </paths>
453 </paths>
454 <extra key="branch">default</extra>
454 <extra key="branch">default</extra>
455 </logentry>
455 </logentry>
456 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
456 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
457 <parent revision="-1" node="0000000000000000000000000000000000000000" />
457 <parent revision="-1" node="0000000000000000000000000000000000000000" />
458 <parent revision="-1" node="0000000000000000000000000000000000000000" />
458 <parent revision="-1" node="0000000000000000000000000000000000000000" />
459 <author email="user@hostname">User Name</author>
459 <author email="user@hostname">User Name</author>
460 <date>1970-01-12T13:46:40+00:00</date>
460 <date>1970-01-12T13:46:40+00:00</date>
461 <msg xml:space="preserve">line 1
461 <msg xml:space="preserve">line 1
462 line 2</msg>
462 line 2</msg>
463 <paths>
463 <paths>
464 <path action="A">a</path>
464 <path action="A">a</path>
465 </paths>
465 </paths>
466 <extra key="branch">default</extra>
466 <extra key="branch">default</extra>
467 </logentry>
467 </logentry>
468 </log>
468 </log>
469
469
470
470
471 Error if style not readable:
471 Error if style not readable:
472
472
473 #if unix-permissions no-root
473 #if unix-permissions no-root
474 $ touch q
474 $ touch q
475 $ chmod 0 q
475 $ chmod 0 q
476 $ hg log --style ./q
476 $ hg log --style ./q
477 abort: Permission denied: ./q
477 abort: Permission denied: ./q
478 [255]
478 [255]
479 #endif
479 #endif
480
480
481 Error if no style:
481 Error if no style:
482
482
483 $ hg log --style notexist
483 $ hg log --style notexist
484 abort: style 'notexist' not found
484 abort: style 'notexist' not found
485 (available styles: bisect, changelog, compact, default, phases, xml)
485 (available styles: bisect, changelog, compact, default, phases, xml)
486 [255]
486 [255]
487
487
488 Error if style missing key:
488 Error if style missing key:
489
489
490 $ echo 'q = q' > t
490 $ echo 'q = q' > t
491 $ hg log --style ./t
491 $ hg log --style ./t
492 abort: "changeset" not in template map
492 abort: "changeset" not in template map
493 [255]
493 [255]
494
494
495 Error if style missing value:
495 Error if style missing value:
496
496
497 $ echo 'changeset =' > t
497 $ echo 'changeset =' > t
498 $ hg log --style t
498 $ hg log --style t
499 abort: t:1: missing value
499 abort: t:1: missing value
500 [255]
500 [255]
501
501
502 Error if include fails:
502 Error if include fails:
503
503
504 $ echo 'changeset = q' >> t
504 $ echo 'changeset = q' >> t
505 #if unix-permissions no-root
505 #if unix-permissions no-root
506 $ hg log --style ./t
506 $ hg log --style ./t
507 abort: template file ./q: Permission denied
507 abort: template file ./q: Permission denied
508 [255]
508 [255]
509 $ rm q
509 $ rm q
510 #endif
510 #endif
511
511
512 Include works:
512 Include works:
513
513
514 $ echo '{rev}' > q
514 $ echo '{rev}' > q
515 $ hg log --style ./t
515 $ hg log --style ./t
516 8
516 8
517 7
517 7
518 6
518 6
519 5
519 5
520 4
520 4
521 3
521 3
522 2
522 2
523 1
523 1
524 0
524 0
525
525
526 Missing non-standard names give no error (backward compatibility):
526 Missing non-standard names give no error (backward compatibility):
527
527
528 $ echo "changeset = '{c}'" > t
528 $ echo "changeset = '{c}'" > t
529 $ hg log --style ./t
529 $ hg log --style ./t
530
530
531 Defining non-standard name works:
531 Defining non-standard name works:
532
532
533 $ cat <<EOF > t
533 $ cat <<EOF > t
534 > changeset = '{c}'
534 > changeset = '{c}'
535 > c = q
535 > c = q
536 > EOF
536 > EOF
537 $ hg log --style ./t
537 $ hg log --style ./t
538 8
538 8
539 7
539 7
540 6
540 6
541 5
541 5
542 4
542 4
543 3
543 3
544 2
544 2
545 1
545 1
546 0
546 0
547
547
548 ui.style works:
548 ui.style works:
549
549
550 $ echo '[ui]' > .hg/hgrc
550 $ echo '[ui]' > .hg/hgrc
551 $ echo 'style = t' >> .hg/hgrc
551 $ echo 'style = t' >> .hg/hgrc
552 $ hg log
552 $ hg log
553 8
553 8
554 7
554 7
555 6
555 6
556 5
556 5
557 4
557 4
558 3
558 3
559 2
559 2
560 1
560 1
561 0
561 0
562
562
563
563
564 Issue338:
564 Issue338:
565
565
566 $ hg log --style=changelog > changelog
566 $ hg log --style=changelog > changelog
567
567
568 $ cat changelog
568 $ cat changelog
569 2020-01-01 test <test>
569 2020-01-01 test <test>
570
570
571 * fourth, second, third:
571 * fourth, second, third:
572 third
572 third
573 [95c24699272e] [tip]
573 [95c24699272e] [tip]
574
574
575 1970-01-12 User Name <user@hostname>
575 1970-01-12 User Name <user@hostname>
576
576
577 * second:
577 * second:
578 second
578 second
579 [29114dbae42b]
579 [29114dbae42b]
580
580
581 1970-01-18 person <person>
581 1970-01-18 person <person>
582
582
583 * merge
583 * merge
584 [d41e714fe50d]
584 [d41e714fe50d]
585
585
586 * d:
586 * d:
587 new head
587 new head
588 [13207e5a10d9]
588 [13207e5a10d9]
589
589
590 1970-01-17 person <person>
590 1970-01-17 person <person>
591
591
592 * new branch
592 * new branch
593 [bbe44766e73d] <foo>
593 [bbe44766e73d] <foo>
594
594
595 1970-01-16 person <person>
595 1970-01-16 person <person>
596
596
597 * c:
597 * c:
598 no user, no domain
598 no user, no domain
599 [10e46f2dcbf4]
599 [10e46f2dcbf4]
600
600
601 1970-01-14 other <other@place>
601 1970-01-14 other <other@place>
602
602
603 * c:
603 * c:
604 no person
604 no person
605 [97054abb4ab8]
605 [97054abb4ab8]
606
606
607 1970-01-13 A. N. Other <other@place>
607 1970-01-13 A. N. Other <other@place>
608
608
609 * b:
609 * b:
610 other 1 other 2
610 other 1 other 2
611
611
612 other 3
612 other 3
613 [b608e9d1a3f0]
613 [b608e9d1a3f0]
614
614
615 1970-01-12 User Name <user@hostname>
615 1970-01-12 User Name <user@hostname>
616
616
617 * a:
617 * a:
618 line 1 line 2
618 line 1 line 2
619 [1e4e1b8f71e0]
619 [1e4e1b8f71e0]
620
620
621
621
622 Issue2130: xml output for 'hg heads' is malformed
622 Issue2130: xml output for 'hg heads' is malformed
623
623
624 $ hg heads --style changelog
624 $ hg heads --style changelog
625 2020-01-01 test <test>
625 2020-01-01 test <test>
626
626
627 * fourth, second, third:
627 * fourth, second, third:
628 third
628 third
629 [95c24699272e] [tip]
629 [95c24699272e] [tip]
630
630
631 1970-01-18 person <person>
631 1970-01-18 person <person>
632
632
633 * merge
633 * merge
634 [d41e714fe50d]
634 [d41e714fe50d]
635
635
636 1970-01-17 person <person>
636 1970-01-17 person <person>
637
637
638 * new branch
638 * new branch
639 [bbe44766e73d] <foo>
639 [bbe44766e73d] <foo>
640
640
641
641
642 Keys work:
642 Keys work:
643
643
644 $ for key in author branch branches date desc file_adds file_dels file_mods \
644 $ for key in author branch branches date desc file_adds file_dels file_mods \
645 > file_copies file_copies_switch files \
645 > file_copies file_copies_switch files \
646 > manifest node parents rev tags diffstat extras \
646 > manifest node parents rev tags diffstat extras \
647 > p1rev p2rev p1node p2node; do
647 > p1rev p2rev p1node p2node; do
648 > for mode in '' --verbose --debug; do
648 > for mode in '' --verbose --debug; do
649 > hg log $mode --template "$key$mode: {$key}\n"
649 > hg log $mode --template "$key$mode: {$key}\n"
650 > done
650 > done
651 > done
651 > done
652 author: test
652 author: test
653 author: User Name <user@hostname>
653 author: User Name <user@hostname>
654 author: person
654 author: person
655 author: person
655 author: person
656 author: person
656 author: person
657 author: person
657 author: person
658 author: other@place
658 author: other@place
659 author: A. N. Other <other@place>
659 author: A. N. Other <other@place>
660 author: User Name <user@hostname>
660 author: User Name <user@hostname>
661 author--verbose: test
661 author--verbose: test
662 author--verbose: User Name <user@hostname>
662 author--verbose: User Name <user@hostname>
663 author--verbose: person
663 author--verbose: person
664 author--verbose: person
664 author--verbose: person
665 author--verbose: person
665 author--verbose: person
666 author--verbose: person
666 author--verbose: person
667 author--verbose: other@place
667 author--verbose: other@place
668 author--verbose: A. N. Other <other@place>
668 author--verbose: A. N. Other <other@place>
669 author--verbose: User Name <user@hostname>
669 author--verbose: User Name <user@hostname>
670 author--debug: test
670 author--debug: test
671 author--debug: User Name <user@hostname>
671 author--debug: User Name <user@hostname>
672 author--debug: person
672 author--debug: person
673 author--debug: person
673 author--debug: person
674 author--debug: person
674 author--debug: person
675 author--debug: person
675 author--debug: person
676 author--debug: other@place
676 author--debug: other@place
677 author--debug: A. N. Other <other@place>
677 author--debug: A. N. Other <other@place>
678 author--debug: User Name <user@hostname>
678 author--debug: User Name <user@hostname>
679 branch: default
679 branch: default
680 branch: default
680 branch: default
681 branch: default
681 branch: default
682 branch: default
682 branch: default
683 branch: foo
683 branch: foo
684 branch: default
684 branch: default
685 branch: default
685 branch: default
686 branch: default
686 branch: default
687 branch: default
687 branch: default
688 branch--verbose: default
688 branch--verbose: default
689 branch--verbose: default
689 branch--verbose: default
690 branch--verbose: default
690 branch--verbose: default
691 branch--verbose: default
691 branch--verbose: default
692 branch--verbose: foo
692 branch--verbose: foo
693 branch--verbose: default
693 branch--verbose: default
694 branch--verbose: default
694 branch--verbose: default
695 branch--verbose: default
695 branch--verbose: default
696 branch--verbose: default
696 branch--verbose: default
697 branch--debug: default
697 branch--debug: default
698 branch--debug: default
698 branch--debug: default
699 branch--debug: default
699 branch--debug: default
700 branch--debug: default
700 branch--debug: default
701 branch--debug: foo
701 branch--debug: foo
702 branch--debug: default
702 branch--debug: default
703 branch--debug: default
703 branch--debug: default
704 branch--debug: default
704 branch--debug: default
705 branch--debug: default
705 branch--debug: default
706 branches:
706 branches:
707 branches:
707 branches:
708 branches:
708 branches:
709 branches:
709 branches:
710 branches: foo
710 branches: foo
711 branches:
711 branches:
712 branches:
712 branches:
713 branches:
713 branches:
714 branches:
714 branches:
715 branches--verbose:
715 branches--verbose:
716 branches--verbose:
716 branches--verbose:
717 branches--verbose:
717 branches--verbose:
718 branches--verbose:
718 branches--verbose:
719 branches--verbose: foo
719 branches--verbose: foo
720 branches--verbose:
720 branches--verbose:
721 branches--verbose:
721 branches--verbose:
722 branches--verbose:
722 branches--verbose:
723 branches--verbose:
723 branches--verbose:
724 branches--debug:
724 branches--debug:
725 branches--debug:
725 branches--debug:
726 branches--debug:
726 branches--debug:
727 branches--debug:
727 branches--debug:
728 branches--debug: foo
728 branches--debug: foo
729 branches--debug:
729 branches--debug:
730 branches--debug:
730 branches--debug:
731 branches--debug:
731 branches--debug:
732 branches--debug:
732 branches--debug:
733 date: 1577872860.00
733 date: 1577872860.00
734 date: 1000000.00
734 date: 1000000.00
735 date: 1500001.00
735 date: 1500001.00
736 date: 1500000.00
736 date: 1500000.00
737 date: 1400000.00
737 date: 1400000.00
738 date: 1300000.00
738 date: 1300000.00
739 date: 1200000.00
739 date: 1200000.00
740 date: 1100000.00
740 date: 1100000.00
741 date: 1000000.00
741 date: 1000000.00
742 date--verbose: 1577872860.00
742 date--verbose: 1577872860.00
743 date--verbose: 1000000.00
743 date--verbose: 1000000.00
744 date--verbose: 1500001.00
744 date--verbose: 1500001.00
745 date--verbose: 1500000.00
745 date--verbose: 1500000.00
746 date--verbose: 1400000.00
746 date--verbose: 1400000.00
747 date--verbose: 1300000.00
747 date--verbose: 1300000.00
748 date--verbose: 1200000.00
748 date--verbose: 1200000.00
749 date--verbose: 1100000.00
749 date--verbose: 1100000.00
750 date--verbose: 1000000.00
750 date--verbose: 1000000.00
751 date--debug: 1577872860.00
751 date--debug: 1577872860.00
752 date--debug: 1000000.00
752 date--debug: 1000000.00
753 date--debug: 1500001.00
753 date--debug: 1500001.00
754 date--debug: 1500000.00
754 date--debug: 1500000.00
755 date--debug: 1400000.00
755 date--debug: 1400000.00
756 date--debug: 1300000.00
756 date--debug: 1300000.00
757 date--debug: 1200000.00
757 date--debug: 1200000.00
758 date--debug: 1100000.00
758 date--debug: 1100000.00
759 date--debug: 1000000.00
759 date--debug: 1000000.00
760 desc: third
760 desc: third
761 desc: second
761 desc: second
762 desc: merge
762 desc: merge
763 desc: new head
763 desc: new head
764 desc: new branch
764 desc: new branch
765 desc: no user, no domain
765 desc: no user, no domain
766 desc: no person
766 desc: no person
767 desc: other 1
767 desc: other 1
768 other 2
768 other 2
769
769
770 other 3
770 other 3
771 desc: line 1
771 desc: line 1
772 line 2
772 line 2
773 desc--verbose: third
773 desc--verbose: third
774 desc--verbose: second
774 desc--verbose: second
775 desc--verbose: merge
775 desc--verbose: merge
776 desc--verbose: new head
776 desc--verbose: new head
777 desc--verbose: new branch
777 desc--verbose: new branch
778 desc--verbose: no user, no domain
778 desc--verbose: no user, no domain
779 desc--verbose: no person
779 desc--verbose: no person
780 desc--verbose: other 1
780 desc--verbose: other 1
781 other 2
781 other 2
782
782
783 other 3
783 other 3
784 desc--verbose: line 1
784 desc--verbose: line 1
785 line 2
785 line 2
786 desc--debug: third
786 desc--debug: third
787 desc--debug: second
787 desc--debug: second
788 desc--debug: merge
788 desc--debug: merge
789 desc--debug: new head
789 desc--debug: new head
790 desc--debug: new branch
790 desc--debug: new branch
791 desc--debug: no user, no domain
791 desc--debug: no user, no domain
792 desc--debug: no person
792 desc--debug: no person
793 desc--debug: other 1
793 desc--debug: other 1
794 other 2
794 other 2
795
795
796 other 3
796 other 3
797 desc--debug: line 1
797 desc--debug: line 1
798 line 2
798 line 2
799 file_adds: fourth third
799 file_adds: fourth third
800 file_adds: second
800 file_adds: second
801 file_adds:
801 file_adds:
802 file_adds: d
802 file_adds: d
803 file_adds:
803 file_adds:
804 file_adds:
804 file_adds:
805 file_adds: c
805 file_adds: c
806 file_adds: b
806 file_adds: b
807 file_adds: a
807 file_adds: a
808 file_adds--verbose: fourth third
808 file_adds--verbose: fourth third
809 file_adds--verbose: second
809 file_adds--verbose: second
810 file_adds--verbose:
810 file_adds--verbose:
811 file_adds--verbose: d
811 file_adds--verbose: d
812 file_adds--verbose:
812 file_adds--verbose:
813 file_adds--verbose:
813 file_adds--verbose:
814 file_adds--verbose: c
814 file_adds--verbose: c
815 file_adds--verbose: b
815 file_adds--verbose: b
816 file_adds--verbose: a
816 file_adds--verbose: a
817 file_adds--debug: fourth third
817 file_adds--debug: fourth third
818 file_adds--debug: second
818 file_adds--debug: second
819 file_adds--debug:
819 file_adds--debug:
820 file_adds--debug: d
820 file_adds--debug: d
821 file_adds--debug:
821 file_adds--debug:
822 file_adds--debug:
822 file_adds--debug:
823 file_adds--debug: c
823 file_adds--debug: c
824 file_adds--debug: b
824 file_adds--debug: b
825 file_adds--debug: a
825 file_adds--debug: a
826 file_dels: second
826 file_dels: second
827 file_dels:
827 file_dels:
828 file_dels:
828 file_dels:
829 file_dels:
829 file_dels:
830 file_dels:
830 file_dels:
831 file_dels:
831 file_dels:
832 file_dels:
832 file_dels:
833 file_dels:
833 file_dels:
834 file_dels:
834 file_dels:
835 file_dels--verbose: second
835 file_dels--verbose: second
836 file_dels--verbose:
836 file_dels--verbose:
837 file_dels--verbose:
837 file_dels--verbose:
838 file_dels--verbose:
838 file_dels--verbose:
839 file_dels--verbose:
839 file_dels--verbose:
840 file_dels--verbose:
840 file_dels--verbose:
841 file_dels--verbose:
841 file_dels--verbose:
842 file_dels--verbose:
842 file_dels--verbose:
843 file_dels--verbose:
843 file_dels--verbose:
844 file_dels--debug: second
844 file_dels--debug: second
845 file_dels--debug:
845 file_dels--debug:
846 file_dels--debug:
846 file_dels--debug:
847 file_dels--debug:
847 file_dels--debug:
848 file_dels--debug:
848 file_dels--debug:
849 file_dels--debug:
849 file_dels--debug:
850 file_dels--debug:
850 file_dels--debug:
851 file_dels--debug:
851 file_dels--debug:
852 file_dels--debug:
852 file_dels--debug:
853 file_mods:
853 file_mods:
854 file_mods:
854 file_mods:
855 file_mods:
855 file_mods:
856 file_mods:
856 file_mods:
857 file_mods:
857 file_mods:
858 file_mods: c
858 file_mods: c
859 file_mods:
859 file_mods:
860 file_mods:
860 file_mods:
861 file_mods:
861 file_mods:
862 file_mods--verbose:
862 file_mods--verbose:
863 file_mods--verbose:
863 file_mods--verbose:
864 file_mods--verbose:
864 file_mods--verbose:
865 file_mods--verbose:
865 file_mods--verbose:
866 file_mods--verbose:
866 file_mods--verbose:
867 file_mods--verbose: c
867 file_mods--verbose: c
868 file_mods--verbose:
868 file_mods--verbose:
869 file_mods--verbose:
869 file_mods--verbose:
870 file_mods--verbose:
870 file_mods--verbose:
871 file_mods--debug:
871 file_mods--debug:
872 file_mods--debug:
872 file_mods--debug:
873 file_mods--debug:
873 file_mods--debug:
874 file_mods--debug:
874 file_mods--debug:
875 file_mods--debug:
875 file_mods--debug:
876 file_mods--debug: c
876 file_mods--debug: c
877 file_mods--debug:
877 file_mods--debug:
878 file_mods--debug:
878 file_mods--debug:
879 file_mods--debug:
879 file_mods--debug:
880 file_copies: fourth (second)
880 file_copies: fourth (second)
881 file_copies:
881 file_copies:
882 file_copies:
882 file_copies:
883 file_copies:
883 file_copies:
884 file_copies:
884 file_copies:
885 file_copies:
885 file_copies:
886 file_copies:
886 file_copies:
887 file_copies:
887 file_copies:
888 file_copies:
888 file_copies:
889 file_copies--verbose: fourth (second)
889 file_copies--verbose: fourth (second)
890 file_copies--verbose:
890 file_copies--verbose:
891 file_copies--verbose:
891 file_copies--verbose:
892 file_copies--verbose:
892 file_copies--verbose:
893 file_copies--verbose:
893 file_copies--verbose:
894 file_copies--verbose:
894 file_copies--verbose:
895 file_copies--verbose:
895 file_copies--verbose:
896 file_copies--verbose:
896 file_copies--verbose:
897 file_copies--verbose:
897 file_copies--verbose:
898 file_copies--debug: fourth (second)
898 file_copies--debug: fourth (second)
899 file_copies--debug:
899 file_copies--debug:
900 file_copies--debug:
900 file_copies--debug:
901 file_copies--debug:
901 file_copies--debug:
902 file_copies--debug:
902 file_copies--debug:
903 file_copies--debug:
903 file_copies--debug:
904 file_copies--debug:
904 file_copies--debug:
905 file_copies--debug:
905 file_copies--debug:
906 file_copies--debug:
906 file_copies--debug:
907 file_copies_switch:
907 file_copies_switch:
908 file_copies_switch:
908 file_copies_switch:
909 file_copies_switch:
909 file_copies_switch:
910 file_copies_switch:
910 file_copies_switch:
911 file_copies_switch:
911 file_copies_switch:
912 file_copies_switch:
912 file_copies_switch:
913 file_copies_switch:
913 file_copies_switch:
914 file_copies_switch:
914 file_copies_switch:
915 file_copies_switch:
915 file_copies_switch:
916 file_copies_switch--verbose:
916 file_copies_switch--verbose:
917 file_copies_switch--verbose:
917 file_copies_switch--verbose:
918 file_copies_switch--verbose:
918 file_copies_switch--verbose:
919 file_copies_switch--verbose:
919 file_copies_switch--verbose:
920 file_copies_switch--verbose:
920 file_copies_switch--verbose:
921 file_copies_switch--verbose:
921 file_copies_switch--verbose:
922 file_copies_switch--verbose:
922 file_copies_switch--verbose:
923 file_copies_switch--verbose:
923 file_copies_switch--verbose:
924 file_copies_switch--verbose:
924 file_copies_switch--verbose:
925 file_copies_switch--debug:
925 file_copies_switch--debug:
926 file_copies_switch--debug:
926 file_copies_switch--debug:
927 file_copies_switch--debug:
927 file_copies_switch--debug:
928 file_copies_switch--debug:
928 file_copies_switch--debug:
929 file_copies_switch--debug:
929 file_copies_switch--debug:
930 file_copies_switch--debug:
930 file_copies_switch--debug:
931 file_copies_switch--debug:
931 file_copies_switch--debug:
932 file_copies_switch--debug:
932 file_copies_switch--debug:
933 file_copies_switch--debug:
933 file_copies_switch--debug:
934 files: fourth second third
934 files: fourth second third
935 files: second
935 files: second
936 files:
936 files:
937 files: d
937 files: d
938 files:
938 files:
939 files: c
939 files: c
940 files: c
940 files: c
941 files: b
941 files: b
942 files: a
942 files: a
943 files--verbose: fourth second third
943 files--verbose: fourth second third
944 files--verbose: second
944 files--verbose: second
945 files--verbose:
945 files--verbose:
946 files--verbose: d
946 files--verbose: d
947 files--verbose:
947 files--verbose:
948 files--verbose: c
948 files--verbose: c
949 files--verbose: c
949 files--verbose: c
950 files--verbose: b
950 files--verbose: b
951 files--verbose: a
951 files--verbose: a
952 files--debug: fourth second third
952 files--debug: fourth second third
953 files--debug: second
953 files--debug: second
954 files--debug:
954 files--debug:
955 files--debug: d
955 files--debug: d
956 files--debug:
956 files--debug:
957 files--debug: c
957 files--debug: c
958 files--debug: c
958 files--debug: c
959 files--debug: b
959 files--debug: b
960 files--debug: a
960 files--debug: a
961 manifest: 6:94961b75a2da
961 manifest: 6:94961b75a2da
962 manifest: 5:f2dbc354b94e
962 manifest: 5:f2dbc354b94e
963 manifest: 4:4dc3def4f9b4
963 manifest: 4:4dc3def4f9b4
964 manifest: 4:4dc3def4f9b4
964 manifest: 4:4dc3def4f9b4
965 manifest: 3:cb5a1327723b
965 manifest: 3:cb5a1327723b
966 manifest: 3:cb5a1327723b
966 manifest: 3:cb5a1327723b
967 manifest: 2:6e0e82995c35
967 manifest: 2:6e0e82995c35
968 manifest: 1:4e8d705b1e53
968 manifest: 1:4e8d705b1e53
969 manifest: 0:a0c8bcbbb45c
969 manifest: 0:a0c8bcbbb45c
970 manifest--verbose: 6:94961b75a2da
970 manifest--verbose: 6:94961b75a2da
971 manifest--verbose: 5:f2dbc354b94e
971 manifest--verbose: 5:f2dbc354b94e
972 manifest--verbose: 4:4dc3def4f9b4
972 manifest--verbose: 4:4dc3def4f9b4
973 manifest--verbose: 4:4dc3def4f9b4
973 manifest--verbose: 4:4dc3def4f9b4
974 manifest--verbose: 3:cb5a1327723b
974 manifest--verbose: 3:cb5a1327723b
975 manifest--verbose: 3:cb5a1327723b
975 manifest--verbose: 3:cb5a1327723b
976 manifest--verbose: 2:6e0e82995c35
976 manifest--verbose: 2:6e0e82995c35
977 manifest--verbose: 1:4e8d705b1e53
977 manifest--verbose: 1:4e8d705b1e53
978 manifest--verbose: 0:a0c8bcbbb45c
978 manifest--verbose: 0:a0c8bcbbb45c
979 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
979 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
980 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
980 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
981 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
981 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
982 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
982 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
983 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
983 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
984 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
984 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
985 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
985 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
986 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
986 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
987 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
987 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
988 node: 95c24699272ef57d062b8bccc32c878bf841784a
988 node: 95c24699272ef57d062b8bccc32c878bf841784a
989 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
989 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
990 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
990 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
991 node: 13207e5a10d9fd28ec424934298e176197f2c67f
991 node: 13207e5a10d9fd28ec424934298e176197f2c67f
992 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
992 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
993 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
993 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
994 node: 97054abb4ab824450e9164180baf491ae0078465
994 node: 97054abb4ab824450e9164180baf491ae0078465
995 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
995 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
996 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
996 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
997 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
997 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
998 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
998 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
999 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
999 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1000 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1000 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1001 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1001 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1002 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1002 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1003 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1003 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1004 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1004 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1005 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1005 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1006 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1006 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
1007 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1007 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1008 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1008 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
1009 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1009 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1010 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1010 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1011 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1011 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1012 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1012 node--debug: 97054abb4ab824450e9164180baf491ae0078465
1013 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1013 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1014 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1014 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1015 parents:
1015 parents:
1016 parents: -1:000000000000
1016 parents: -1:000000000000
1017 parents: 5:13207e5a10d9 4:bbe44766e73d
1017 parents: 5:13207e5a10d9 4:bbe44766e73d
1018 parents: 3:10e46f2dcbf4
1018 parents: 3:10e46f2dcbf4
1019 parents:
1019 parents:
1020 parents:
1020 parents:
1021 parents:
1021 parents:
1022 parents:
1022 parents:
1023 parents:
1023 parents:
1024 parents--verbose:
1024 parents--verbose:
1025 parents--verbose: -1:000000000000
1025 parents--verbose: -1:000000000000
1026 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1026 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
1027 parents--verbose: 3:10e46f2dcbf4
1027 parents--verbose: 3:10e46f2dcbf4
1028 parents--verbose:
1028 parents--verbose:
1029 parents--verbose:
1029 parents--verbose:
1030 parents--verbose:
1030 parents--verbose:
1031 parents--verbose:
1031 parents--verbose:
1032 parents--verbose:
1032 parents--verbose:
1033 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1033 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
1034 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1034 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1035 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1035 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
1036 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1036 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1037 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1037 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
1038 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1038 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
1039 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1039 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
1040 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1040 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
1041 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1041 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
1042 rev: 8
1042 rev: 8
1043 rev: 7
1043 rev: 7
1044 rev: 6
1044 rev: 6
1045 rev: 5
1045 rev: 5
1046 rev: 4
1046 rev: 4
1047 rev: 3
1047 rev: 3
1048 rev: 2
1048 rev: 2
1049 rev: 1
1049 rev: 1
1050 rev: 0
1050 rev: 0
1051 rev--verbose: 8
1051 rev--verbose: 8
1052 rev--verbose: 7
1052 rev--verbose: 7
1053 rev--verbose: 6
1053 rev--verbose: 6
1054 rev--verbose: 5
1054 rev--verbose: 5
1055 rev--verbose: 4
1055 rev--verbose: 4
1056 rev--verbose: 3
1056 rev--verbose: 3
1057 rev--verbose: 2
1057 rev--verbose: 2
1058 rev--verbose: 1
1058 rev--verbose: 1
1059 rev--verbose: 0
1059 rev--verbose: 0
1060 rev--debug: 8
1060 rev--debug: 8
1061 rev--debug: 7
1061 rev--debug: 7
1062 rev--debug: 6
1062 rev--debug: 6
1063 rev--debug: 5
1063 rev--debug: 5
1064 rev--debug: 4
1064 rev--debug: 4
1065 rev--debug: 3
1065 rev--debug: 3
1066 rev--debug: 2
1066 rev--debug: 2
1067 rev--debug: 1
1067 rev--debug: 1
1068 rev--debug: 0
1068 rev--debug: 0
1069 tags: tip
1069 tags: tip
1070 tags:
1070 tags:
1071 tags:
1071 tags:
1072 tags:
1072 tags:
1073 tags:
1073 tags:
1074 tags:
1074 tags:
1075 tags:
1075 tags:
1076 tags:
1076 tags:
1077 tags:
1077 tags:
1078 tags--verbose: tip
1078 tags--verbose: tip
1079 tags--verbose:
1079 tags--verbose:
1080 tags--verbose:
1080 tags--verbose:
1081 tags--verbose:
1081 tags--verbose:
1082 tags--verbose:
1082 tags--verbose:
1083 tags--verbose:
1083 tags--verbose:
1084 tags--verbose:
1084 tags--verbose:
1085 tags--verbose:
1085 tags--verbose:
1086 tags--verbose:
1086 tags--verbose:
1087 tags--debug: tip
1087 tags--debug: tip
1088 tags--debug:
1088 tags--debug:
1089 tags--debug:
1089 tags--debug:
1090 tags--debug:
1090 tags--debug:
1091 tags--debug:
1091 tags--debug:
1092 tags--debug:
1092 tags--debug:
1093 tags--debug:
1093 tags--debug:
1094 tags--debug:
1094 tags--debug:
1095 tags--debug:
1095 tags--debug:
1096 diffstat: 3: +2/-1
1096 diffstat: 3: +2/-1
1097 diffstat: 1: +1/-0
1097 diffstat: 1: +1/-0
1098 diffstat: 0: +0/-0
1098 diffstat: 0: +0/-0
1099 diffstat: 1: +1/-0
1099 diffstat: 1: +1/-0
1100 diffstat: 0: +0/-0
1100 diffstat: 0: +0/-0
1101 diffstat: 1: +1/-0
1101 diffstat: 1: +1/-0
1102 diffstat: 1: +4/-0
1102 diffstat: 1: +4/-0
1103 diffstat: 1: +2/-0
1103 diffstat: 1: +2/-0
1104 diffstat: 1: +1/-0
1104 diffstat: 1: +1/-0
1105 diffstat--verbose: 3: +2/-1
1105 diffstat--verbose: 3: +2/-1
1106 diffstat--verbose: 1: +1/-0
1106 diffstat--verbose: 1: +1/-0
1107 diffstat--verbose: 0: +0/-0
1107 diffstat--verbose: 0: +0/-0
1108 diffstat--verbose: 1: +1/-0
1108 diffstat--verbose: 1: +1/-0
1109 diffstat--verbose: 0: +0/-0
1109 diffstat--verbose: 0: +0/-0
1110 diffstat--verbose: 1: +1/-0
1110 diffstat--verbose: 1: +1/-0
1111 diffstat--verbose: 1: +4/-0
1111 diffstat--verbose: 1: +4/-0
1112 diffstat--verbose: 1: +2/-0
1112 diffstat--verbose: 1: +2/-0
1113 diffstat--verbose: 1: +1/-0
1113 diffstat--verbose: 1: +1/-0
1114 diffstat--debug: 3: +2/-1
1114 diffstat--debug: 3: +2/-1
1115 diffstat--debug: 1: +1/-0
1115 diffstat--debug: 1: +1/-0
1116 diffstat--debug: 0: +0/-0
1116 diffstat--debug: 0: +0/-0
1117 diffstat--debug: 1: +1/-0
1117 diffstat--debug: 1: +1/-0
1118 diffstat--debug: 0: +0/-0
1118 diffstat--debug: 0: +0/-0
1119 diffstat--debug: 1: +1/-0
1119 diffstat--debug: 1: +1/-0
1120 diffstat--debug: 1: +4/-0
1120 diffstat--debug: 1: +4/-0
1121 diffstat--debug: 1: +2/-0
1121 diffstat--debug: 1: +2/-0
1122 diffstat--debug: 1: +1/-0
1122 diffstat--debug: 1: +1/-0
1123 extras: branch=default
1123 extras: branch=default
1124 extras: branch=default
1124 extras: branch=default
1125 extras: branch=default
1125 extras: branch=default
1126 extras: branch=default
1126 extras: branch=default
1127 extras: branch=foo
1127 extras: branch=foo
1128 extras: branch=default
1128 extras: branch=default
1129 extras: branch=default
1129 extras: branch=default
1130 extras: branch=default
1130 extras: branch=default
1131 extras: branch=default
1131 extras: branch=default
1132 extras--verbose: branch=default
1132 extras--verbose: branch=default
1133 extras--verbose: branch=default
1133 extras--verbose: branch=default
1134 extras--verbose: branch=default
1134 extras--verbose: branch=default
1135 extras--verbose: branch=default
1135 extras--verbose: branch=default
1136 extras--verbose: branch=foo
1136 extras--verbose: branch=foo
1137 extras--verbose: branch=default
1137 extras--verbose: branch=default
1138 extras--verbose: branch=default
1138 extras--verbose: branch=default
1139 extras--verbose: branch=default
1139 extras--verbose: branch=default
1140 extras--verbose: branch=default
1140 extras--verbose: branch=default
1141 extras--debug: branch=default
1141 extras--debug: branch=default
1142 extras--debug: branch=default
1142 extras--debug: branch=default
1143 extras--debug: branch=default
1143 extras--debug: branch=default
1144 extras--debug: branch=default
1144 extras--debug: branch=default
1145 extras--debug: branch=foo
1145 extras--debug: branch=foo
1146 extras--debug: branch=default
1146 extras--debug: branch=default
1147 extras--debug: branch=default
1147 extras--debug: branch=default
1148 extras--debug: branch=default
1148 extras--debug: branch=default
1149 extras--debug: branch=default
1149 extras--debug: branch=default
1150 p1rev: 7
1150 p1rev: 7
1151 p1rev: -1
1151 p1rev: -1
1152 p1rev: 5
1152 p1rev: 5
1153 p1rev: 3
1153 p1rev: 3
1154 p1rev: 3
1154 p1rev: 3
1155 p1rev: 2
1155 p1rev: 2
1156 p1rev: 1
1156 p1rev: 1
1157 p1rev: 0
1157 p1rev: 0
1158 p1rev: -1
1158 p1rev: -1
1159 p1rev--verbose: 7
1159 p1rev--verbose: 7
1160 p1rev--verbose: -1
1160 p1rev--verbose: -1
1161 p1rev--verbose: 5
1161 p1rev--verbose: 5
1162 p1rev--verbose: 3
1162 p1rev--verbose: 3
1163 p1rev--verbose: 3
1163 p1rev--verbose: 3
1164 p1rev--verbose: 2
1164 p1rev--verbose: 2
1165 p1rev--verbose: 1
1165 p1rev--verbose: 1
1166 p1rev--verbose: 0
1166 p1rev--verbose: 0
1167 p1rev--verbose: -1
1167 p1rev--verbose: -1
1168 p1rev--debug: 7
1168 p1rev--debug: 7
1169 p1rev--debug: -1
1169 p1rev--debug: -1
1170 p1rev--debug: 5
1170 p1rev--debug: 5
1171 p1rev--debug: 3
1171 p1rev--debug: 3
1172 p1rev--debug: 3
1172 p1rev--debug: 3
1173 p1rev--debug: 2
1173 p1rev--debug: 2
1174 p1rev--debug: 1
1174 p1rev--debug: 1
1175 p1rev--debug: 0
1175 p1rev--debug: 0
1176 p1rev--debug: -1
1176 p1rev--debug: -1
1177 p2rev: -1
1177 p2rev: -1
1178 p2rev: -1
1178 p2rev: -1
1179 p2rev: 4
1179 p2rev: 4
1180 p2rev: -1
1180 p2rev: -1
1181 p2rev: -1
1181 p2rev: -1
1182 p2rev: -1
1182 p2rev: -1
1183 p2rev: -1
1183 p2rev: -1
1184 p2rev: -1
1184 p2rev: -1
1185 p2rev: -1
1185 p2rev: -1
1186 p2rev--verbose: -1
1186 p2rev--verbose: -1
1187 p2rev--verbose: -1
1187 p2rev--verbose: -1
1188 p2rev--verbose: 4
1188 p2rev--verbose: 4
1189 p2rev--verbose: -1
1189 p2rev--verbose: -1
1190 p2rev--verbose: -1
1190 p2rev--verbose: -1
1191 p2rev--verbose: -1
1191 p2rev--verbose: -1
1192 p2rev--verbose: -1
1192 p2rev--verbose: -1
1193 p2rev--verbose: -1
1193 p2rev--verbose: -1
1194 p2rev--verbose: -1
1194 p2rev--verbose: -1
1195 p2rev--debug: -1
1195 p2rev--debug: -1
1196 p2rev--debug: -1
1196 p2rev--debug: -1
1197 p2rev--debug: 4
1197 p2rev--debug: 4
1198 p2rev--debug: -1
1198 p2rev--debug: -1
1199 p2rev--debug: -1
1199 p2rev--debug: -1
1200 p2rev--debug: -1
1200 p2rev--debug: -1
1201 p2rev--debug: -1
1201 p2rev--debug: -1
1202 p2rev--debug: -1
1202 p2rev--debug: -1
1203 p2rev--debug: -1
1203 p2rev--debug: -1
1204 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1204 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1205 p1node: 0000000000000000000000000000000000000000
1205 p1node: 0000000000000000000000000000000000000000
1206 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1206 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1207 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1207 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1208 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1208 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1209 p1node: 97054abb4ab824450e9164180baf491ae0078465
1209 p1node: 97054abb4ab824450e9164180baf491ae0078465
1210 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1210 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1211 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1211 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1212 p1node: 0000000000000000000000000000000000000000
1212 p1node: 0000000000000000000000000000000000000000
1213 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1213 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1214 p1node--verbose: 0000000000000000000000000000000000000000
1214 p1node--verbose: 0000000000000000000000000000000000000000
1215 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1215 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1216 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1216 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1217 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1217 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1218 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1218 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1219 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1219 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1220 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1220 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1221 p1node--verbose: 0000000000000000000000000000000000000000
1221 p1node--verbose: 0000000000000000000000000000000000000000
1222 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1222 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1223 p1node--debug: 0000000000000000000000000000000000000000
1223 p1node--debug: 0000000000000000000000000000000000000000
1224 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1224 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1225 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1225 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1226 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1226 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1227 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1227 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1228 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1228 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1229 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1229 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1230 p1node--debug: 0000000000000000000000000000000000000000
1230 p1node--debug: 0000000000000000000000000000000000000000
1231 p2node: 0000000000000000000000000000000000000000
1231 p2node: 0000000000000000000000000000000000000000
1232 p2node: 0000000000000000000000000000000000000000
1232 p2node: 0000000000000000000000000000000000000000
1233 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1233 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1234 p2node: 0000000000000000000000000000000000000000
1234 p2node: 0000000000000000000000000000000000000000
1235 p2node: 0000000000000000000000000000000000000000
1235 p2node: 0000000000000000000000000000000000000000
1236 p2node: 0000000000000000000000000000000000000000
1236 p2node: 0000000000000000000000000000000000000000
1237 p2node: 0000000000000000000000000000000000000000
1237 p2node: 0000000000000000000000000000000000000000
1238 p2node: 0000000000000000000000000000000000000000
1238 p2node: 0000000000000000000000000000000000000000
1239 p2node: 0000000000000000000000000000000000000000
1239 p2node: 0000000000000000000000000000000000000000
1240 p2node--verbose: 0000000000000000000000000000000000000000
1240 p2node--verbose: 0000000000000000000000000000000000000000
1241 p2node--verbose: 0000000000000000000000000000000000000000
1241 p2node--verbose: 0000000000000000000000000000000000000000
1242 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1242 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1243 p2node--verbose: 0000000000000000000000000000000000000000
1243 p2node--verbose: 0000000000000000000000000000000000000000
1244 p2node--verbose: 0000000000000000000000000000000000000000
1244 p2node--verbose: 0000000000000000000000000000000000000000
1245 p2node--verbose: 0000000000000000000000000000000000000000
1245 p2node--verbose: 0000000000000000000000000000000000000000
1246 p2node--verbose: 0000000000000000000000000000000000000000
1246 p2node--verbose: 0000000000000000000000000000000000000000
1247 p2node--verbose: 0000000000000000000000000000000000000000
1247 p2node--verbose: 0000000000000000000000000000000000000000
1248 p2node--verbose: 0000000000000000000000000000000000000000
1248 p2node--verbose: 0000000000000000000000000000000000000000
1249 p2node--debug: 0000000000000000000000000000000000000000
1249 p2node--debug: 0000000000000000000000000000000000000000
1250 p2node--debug: 0000000000000000000000000000000000000000
1250 p2node--debug: 0000000000000000000000000000000000000000
1251 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1251 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1252 p2node--debug: 0000000000000000000000000000000000000000
1252 p2node--debug: 0000000000000000000000000000000000000000
1253 p2node--debug: 0000000000000000000000000000000000000000
1253 p2node--debug: 0000000000000000000000000000000000000000
1254 p2node--debug: 0000000000000000000000000000000000000000
1254 p2node--debug: 0000000000000000000000000000000000000000
1255 p2node--debug: 0000000000000000000000000000000000000000
1255 p2node--debug: 0000000000000000000000000000000000000000
1256 p2node--debug: 0000000000000000000000000000000000000000
1256 p2node--debug: 0000000000000000000000000000000000000000
1257 p2node--debug: 0000000000000000000000000000000000000000
1257 p2node--debug: 0000000000000000000000000000000000000000
1258
1258
1259 Filters work:
1259 Filters work:
1260
1260
1261 $ hg log --template '{author|domain}\n'
1261 $ hg log --template '{author|domain}\n'
1262
1262
1263 hostname
1263 hostname
1264
1264
1265
1265
1266
1266
1267
1267
1268 place
1268 place
1269 place
1269 place
1270 hostname
1270 hostname
1271
1271
1272 $ hg log --template '{author|person}\n'
1272 $ hg log --template '{author|person}\n'
1273 test
1273 test
1274 User Name
1274 User Name
1275 person
1275 person
1276 person
1276 person
1277 person
1277 person
1278 person
1278 person
1279 other
1279 other
1280 A. N. Other
1280 A. N. Other
1281 User Name
1281 User Name
1282
1282
1283 $ hg log --template '{author|user}\n'
1283 $ hg log --template '{author|user}\n'
1284 test
1284 test
1285 user
1285 user
1286 person
1286 person
1287 person
1287 person
1288 person
1288 person
1289 person
1289 person
1290 other
1290 other
1291 other
1291 other
1292 user
1292 user
1293
1293
1294 $ hg log --template '{date|date}\n'
1294 $ hg log --template '{date|date}\n'
1295 Wed Jan 01 10:01:00 2020 +0000
1295 Wed Jan 01 10:01:00 2020 +0000
1296 Mon Jan 12 13:46:40 1970 +0000
1296 Mon Jan 12 13:46:40 1970 +0000
1297 Sun Jan 18 08:40:01 1970 +0000
1297 Sun Jan 18 08:40:01 1970 +0000
1298 Sun Jan 18 08:40:00 1970 +0000
1298 Sun Jan 18 08:40:00 1970 +0000
1299 Sat Jan 17 04:53:20 1970 +0000
1299 Sat Jan 17 04:53:20 1970 +0000
1300 Fri Jan 16 01:06:40 1970 +0000
1300 Fri Jan 16 01:06:40 1970 +0000
1301 Wed Jan 14 21:20:00 1970 +0000
1301 Wed Jan 14 21:20:00 1970 +0000
1302 Tue Jan 13 17:33:20 1970 +0000
1302 Tue Jan 13 17:33:20 1970 +0000
1303 Mon Jan 12 13:46:40 1970 +0000
1303 Mon Jan 12 13:46:40 1970 +0000
1304
1304
1305 $ hg log --template '{date|isodate}\n'
1305 $ hg log --template '{date|isodate}\n'
1306 2020-01-01 10:01 +0000
1306 2020-01-01 10:01 +0000
1307 1970-01-12 13:46 +0000
1307 1970-01-12 13:46 +0000
1308 1970-01-18 08:40 +0000
1308 1970-01-18 08:40 +0000
1309 1970-01-18 08:40 +0000
1309 1970-01-18 08:40 +0000
1310 1970-01-17 04:53 +0000
1310 1970-01-17 04:53 +0000
1311 1970-01-16 01:06 +0000
1311 1970-01-16 01:06 +0000
1312 1970-01-14 21:20 +0000
1312 1970-01-14 21:20 +0000
1313 1970-01-13 17:33 +0000
1313 1970-01-13 17:33 +0000
1314 1970-01-12 13:46 +0000
1314 1970-01-12 13:46 +0000
1315
1315
1316 $ hg log --template '{date|isodatesec}\n'
1316 $ hg log --template '{date|isodatesec}\n'
1317 2020-01-01 10:01:00 +0000
1317 2020-01-01 10:01:00 +0000
1318 1970-01-12 13:46:40 +0000
1318 1970-01-12 13:46:40 +0000
1319 1970-01-18 08:40:01 +0000
1319 1970-01-18 08:40:01 +0000
1320 1970-01-18 08:40:00 +0000
1320 1970-01-18 08:40:00 +0000
1321 1970-01-17 04:53:20 +0000
1321 1970-01-17 04:53:20 +0000
1322 1970-01-16 01:06:40 +0000
1322 1970-01-16 01:06:40 +0000
1323 1970-01-14 21:20:00 +0000
1323 1970-01-14 21:20:00 +0000
1324 1970-01-13 17:33:20 +0000
1324 1970-01-13 17:33:20 +0000
1325 1970-01-12 13:46:40 +0000
1325 1970-01-12 13:46:40 +0000
1326
1326
1327 $ hg log --template '{date|rfc822date}\n'
1327 $ hg log --template '{date|rfc822date}\n'
1328 Wed, 01 Jan 2020 10:01:00 +0000
1328 Wed, 01 Jan 2020 10:01:00 +0000
1329 Mon, 12 Jan 1970 13:46:40 +0000
1329 Mon, 12 Jan 1970 13:46:40 +0000
1330 Sun, 18 Jan 1970 08:40:01 +0000
1330 Sun, 18 Jan 1970 08:40:01 +0000
1331 Sun, 18 Jan 1970 08:40:00 +0000
1331 Sun, 18 Jan 1970 08:40:00 +0000
1332 Sat, 17 Jan 1970 04:53:20 +0000
1332 Sat, 17 Jan 1970 04:53:20 +0000
1333 Fri, 16 Jan 1970 01:06:40 +0000
1333 Fri, 16 Jan 1970 01:06:40 +0000
1334 Wed, 14 Jan 1970 21:20:00 +0000
1334 Wed, 14 Jan 1970 21:20:00 +0000
1335 Tue, 13 Jan 1970 17:33:20 +0000
1335 Tue, 13 Jan 1970 17:33:20 +0000
1336 Mon, 12 Jan 1970 13:46:40 +0000
1336 Mon, 12 Jan 1970 13:46:40 +0000
1337
1337
1338 $ hg log --template '{desc|firstline}\n'
1338 $ hg log --template '{desc|firstline}\n'
1339 third
1339 third
1340 second
1340 second
1341 merge
1341 merge
1342 new head
1342 new head
1343 new branch
1343 new branch
1344 no user, no domain
1344 no user, no domain
1345 no person
1345 no person
1346 other 1
1346 other 1
1347 line 1
1347 line 1
1348
1348
1349 $ hg log --template '{node|short}\n'
1349 $ hg log --template '{node|short}\n'
1350 95c24699272e
1350 95c24699272e
1351 29114dbae42b
1351 29114dbae42b
1352 d41e714fe50d
1352 d41e714fe50d
1353 13207e5a10d9
1353 13207e5a10d9
1354 bbe44766e73d
1354 bbe44766e73d
1355 10e46f2dcbf4
1355 10e46f2dcbf4
1356 97054abb4ab8
1356 97054abb4ab8
1357 b608e9d1a3f0
1357 b608e9d1a3f0
1358 1e4e1b8f71e0
1358 1e4e1b8f71e0
1359
1359
1360 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1360 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1361 <changeset author="test"/>
1361 <changeset author="test"/>
1362 <changeset author="User Name &lt;user@hostname&gt;"/>
1362 <changeset author="User Name &lt;user@hostname&gt;"/>
1363 <changeset author="person"/>
1363 <changeset author="person"/>
1364 <changeset author="person"/>
1364 <changeset author="person"/>
1365 <changeset author="person"/>
1365 <changeset author="person"/>
1366 <changeset author="person"/>
1366 <changeset author="person"/>
1367 <changeset author="other@place"/>
1367 <changeset author="other@place"/>
1368 <changeset author="A. N. Other &lt;other@place&gt;"/>
1368 <changeset author="A. N. Other &lt;other@place&gt;"/>
1369 <changeset author="User Name &lt;user@hostname&gt;"/>
1369 <changeset author="User Name &lt;user@hostname&gt;"/>
1370
1370
1371 $ hg log --template '{rev}: {children}\n'
1371 $ hg log --template '{rev}: {children}\n'
1372 8:
1372 8:
1373 7: 8:95c24699272e
1373 7: 8:95c24699272e
1374 6:
1374 6:
1375 5: 6:d41e714fe50d
1375 5: 6:d41e714fe50d
1376 4: 6:d41e714fe50d
1376 4: 6:d41e714fe50d
1377 3: 4:bbe44766e73d 5:13207e5a10d9
1377 3: 4:bbe44766e73d 5:13207e5a10d9
1378 2: 3:10e46f2dcbf4
1378 2: 3:10e46f2dcbf4
1379 1: 2:97054abb4ab8
1379 1: 2:97054abb4ab8
1380 0: 1:b608e9d1a3f0
1380 0: 1:b608e9d1a3f0
1381
1381
1382 Formatnode filter works:
1382 Formatnode filter works:
1383
1383
1384 $ hg -q log -r 0 --template '{node|formatnode}\n'
1384 $ hg -q log -r 0 --template '{node|formatnode}\n'
1385 1e4e1b8f71e0
1385 1e4e1b8f71e0
1386
1386
1387 $ hg log -r 0 --template '{node|formatnode}\n'
1387 $ hg log -r 0 --template '{node|formatnode}\n'
1388 1e4e1b8f71e0
1388 1e4e1b8f71e0
1389
1389
1390 $ hg -v log -r 0 --template '{node|formatnode}\n'
1390 $ hg -v log -r 0 --template '{node|formatnode}\n'
1391 1e4e1b8f71e0
1391 1e4e1b8f71e0
1392
1392
1393 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1393 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1394 1e4e1b8f71e05681d422154f5421e385fec3454f
1394 1e4e1b8f71e05681d422154f5421e385fec3454f
1395
1395
1396 Age filter:
1396 Age filter:
1397
1397
1398 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1398 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1399
1399
1400 >>> from datetime import datetime, timedelta
1400 >>> from datetime import datetime, timedelta
1401 >>> fp = open('a', 'w')
1401 >>> fp = open('a', 'w')
1402 >>> n = datetime.now() + timedelta(366 * 7)
1402 >>> n = datetime.now() + timedelta(366 * 7)
1403 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1403 >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
1404 >>> fp.close()
1404 >>> fp.close()
1405 $ hg add a
1405 $ hg add a
1406 $ hg commit -m future -d "`cat a`"
1406 $ hg commit -m future -d "`cat a`"
1407
1407
1408 $ hg log -l1 --template '{date|age}\n'
1408 $ hg log -l1 --template '{date|age}\n'
1409 7 years from now
1409 7 years from now
1410
1410
1411 Error on syntax:
1411 Error on syntax:
1412
1412
1413 $ echo 'x = "f' >> t
1413 $ echo 'x = "f' >> t
1414 $ hg log
1414 $ hg log
1415 abort: t:3: unmatched quotes
1415 abort: t:3: unmatched quotes
1416 [255]
1416 [255]
1417
1417
1418 Behind the scenes, this will throw TypeError
1418 Behind the scenes, this will throw TypeError
1419
1419
1420 $ hg log -l 3 --template '{date|obfuscate}\n'
1420 $ hg log -l 3 --template '{date|obfuscate}\n'
1421 abort: template filter 'obfuscate' is not compatible with keyword 'date'
1421 abort: template filter 'obfuscate' is not compatible with keyword 'date'
1422 [255]
1422 [255]
1423
1423
1424 Behind the scenes, this will throw a ValueError
1424 Behind the scenes, this will throw a ValueError
1425
1425
1426 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
1426 $ hg log -l 3 --template 'line: {desc|shortdate}\n'
1427 abort: template filter 'shortdate' is not compatible with keyword 'desc'
1427 abort: template filter 'shortdate' is not compatible with keyword 'desc'
1428 [255]
1428 [255]
1429
1429
1430 Behind the scenes, this will throw AttributeError
1430 Behind the scenes, this will throw AttributeError
1431
1431
1432 $ hg log -l 3 --template 'line: {date|escape}\n'
1432 $ hg log -l 3 --template 'line: {date|escape}\n'
1433 abort: template filter 'escape' is not compatible with keyword 'date'
1433 abort: template filter 'escape' is not compatible with keyword 'date'
1434 [255]
1434 [255]
1435
1435
1436 Behind the scenes, this will throw ValueError
1436 Behind the scenes, this will throw ValueError
1437
1437
1438 $ hg tip --template '{author|email|date}\n'
1438 $ hg tip --template '{author|email|date}\n'
1439 abort: template filter 'datefilter' is not compatible with keyword 'author'
1439 abort: template filter 'datefilter' is not compatible with keyword 'author'
1440 [255]
1440 [255]
1441
1441
1442 Thrown an error if a template function doesn't exist
1442 Thrown an error if a template function doesn't exist
1443
1443
1444 $ hg tip --template '{foo()}\n'
1444 $ hg tip --template '{foo()}\n'
1445 hg: parse error: unknown function 'foo'
1445 hg: parse error: unknown function 'foo'
1446 [255]
1446 [255]
1447
1447
1448 $ cd ..
1448 $ cd ..
1449
1449
1450
1450
1451 latesttag:
1451 latesttag:
1452
1452
1453 $ hg init latesttag
1453 $ hg init latesttag
1454 $ cd latesttag
1454 $ cd latesttag
1455
1455
1456 $ echo a > file
1456 $ echo a > file
1457 $ hg ci -Am a -d '0 0'
1457 $ hg ci -Am a -d '0 0'
1458 adding file
1458 adding file
1459
1459
1460 $ echo b >> file
1460 $ echo b >> file
1461 $ hg ci -m b -d '1 0'
1461 $ hg ci -m b -d '1 0'
1462
1462
1463 $ echo c >> head1
1463 $ echo c >> head1
1464 $ hg ci -Am h1c -d '2 0'
1464 $ hg ci -Am h1c -d '2 0'
1465 adding head1
1465 adding head1
1466
1466
1467 $ hg update -q 1
1467 $ hg update -q 1
1468 $ echo d >> head2
1468 $ echo d >> head2
1469 $ hg ci -Am h2d -d '3 0'
1469 $ hg ci -Am h2d -d '3 0'
1470 adding head2
1470 adding head2
1471 created new head
1471 created new head
1472
1472
1473 $ echo e >> head2
1473 $ echo e >> head2
1474 $ hg ci -m h2e -d '4 0'
1474 $ hg ci -m h2e -d '4 0'
1475
1475
1476 $ hg merge -q
1476 $ hg merge -q
1477 $ hg ci -m merge -d '5 -3600'
1477 $ hg ci -m merge -d '5 -3600'
1478
1478
1479 No tag set:
1479 No tag set:
1480
1480
1481 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1481 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1482 5: null+5
1482 5: null+5
1483 4: null+4
1483 4: null+4
1484 3: null+3
1484 3: null+3
1485 2: null+3
1485 2: null+3
1486 1: null+2
1486 1: null+2
1487 0: null+1
1487 0: null+1
1488
1488
1489 One common tag: longest path wins:
1489 One common tag: longest path wins:
1490
1490
1491 $ hg tag -r 1 -m t1 -d '6 0' t1
1491 $ hg tag -r 1 -m t1 -d '6 0' t1
1492 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1492 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1493 6: t1+4
1493 6: t1+4
1494 5: t1+3
1494 5: t1+3
1495 4: t1+2
1495 4: t1+2
1496 3: t1+1
1496 3: t1+1
1497 2: t1+1
1497 2: t1+1
1498 1: t1+0
1498 1: t1+0
1499 0: null+1
1499 0: null+1
1500
1500
1501 One ancestor tag: more recent wins:
1501 One ancestor tag: more recent wins:
1502
1502
1503 $ hg tag -r 2 -m t2 -d '7 0' t2
1503 $ hg tag -r 2 -m t2 -d '7 0' t2
1504 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1504 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1505 7: t2+3
1505 7: t2+3
1506 6: t2+2
1506 6: t2+2
1507 5: t2+1
1507 5: t2+1
1508 4: t1+2
1508 4: t1+2
1509 3: t1+1
1509 3: t1+1
1510 2: t2+0
1510 2: t2+0
1511 1: t1+0
1511 1: t1+0
1512 0: null+1
1512 0: null+1
1513
1513
1514 Two branch tags: more recent wins:
1514 Two branch tags: more recent wins:
1515
1515
1516 $ hg tag -r 3 -m t3 -d '8 0' t3
1516 $ hg tag -r 3 -m t3 -d '8 0' t3
1517 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1517 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1518 8: t3+5
1518 8: t3+5
1519 7: t3+4
1519 7: t3+4
1520 6: t3+3
1520 6: t3+3
1521 5: t3+2
1521 5: t3+2
1522 4: t3+1
1522 4: t3+1
1523 3: t3+0
1523 3: t3+0
1524 2: t2+0
1524 2: t2+0
1525 1: t1+0
1525 1: t1+0
1526 0: null+1
1526 0: null+1
1527
1527
1528 Merged tag overrides:
1528 Merged tag overrides:
1529
1529
1530 $ hg tag -r 5 -m t5 -d '9 0' t5
1530 $ hg tag -r 5 -m t5 -d '9 0' t5
1531 $ hg tag -r 3 -m at3 -d '10 0' at3
1531 $ hg tag -r 3 -m at3 -d '10 0' at3
1532 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1532 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1533 10: t5+5
1533 10: t5+5
1534 9: t5+4
1534 9: t5+4
1535 8: t5+3
1535 8: t5+3
1536 7: t5+2
1536 7: t5+2
1537 6: t5+1
1537 6: t5+1
1538 5: t5+0
1538 5: t5+0
1539 4: at3:t3+1
1539 4: at3:t3+1
1540 3: at3:t3+0
1540 3: at3:t3+0
1541 2: t2+0
1541 2: t2+0
1542 1: t1+0
1542 1: t1+0
1543 0: null+1
1543 0: null+1
1544
1544
1545 $ cd ..
1545 $ cd ..
1546
1546
1547
1547
1548 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1548 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1549 if it is a relative path
1549 if it is a relative path
1550
1550
1551 $ mkdir -p home/styles
1551 $ mkdir -p home/styles
1552
1552
1553 $ cat > home/styles/teststyle <<EOF
1553 $ cat > home/styles/teststyle <<EOF
1554 > changeset = 'test {rev}:{node|short}\n'
1554 > changeset = 'test {rev}:{node|short}\n'
1555 > EOF
1555 > EOF
1556
1556
1557 $ HOME=`pwd`/home; export HOME
1557 $ HOME=`pwd`/home; export HOME
1558
1558
1559 $ cat > latesttag/.hg/hgrc <<EOF
1559 $ cat > latesttag/.hg/hgrc <<EOF
1560 > [ui]
1560 > [ui]
1561 > style = ~/styles/teststyle
1561 > style = ~/styles/teststyle
1562 > EOF
1562 > EOF
1563
1563
1564 $ hg -R latesttag tip
1564 $ hg -R latesttag tip
1565 test 10:9b4a630e5f5f
1565 test 10:9b4a630e5f5f
1566
1566
1567 Test recursive showlist template (issue1989):
1567 Test recursive showlist template (issue1989):
1568
1568
1569 $ cat > style1989 <<EOF
1569 $ cat > style1989 <<EOF
1570 > changeset = '{file_mods}{manifest}{extras}'
1570 > changeset = '{file_mods}{manifest}{extras}'
1571 > file_mod = 'M|{author|person}\n'
1571 > file_mod = 'M|{author|person}\n'
1572 > manifest = '{rev},{author}\n'
1572 > manifest = '{rev},{author}\n'
1573 > extra = '{key}: {author}\n'
1573 > extra = '{key}: {author}\n'
1574 > EOF
1574 > EOF
1575
1575
1576 $ hg -R latesttag log -r tip --style=style1989
1576 $ hg -R latesttag log -r tip --style=style1989
1577 M|test
1577 M|test
1578 10,test
1578 10,test
1579 branch: test
1579 branch: test
1580
1580
1581 Test new-style inline templating:
1581 Test new-style inline templating:
1582
1582
1583 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
1583 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
1584 modified files: .hgtags
1584 modified files: .hgtags
1585
1585
1586 Test the sub function of templating for expansion:
1586 Test the sub function of templating for expansion:
1587
1587
1588 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
1588 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
1589 xx
1589 xx
1590
1590
1591 Test the strip function with chars specified:
1591 Test the strip function with chars specified:
1592
1592
1593 $ hg log -R latesttag --template '{desc}\n'
1593 $ hg log -R latesttag --template '{desc}\n'
1594 at3
1594 at3
1595 t5
1595 t5
1596 t3
1596 t3
1597 t2
1597 t2
1598 t1
1598 t1
1599 merge
1599 merge
1600 h2e
1600 h2e
1601 h2d
1601 h2d
1602 h1c
1602 h1c
1603 b
1603 b
1604 a
1604 a
1605
1605
1606 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
1606 $ hg log -R latesttag --template '{strip(desc, "te")}\n'
1607 at3
1607 at3
1608 5
1608 5
1609 3
1609 3
1610 2
1610 2
1611 1
1611 1
1612 merg
1612 merg
1613 h2
1613 h2
1614 h2d
1614 h2d
1615 h1c
1615 h1c
1616 b
1616 b
1617 a
1617 a
1618
1618
1619 Test date format:
1619 Test date format:
1620
1620
1621 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
1621 $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n'
1622 date: 70 01 01 10 +0000
1622 date: 70 01 01 10 +0000
1623 date: 70 01 01 09 +0000
1623 date: 70 01 01 09 +0000
1624 date: 70 01 01 08 +0000
1624 date: 70 01 01 08 +0000
1625 date: 70 01 01 07 +0000
1625 date: 70 01 01 07 +0000
1626 date: 70 01 01 06 +0000
1626 date: 70 01 01 06 +0000
1627 date: 70 01 01 05 +0100
1627 date: 70 01 01 05 +0100
1628 date: 70 01 01 04 +0000
1628 date: 70 01 01 04 +0000
1629 date: 70 01 01 03 +0000
1629 date: 70 01 01 03 +0000
1630 date: 70 01 01 02 +0000
1630 date: 70 01 01 02 +0000
1631 date: 70 01 01 01 +0000
1631 date: 70 01 01 01 +0000
1632 date: 70 01 01 00 +0000
1632 date: 70 01 01 00 +0000
1633
1633
1634 Test string escaping:
1634 Test string escaping:
1635
1635
1636 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
1636 $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n'
1637 >
1637 >
1638 <>\n<[>
1638 <>\n<[>
1639 <>\n<]>
1639 <>\n<]>
1640 <>\n<
1640 <>\n<
1641
1641
1642 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
1642 "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice)
1643
1643
1644 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
1644 $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n'
1645 \x6e
1645 \x6e
1646 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
1646 $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n'
1647 \x5c\x786e
1647 \x5c\x786e
1648 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
1648 $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n'
1649 \x6e
1649 \x6e
1650 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
1650 $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n'
1651 \x5c\x786e
1651 \x5c\x786e
1652
1652
1653 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
1653 $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n'
1654 \x6e
1654 \x6e
1655 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
1655 $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n'
1656 \x5c\x786e
1656 \x5c\x786e
1657 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
1657 $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n'
1658 \x6e
1658 \x6e
1659 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
1659 $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n'
1660 \x5c\x786e
1660 \x5c\x786e
1661
1661
1662 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
1662 $ hg log -R a -r 8 --template '{join(files, "\n")}\n'
1663 fourth
1663 fourth
1664 second
1664 second
1665 third
1665 third
1666 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
1666 $ hg log -R a -r 8 --template '{join(files, r"\n")}\n'
1667 fourth\nsecond\nthird
1667 fourth\nsecond\nthird
1668
1668
1669 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
1669 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}'
1670 <p>
1670 <p>
1671 1st
1671 1st
1672 </p>
1672 </p>
1673 <p>
1673 <p>
1674 2nd
1674 2nd
1675 </p>
1675 </p>
1676 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
1676 $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}'
1677 <p>
1677 <p>
1678 1st\n\n2nd
1678 1st\n\n2nd
1679 </p>
1679 </p>
1680 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
1680 $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}'
1681 1st
1681 1st
1682
1682
1683 2nd
1683 2nd
1684
1684
1685 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
1685 $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n'
1686 o perso
1686 o perso
1687 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
1687 $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n'
1688 no person
1688 no person
1689 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
1689 $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n'
1690 o perso
1690 o perso
1691 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
1691 $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n'
1692 no perso
1692 no perso
1693
1693
1694 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
1694 $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n'
1695 -o perso-
1695 -o perso-
1696 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
1696 $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
1697 no person
1697 no person
1698 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
1698 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
1699 \x2do perso\x2d
1699 \x2do perso\x2d
1700 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
1700 $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
1701 -o perso-
1701 -o perso-
1702 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
1702 $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
1703 \x2do perso\x6e
1703 \x2do perso\x6e
1704
1704
1705 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
1705 $ hg log -R a -r 8 --template '{files % "{file}\n"}'
1706 fourth
1706 fourth
1707 second
1707 second
1708 third
1708 third
1709 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
1709 $ hg log -R a -r 8 --template '{files % r"{file}\n"}\n'
1710 fourth\nsecond\nthird\n
1710 fourth\nsecond\nthird\n
1711
1711
1712 Test string escaping in nested expression:
1712 Test string escaping in nested expression:
1713
1713
1714 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
1714 $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n'
1715 fourth\x6esecond\x6ethird
1715 fourth\x6esecond\x6ethird
1716 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
1716 $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n'
1717 fourth\x6esecond\x6ethird
1717 fourth\x6esecond\x6ethird
1718
1718
1719 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
1719 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
1720 fourth\x6esecond\x6ethird
1720 fourth\x6esecond\x6ethird
1721 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
1721 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
1722 fourth\x5c\x786esecond\x5c\x786ethird
1722 fourth\x5c\x786esecond\x5c\x786ethird
1723
1723
1724 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
1724 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n'
1725 3:\x6eo user, \x6eo domai\x6e
1725 3:\x6eo user, \x6eo domai\x6e
1726 4:\x5c\x786eew bra\x5c\x786ech
1726 4:\x5c\x786eew bra\x5c\x786ech
1727
1727
1728 Test recursive evaluation:
1728 Test recursive evaluation:
1729
1729
1730 $ hg init r
1730 $ hg init r
1731 $ cd r
1731 $ cd r
1732 $ echo a > a
1732 $ echo a > a
1733 $ hg ci -Am '{rev}'
1733 $ hg ci -Am '{rev}'
1734 adding a
1734 adding a
1735 $ hg log -r 0 --template '{if(rev, desc)}\n'
1735 $ hg log -r 0 --template '{if(rev, desc)}\n'
1736 {rev}
1736 {rev}
1737 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
1737 $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n'
1738 test 0
1738 test 0
1739
1739
1740 $ hg branch -q 'text.{rev}'
1740 $ hg branch -q 'text.{rev}'
1741 $ echo aa >> aa
1741 $ echo aa >> aa
1742 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
1742 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
1743
1743
1744 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
1744 $ hg log -l1 --template '{fill(desc, "20", author, branch)}'
1745 {node|short}desc to
1745 {node|short}desc to
1746 text.{rev}be wrapped
1746 text.{rev}be wrapped
1747 text.{rev}desc to be
1747 text.{rev}desc to be
1748 text.{rev}wrapped (no-eol)
1748 text.{rev}wrapped (no-eol)
1749 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
1749 $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}'
1750 bcc7ff960b8e:desc to
1750 bcc7ff960b8e:desc to
1751 text.1:be wrapped
1751 text.1:be wrapped
1752 text.1:desc to be
1752 text.1:desc to be
1753 text.1:wrapped (no-eol)
1753 text.1:wrapped (no-eol)
1754
1754
1755 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
1755 $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}'
1756 {node|short} (no-eol)
1756 {node|short} (no-eol)
1757 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
1757 $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}'
1758 bcc-ff---b-e (no-eol)
1758 bcc-ff---b-e (no-eol)
1759
1759
1760 $ cat >> .hg/hgrc <<EOF
1760 $ cat >> .hg/hgrc <<EOF
1761 > [extensions]
1761 > [extensions]
1762 > color=
1762 > color=
1763 > [color]
1763 > [color]
1764 > mode=ansi
1764 > mode=ansi
1765 > text.{rev} = red
1765 > text.{rev} = red
1766 > text.1 = green
1766 > text.1 = green
1767 > EOF
1767 > EOF
1768 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
1768 $ hg log --color=always -l 1 --template '{label(branch, "text\n")}'
1769 \x1b[0;31mtext\x1b[0m (esc)
1769 \x1b[0;31mtext\x1b[0m (esc)
1770 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
1770 $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}'
1771 \x1b[0;32mtext\x1b[0m (esc)
1771 \x1b[0;32mtext\x1b[0m (esc)
1772
1772
1773 Test branches inside if statement:
1773 Test branches inside if statement:
1774
1774
1775 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
1775 $ hg log -r 0 --template '{if(branches, "yes", "no")}\n'
1776 no
1776 no
1777
1777
1778 Test shortest(node) function:
1778 Test shortest(node) function:
1779
1779
1780 $ echo b > b
1780 $ echo b > b
1781 $ hg ci -qAm b
1781 $ hg ci -qAm b
1782 $ hg log --template '{shortest(node)}\n'
1782 $ hg log --template '{shortest(node)}\n'
1783 e777
1783 e777
1784 bcc7
1784 bcc7
1785 f776
1785 f776
1786 $ hg log --template '{shortest(node, 10)}\n'
1786 $ hg log --template '{shortest(node, 10)}\n'
1787 e777603221
1787 e777603221
1788 bcc7ff960b
1788 bcc7ff960b
1789 f7769ec2ab
1789 f7769ec2ab
1790
1790
1791 Test pad function
1791 Test pad function
1792
1792
1793 $ hg log --template '{pad(rev, 20)} {author|user}\n'
1793 $ hg log --template '{pad(rev, 20)} {author|user}\n'
1794 2 test
1794 2 test
1795 1 {node|short}
1795 1 {node|short}
1796 0 test
1796 0 test
1797
1797
1798 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
1798 $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n'
1799 2 test
1799 2 test
1800 1 {node|short}
1800 1 {node|short}
1801 0 test
1801 0 test
1802
1802
1803 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
1803 $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
1804 2------------------- test
1804 2------------------- test
1805 1------------------- {node|short}
1805 1------------------- {node|short}
1806 0------------------- test
1806 0------------------- test
1807
1807
1808 Test ifcontains function
1808 Test ifcontains function
1809
1809
1810 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
1810 $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
1811 2 did not add a
1811 2 did not add a
1812 1 did not add a
1812 1 did not add a
1813 0 added a
1813 0 added a
1814
1814
1815 Test revset function
1815 Test revset function
1816
1816
1817 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
1817 $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n'
1818 2 current rev
1818 2 current rev
1819 1 not current rev
1819 1 not current rev
1820 0 not current rev
1820 0 not current rev
1821
1821
1822 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
1822 $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n'
1823 2 match rev
1823 2 match rev
1824 1 match rev
1824 1 match rev
1825 0 not match rev
1825 0 not match rev
1826
1826
1827 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
1827 $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n'
1828 2 Parents: 1
1828 2 Parents: 1
1829 1 Parents: 0
1829 1 Parents: 0
1830 0 Parents:
1830 0 Parents:
1831
1831
1832 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
1832 $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n'
1833 Rev: 2
1833 Rev: 2
1834 Ancestor: 0
1834 Ancestor: 0
1835 Ancestor: 1
1835 Ancestor: 1
1836 Ancestor: 2
1836 Ancestor: 2
1837
1837
1838 Rev: 1
1838 Rev: 1
1839 Ancestor: 0
1839 Ancestor: 0
1840 Ancestor: 1
1840 Ancestor: 1
1841
1841
1842 Rev: 0
1842 Rev: 0
1843 Ancestor: 0
1843 Ancestor: 0
1844
1844
1845 Test current bookmark templating
1845 Test current bookmark templating
1846
1846
1847 $ hg book foo
1847 $ hg book foo
1848 $ hg book bar
1848 $ hg book bar
1849 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
1849 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}\n"
1850 2 bar* foo
1850 2 bar* foo
1851 1
1851 1
1852 0
1852 0
1853 $ hg log --template "{rev} {currentbookmark}\n"
1854 2 bar
1855 1
1856 0
1857 $ hg bookmarks --inactive bar
1858 $ hg log --template "{rev} {currentbookmark}\n"
1859 2
1860 1
1861 0
1853
1862
1854 Test stringify on sub expressions
1863 Test stringify on sub expressions
1855
1864
1856 $ cd ..
1865 $ cd ..
1857 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
1866 $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
1858 fourth, second, third
1867 fourth, second, third
1859 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
1868 $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
1860 abc
1869 abc
1861
1870
1862 Test splitlines
1871 Test splitlines
1863
1872
1864 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
1873 $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
1865 @ foo future
1874 @ foo future
1866 |
1875 |
1867 o foo third
1876 o foo third
1868 |
1877 |
1869 o foo second
1878 o foo second
1870
1879
1871 o foo merge
1880 o foo merge
1872 |\
1881 |\
1873 | o foo new head
1882 | o foo new head
1874 | |
1883 | |
1875 o | foo new branch
1884 o | foo new branch
1876 |/
1885 |/
1877 o foo no user, no domain
1886 o foo no user, no domain
1878 |
1887 |
1879 o foo no person
1888 o foo no person
1880 |
1889 |
1881 o foo other 1
1890 o foo other 1
1882 | foo other 2
1891 | foo other 2
1883 | foo
1892 | foo
1884 | foo other 3
1893 | foo other 3
1885 o foo line 1
1894 o foo line 1
1886 foo line 2
1895 foo line 2
1887
1896
1888 Test startswith
1897 Test startswith
1889 $ hg log -Gv -R a --template "{startswith(desc)}"
1898 $ hg log -Gv -R a --template "{startswith(desc)}"
1890 hg: parse error: startswith expects two arguments
1899 hg: parse error: startswith expects two arguments
1891 [255]
1900 [255]
1892
1901
1893 $ hg log -Gv -R a --template "{startswith('line', desc)}"
1902 $ hg log -Gv -R a --template "{startswith('line', desc)}"
1894 @
1903 @
1895 |
1904 |
1896 o
1905 o
1897 |
1906 |
1898 o
1907 o
1899
1908
1900 o
1909 o
1901 |\
1910 |\
1902 | o
1911 | o
1903 | |
1912 | |
1904 o |
1913 o |
1905 |/
1914 |/
1906 o
1915 o
1907 |
1916 |
1908 o
1917 o
1909 |
1918 |
1910 o
1919 o
1911 |
1920 |
1912 o line 1
1921 o line 1
1913 line 2
1922 line 2
1914
1923
1915 Test bad template with better error message
1924 Test bad template with better error message
1916
1925
1917 $ hg log -Gv -R a --template '{desc|user()}'
1926 $ hg log -Gv -R a --template '{desc|user()}'
1918 hg: parse error: expected a symbol, got 'func'
1927 hg: parse error: expected a symbol, got 'func'
1919 [255]
1928 [255]
1920
1929
1921 Test word function (including index out of bounds graceful failure)
1930 Test word function (including index out of bounds graceful failure)
1922
1931
1923 $ hg log -Gv -R a --template "{word('1', desc)}"
1932 $ hg log -Gv -R a --template "{word('1', desc)}"
1924 @
1933 @
1925 |
1934 |
1926 o
1935 o
1927 |
1936 |
1928 o
1937 o
1929
1938
1930 o
1939 o
1931 |\
1940 |\
1932 | o head
1941 | o head
1933 | |
1942 | |
1934 o | branch
1943 o | branch
1935 |/
1944 |/
1936 o user,
1945 o user,
1937 |
1946 |
1938 o person
1947 o person
1939 |
1948 |
1940 o 1
1949 o 1
1941 |
1950 |
1942 o 1
1951 o 1
1943
1952
1944
1953
1945 Test word third parameter used as splitter
1954 Test word third parameter used as splitter
1946
1955
1947 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
1956 $ hg log -Gv -R a --template "{word('0', desc, 'o')}"
1948 @ future
1957 @ future
1949 |
1958 |
1950 o third
1959 o third
1951 |
1960 |
1952 o sec
1961 o sec
1953
1962
1954 o merge
1963 o merge
1955 |\
1964 |\
1956 | o new head
1965 | o new head
1957 | |
1966 | |
1958 o | new branch
1967 o | new branch
1959 |/
1968 |/
1960 o n
1969 o n
1961 |
1970 |
1962 o n
1971 o n
1963 |
1972 |
1964 o
1973 o
1965 |
1974 |
1966 o line 1
1975 o line 1
1967 line 2
1976 line 2
1968
1977
1969 Test word error messages for not enough and too many arguments
1978 Test word error messages for not enough and too many arguments
1970
1979
1971 $ hg log -Gv -R a --template "{word('0')}"
1980 $ hg log -Gv -R a --template "{word('0')}"
1972 hg: parse error: word expects two or three arguments, got 1
1981 hg: parse error: word expects two or three arguments, got 1
1973 [255]
1982 [255]
1974
1983
1975 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
1984 $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}"
1976 hg: parse error: word expects two or three arguments, got 7
1985 hg: parse error: word expects two or three arguments, got 7
1977 [255]
1986 [255]
General Comments 0
You need to be logged in to leave comments. Login now