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