##// END OF EJS Templates
templater: handle a missing value correctly...
Ross Lagerwall -
r17334:39c01f8e stable
parent child Browse files
Show More
@@ -1,392 +1,394 b''
1 # templater.py - template expansion for output
1 # templater.py - template expansion for output
2 #
2 #
3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
3 # Copyright 2005, 2006 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 i18n import _
8 from i18n import _
9 import sys, os
9 import sys, os
10 import util, config, templatefilters, parser, error
10 import util, config, templatefilters, parser, error
11
11
12 # template parsing
12 # template parsing
13
13
14 elements = {
14 elements = {
15 "(": (20, ("group", 1, ")"), ("func", 1, ")")),
15 "(": (20, ("group", 1, ")"), ("func", 1, ")")),
16 ",": (2, None, ("list", 2)),
16 ",": (2, None, ("list", 2)),
17 "|": (5, None, ("|", 5)),
17 "|": (5, None, ("|", 5)),
18 "%": (6, None, ("%", 6)),
18 "%": (6, None, ("%", 6)),
19 ")": (0, None, None),
19 ")": (0, None, None),
20 "symbol": (0, ("symbol",), None),
20 "symbol": (0, ("symbol",), None),
21 "string": (0, ("string",), None),
21 "string": (0, ("string",), None),
22 "end": (0, None, None),
22 "end": (0, None, None),
23 }
23 }
24
24
25 def tokenizer(data):
25 def tokenizer(data):
26 program, start, end = data
26 program, start, end = data
27 pos = start
27 pos = start
28 while pos < end:
28 while pos < end:
29 c = program[pos]
29 c = program[pos]
30 if c.isspace(): # skip inter-token whitespace
30 if c.isspace(): # skip inter-token whitespace
31 pass
31 pass
32 elif c in "(,)%|": # handle simple operators
32 elif c in "(,)%|": # handle simple operators
33 yield (c, None, pos)
33 yield (c, None, pos)
34 elif (c in '"\'' or c == 'r' and
34 elif (c in '"\'' or c == 'r' and
35 program[pos:pos + 2] in ("r'", 'r"')): # handle quoted strings
35 program[pos:pos + 2] in ("r'", 'r"')): # handle quoted strings
36 if c == 'r':
36 if c == 'r':
37 pos += 1
37 pos += 1
38 c = program[pos]
38 c = program[pos]
39 decode = lambda x: x
39 decode = lambda x: x
40 else:
40 else:
41 decode = lambda x: x.decode('string-escape')
41 decode = lambda x: x.decode('string-escape')
42 pos += 1
42 pos += 1
43 s = pos
43 s = pos
44 while pos < end: # find closing quote
44 while pos < end: # find closing quote
45 d = program[pos]
45 d = program[pos]
46 if d == '\\': # skip over escaped characters
46 if d == '\\': # skip over escaped characters
47 pos += 2
47 pos += 2
48 continue
48 continue
49 if d == c:
49 if d == c:
50 yield ('string', decode(program[s:pos]), s)
50 yield ('string', decode(program[s:pos]), s)
51 break
51 break
52 pos += 1
52 pos += 1
53 else:
53 else:
54 raise error.ParseError(_("unterminated string"), s)
54 raise error.ParseError(_("unterminated string"), s)
55 elif c.isalnum() or c in '_':
55 elif c.isalnum() or c in '_':
56 s = pos
56 s = pos
57 pos += 1
57 pos += 1
58 while pos < end: # find end of symbol
58 while pos < end: # find end of symbol
59 d = program[pos]
59 d = program[pos]
60 if not (d.isalnum() or d == "_"):
60 if not (d.isalnum() or d == "_"):
61 break
61 break
62 pos += 1
62 pos += 1
63 sym = program[s:pos]
63 sym = program[s:pos]
64 yield ('symbol', sym, s)
64 yield ('symbol', sym, s)
65 pos -= 1
65 pos -= 1
66 elif c == '}':
66 elif c == '}':
67 pos += 1
67 pos += 1
68 break
68 break
69 else:
69 else:
70 raise error.ParseError(_("syntax error"), pos)
70 raise error.ParseError(_("syntax error"), pos)
71 pos += 1
71 pos += 1
72 yield ('end', None, pos)
72 yield ('end', None, pos)
73
73
74 def compiletemplate(tmpl, context):
74 def compiletemplate(tmpl, context):
75 parsed = []
75 parsed = []
76 pos, stop = 0, len(tmpl)
76 pos, stop = 0, len(tmpl)
77 p = parser.parser(tokenizer, elements)
77 p = parser.parser(tokenizer, elements)
78
78
79 while pos < stop:
79 while pos < stop:
80 n = tmpl.find('{', pos)
80 n = tmpl.find('{', pos)
81 if n < 0:
81 if n < 0:
82 parsed.append(("string", tmpl[pos:]))
82 parsed.append(("string", tmpl[pos:]))
83 break
83 break
84 if n > 0 and tmpl[n - 1] == '\\':
84 if n > 0 and tmpl[n - 1] == '\\':
85 # escaped
85 # escaped
86 parsed.append(("string", tmpl[pos:n - 1] + "{"))
86 parsed.append(("string", tmpl[pos:n - 1] + "{"))
87 pos = n + 1
87 pos = n + 1
88 continue
88 continue
89 if n > pos:
89 if n > pos:
90 parsed.append(("string", tmpl[pos:n]))
90 parsed.append(("string", tmpl[pos:n]))
91
91
92 pd = [tmpl, n + 1, stop]
92 pd = [tmpl, n + 1, stop]
93 parseres, pos = p.parse(pd)
93 parseres, pos = p.parse(pd)
94 parsed.append(parseres)
94 parsed.append(parseres)
95
95
96 return [compileexp(e, context) for e in parsed]
96 return [compileexp(e, context) for e in parsed]
97
97
98 def compileexp(exp, context):
98 def compileexp(exp, context):
99 t = exp[0]
99 t = exp[0]
100 if t in methods:
100 if t in methods:
101 return methods[t](exp, context)
101 return methods[t](exp, context)
102 raise error.ParseError(_("unknown method '%s'") % t)
102 raise error.ParseError(_("unknown method '%s'") % t)
103
103
104 # template evaluation
104 # template evaluation
105
105
106 def getsymbol(exp):
106 def getsymbol(exp):
107 if exp[0] == 'symbol':
107 if exp[0] == 'symbol':
108 return exp[1]
108 return exp[1]
109 raise error.ParseError(_("expected a symbol"))
109 raise error.ParseError(_("expected a symbol"))
110
110
111 def getlist(x):
111 def getlist(x):
112 if not x:
112 if not x:
113 return []
113 return []
114 if x[0] == 'list':
114 if x[0] == 'list':
115 return getlist(x[1]) + [x[2]]
115 return getlist(x[1]) + [x[2]]
116 return [x]
116 return [x]
117
117
118 def getfilter(exp, context):
118 def getfilter(exp, context):
119 f = getsymbol(exp)
119 f = getsymbol(exp)
120 if f not in context._filters:
120 if f not in context._filters:
121 raise error.ParseError(_("unknown function '%s'") % f)
121 raise error.ParseError(_("unknown function '%s'") % f)
122 return context._filters[f]
122 return context._filters[f]
123
123
124 def gettemplate(exp, context):
124 def gettemplate(exp, context):
125 if exp[0] == 'string':
125 if exp[0] == 'string':
126 return compiletemplate(exp[1], context)
126 return compiletemplate(exp[1], context)
127 if exp[0] == 'symbol':
127 if exp[0] == 'symbol':
128 return context._load(exp[1])
128 return context._load(exp[1])
129 raise error.ParseError(_("expected template specifier"))
129 raise error.ParseError(_("expected template specifier"))
130
130
131 def runstring(context, mapping, data):
131 def runstring(context, mapping, data):
132 return data
132 return data
133
133
134 def runsymbol(context, mapping, key):
134 def runsymbol(context, mapping, key):
135 v = mapping.get(key)
135 v = mapping.get(key)
136 if v is None:
136 if v is None:
137 v = context._defaults.get(key, '')
137 v = context._defaults.get(key, '')
138 if util.safehasattr(v, '__call__'):
138 if util.safehasattr(v, '__call__'):
139 return v(**mapping)
139 return v(**mapping)
140 return v
140 return v
141
141
142 def buildfilter(exp, context):
142 def buildfilter(exp, context):
143 func, data = compileexp(exp[1], context)
143 func, data = compileexp(exp[1], context)
144 filt = getfilter(exp[2], context)
144 filt = getfilter(exp[2], context)
145 return (runfilter, (func, data, filt))
145 return (runfilter, (func, data, filt))
146
146
147 def runfilter(context, mapping, data):
147 def runfilter(context, mapping, data):
148 func, data, filt = data
148 func, data, filt = data
149 return filt(func(context, mapping, data))
149 return filt(func(context, mapping, data))
150
150
151 def buildmap(exp, context):
151 def buildmap(exp, context):
152 func, data = compileexp(exp[1], context)
152 func, data = compileexp(exp[1], context)
153 ctmpl = gettemplate(exp[2], context)
153 ctmpl = gettemplate(exp[2], context)
154 return (runmap, (func, data, ctmpl))
154 return (runmap, (func, data, ctmpl))
155
155
156 def runmap(context, mapping, data):
156 def runmap(context, mapping, data):
157 func, data, ctmpl = data
157 func, data, ctmpl = data
158 d = func(context, mapping, data)
158 d = func(context, mapping, data)
159 lm = mapping.copy()
159 lm = mapping.copy()
160
160
161 for i in d:
161 for i in d:
162 if isinstance(i, dict):
162 if isinstance(i, dict):
163 lm.update(i)
163 lm.update(i)
164 for f, d in ctmpl:
164 for f, d in ctmpl:
165 yield f(context, lm, d)
165 yield f(context, lm, d)
166 else:
166 else:
167 # v is not an iterable of dicts, this happen when 'key'
167 # v is not an iterable of dicts, this happen when 'key'
168 # has been fully expanded already and format is useless.
168 # has been fully expanded already and format is useless.
169 # If so, return the expanded value.
169 # If so, return the expanded value.
170 yield i
170 yield i
171
171
172 def buildfunc(exp, context):
172 def buildfunc(exp, context):
173 n = getsymbol(exp[1])
173 n = getsymbol(exp[1])
174 args = [compileexp(x, context) for x in getlist(exp[2])]
174 args = [compileexp(x, context) for x in getlist(exp[2])]
175 if n in funcs:
175 if n in funcs:
176 f = funcs[n]
176 f = funcs[n]
177 return (f, args)
177 return (f, args)
178 if n in context._filters:
178 if n in context._filters:
179 if len(args) != 1:
179 if len(args) != 1:
180 raise error.ParseError(_("filter %s expects one argument") % n)
180 raise error.ParseError(_("filter %s expects one argument") % n)
181 f = context._filters[n]
181 f = context._filters[n]
182 return (runfilter, (args[0][0], args[0][1], f))
182 return (runfilter, (args[0][0], args[0][1], f))
183
183
184 methods = {
184 methods = {
185 "string": lambda e, c: (runstring, e[1]),
185 "string": lambda e, c: (runstring, e[1]),
186 "symbol": lambda e, c: (runsymbol, e[1]),
186 "symbol": lambda e, c: (runsymbol, e[1]),
187 "group": lambda e, c: compileexp(e[1], c),
187 "group": lambda e, c: compileexp(e[1], c),
188 # ".": buildmember,
188 # ".": buildmember,
189 "|": buildfilter,
189 "|": buildfilter,
190 "%": buildmap,
190 "%": buildmap,
191 "func": buildfunc,
191 "func": buildfunc,
192 }
192 }
193
193
194 funcs = {
194 funcs = {
195 }
195 }
196
196
197 # template engine
197 # template engine
198
198
199 path = ['templates', '../templates']
199 path = ['templates', '../templates']
200 stringify = templatefilters.stringify
200 stringify = templatefilters.stringify
201
201
202 def _flatten(thing):
202 def _flatten(thing):
203 '''yield a single stream from a possibly nested set of iterators'''
203 '''yield a single stream from a possibly nested set of iterators'''
204 if isinstance(thing, str):
204 if isinstance(thing, str):
205 yield thing
205 yield thing
206 elif not util.safehasattr(thing, '__iter__'):
206 elif not util.safehasattr(thing, '__iter__'):
207 if thing is not None:
207 if thing is not None:
208 yield str(thing)
208 yield str(thing)
209 else:
209 else:
210 for i in thing:
210 for i in thing:
211 if isinstance(i, str):
211 if isinstance(i, str):
212 yield i
212 yield i
213 elif not util.safehasattr(i, '__iter__'):
213 elif not util.safehasattr(i, '__iter__'):
214 if i is not None:
214 if i is not None:
215 yield str(i)
215 yield str(i)
216 elif i is not None:
216 elif i is not None:
217 for j in _flatten(i):
217 for j in _flatten(i):
218 yield j
218 yield j
219
219
220 def parsestring(s, quoted=True):
220 def parsestring(s, quoted=True):
221 '''parse a string using simple c-like syntax.
221 '''parse a string using simple c-like syntax.
222 string must be in quotes if quoted is True.'''
222 string must be in quotes if quoted is True.'''
223 if quoted:
223 if quoted:
224 if len(s) < 2 or s[0] != s[-1]:
224 if len(s) < 2 or s[0] != s[-1]:
225 raise SyntaxError(_('unmatched quotes'))
225 raise SyntaxError(_('unmatched quotes'))
226 return s[1:-1].decode('string_escape')
226 return s[1:-1].decode('string_escape')
227
227
228 return s.decode('string_escape')
228 return s.decode('string_escape')
229
229
230 class engine(object):
230 class engine(object):
231 '''template expansion engine.
231 '''template expansion engine.
232
232
233 template expansion works like this. a map file contains key=value
233 template expansion works like this. a map file contains key=value
234 pairs. if value is quoted, it is treated as string. otherwise, it
234 pairs. if value is quoted, it is treated as string. otherwise, it
235 is treated as name of template file.
235 is treated as name of template file.
236
236
237 templater is asked to expand a key in map. it looks up key, and
237 templater is asked to expand a key in map. it looks up key, and
238 looks for strings like this: {foo}. it expands {foo} by looking up
238 looks for strings like this: {foo}. it expands {foo} by looking up
239 foo in map, and substituting it. expansion is recursive: it stops
239 foo in map, and substituting it. expansion is recursive: it stops
240 when there is no more {foo} to replace.
240 when there is no more {foo} to replace.
241
241
242 expansion also allows formatting and filtering.
242 expansion also allows formatting and filtering.
243
243
244 format uses key to expand each item in list. syntax is
244 format uses key to expand each item in list. syntax is
245 {key%format}.
245 {key%format}.
246
246
247 filter uses function to transform value. syntax is
247 filter uses function to transform value. syntax is
248 {key|filter1|filter2|...}.'''
248 {key|filter1|filter2|...}.'''
249
249
250 def __init__(self, loader, filters={}, defaults={}):
250 def __init__(self, loader, filters={}, defaults={}):
251 self._loader = loader
251 self._loader = loader
252 self._filters = filters
252 self._filters = filters
253 self._defaults = defaults
253 self._defaults = defaults
254 self._cache = {}
254 self._cache = {}
255
255
256 def _load(self, t):
256 def _load(self, t):
257 '''load, parse, and cache a template'''
257 '''load, parse, and cache a template'''
258 if t not in self._cache:
258 if t not in self._cache:
259 self._cache[t] = compiletemplate(self._loader(t), self)
259 self._cache[t] = compiletemplate(self._loader(t), self)
260 return self._cache[t]
260 return self._cache[t]
261
261
262 def process(self, t, mapping):
262 def process(self, t, mapping):
263 '''Perform expansion. t is name of map element to expand.
263 '''Perform expansion. t is name of map element to expand.
264 mapping contains added elements for use during expansion. Is a
264 mapping contains added elements for use during expansion. Is a
265 generator.'''
265 generator.'''
266 return _flatten(func(self, mapping, data) for func, data in
266 return _flatten(func(self, mapping, data) for func, data in
267 self._load(t))
267 self._load(t))
268
268
269 engines = {'default': engine}
269 engines = {'default': engine}
270
270
271 class templater(object):
271 class templater(object):
272
272
273 def __init__(self, mapfile, filters={}, defaults={}, cache={},
273 def __init__(self, mapfile, filters={}, defaults={}, cache={},
274 minchunk=1024, maxchunk=65536):
274 minchunk=1024, maxchunk=65536):
275 '''set up template engine.
275 '''set up template engine.
276 mapfile is name of file to read map definitions from.
276 mapfile is name of file to read map definitions from.
277 filters is dict of functions. each transforms a value into another.
277 filters is dict of functions. each transforms a value into another.
278 defaults is dict of default map definitions.'''
278 defaults is dict of default map definitions.'''
279 self.mapfile = mapfile or 'template'
279 self.mapfile = mapfile or 'template'
280 self.cache = cache.copy()
280 self.cache = cache.copy()
281 self.map = {}
281 self.map = {}
282 self.base = (mapfile and os.path.dirname(mapfile)) or ''
282 self.base = (mapfile and os.path.dirname(mapfile)) or ''
283 self.filters = templatefilters.filters.copy()
283 self.filters = templatefilters.filters.copy()
284 self.filters.update(filters)
284 self.filters.update(filters)
285 self.defaults = defaults
285 self.defaults = defaults
286 self.minchunk, self.maxchunk = minchunk, maxchunk
286 self.minchunk, self.maxchunk = minchunk, maxchunk
287 self.ecache = {}
287 self.ecache = {}
288
288
289 if not mapfile:
289 if not mapfile:
290 return
290 return
291 if not os.path.exists(mapfile):
291 if not os.path.exists(mapfile):
292 raise util.Abort(_('style not found: %s') % mapfile)
292 raise util.Abort(_('style not found: %s') % mapfile)
293
293
294 conf = config.config()
294 conf = config.config()
295 conf.read(mapfile)
295 conf.read(mapfile)
296
296
297 for key, val in conf[''].items():
297 for key, val in conf[''].items():
298 if not val:
299 raise SyntaxError(_('%s: missing value') % conf.source('', key))
298 if val[0] in "'\"":
300 if val[0] in "'\"":
299 try:
301 try:
300 self.cache[key] = parsestring(val)
302 self.cache[key] = parsestring(val)
301 except SyntaxError, inst:
303 except SyntaxError, inst:
302 raise SyntaxError('%s: %s' %
304 raise SyntaxError('%s: %s' %
303 (conf.source('', key), inst.args[0]))
305 (conf.source('', key), inst.args[0]))
304 else:
306 else:
305 val = 'default', val
307 val = 'default', val
306 if ':' in val[1]:
308 if ':' in val[1]:
307 val = val[1].split(':', 1)
309 val = val[1].split(':', 1)
308 self.map[key] = val[0], os.path.join(self.base, val[1])
310 self.map[key] = val[0], os.path.join(self.base, val[1])
309
311
310 def __contains__(self, key):
312 def __contains__(self, key):
311 return key in self.cache or key in self.map
313 return key in self.cache or key in self.map
312
314
313 def load(self, t):
315 def load(self, t):
314 '''Get the template for the given template name. Use a local cache.'''
316 '''Get the template for the given template name. Use a local cache.'''
315 if t not in self.cache:
317 if t not in self.cache:
316 try:
318 try:
317 self.cache[t] = util.readfile(self.map[t][1])
319 self.cache[t] = util.readfile(self.map[t][1])
318 except KeyError, inst:
320 except KeyError, inst:
319 raise util.Abort(_('"%s" not in template map') % inst.args[0])
321 raise util.Abort(_('"%s" not in template map') % inst.args[0])
320 except IOError, inst:
322 except IOError, inst:
321 raise IOError(inst.args[0], _('template file %s: %s') %
323 raise IOError(inst.args[0], _('template file %s: %s') %
322 (self.map[t][1], inst.args[1]))
324 (self.map[t][1], inst.args[1]))
323 return self.cache[t]
325 return self.cache[t]
324
326
325 def __call__(self, t, **mapping):
327 def __call__(self, t, **mapping):
326 ttype = t in self.map and self.map[t][0] or 'default'
328 ttype = t in self.map and self.map[t][0] or 'default'
327 if ttype not in self.ecache:
329 if ttype not in self.ecache:
328 self.ecache[ttype] = engines[ttype](self.load,
330 self.ecache[ttype] = engines[ttype](self.load,
329 self.filters, self.defaults)
331 self.filters, self.defaults)
330 proc = self.ecache[ttype]
332 proc = self.ecache[ttype]
331
333
332 stream = proc.process(t, mapping)
334 stream = proc.process(t, mapping)
333 if self.minchunk:
335 if self.minchunk:
334 stream = util.increasingchunks(stream, min=self.minchunk,
336 stream = util.increasingchunks(stream, min=self.minchunk,
335 max=self.maxchunk)
337 max=self.maxchunk)
336 return stream
338 return stream
337
339
338 def templatepath(name=None):
340 def templatepath(name=None):
339 '''return location of template file or directory (if no name).
341 '''return location of template file or directory (if no name).
340 returns None if not found.'''
342 returns None if not found.'''
341 normpaths = []
343 normpaths = []
342
344
343 # executable version (py2exe) doesn't support __file__
345 # executable version (py2exe) doesn't support __file__
344 if util.mainfrozen():
346 if util.mainfrozen():
345 module = sys.executable
347 module = sys.executable
346 else:
348 else:
347 module = __file__
349 module = __file__
348 for f in path:
350 for f in path:
349 if f.startswith('/'):
351 if f.startswith('/'):
350 p = f
352 p = f
351 else:
353 else:
352 fl = f.split('/')
354 fl = f.split('/')
353 p = os.path.join(os.path.dirname(module), *fl)
355 p = os.path.join(os.path.dirname(module), *fl)
354 if name:
356 if name:
355 p = os.path.join(p, name)
357 p = os.path.join(p, name)
356 if name and os.path.exists(p):
358 if name and os.path.exists(p):
357 return os.path.normpath(p)
359 return os.path.normpath(p)
358 elif os.path.isdir(p):
360 elif os.path.isdir(p):
359 normpaths.append(os.path.normpath(p))
361 normpaths.append(os.path.normpath(p))
360
362
361 return normpaths
363 return normpaths
362
364
363 def stylemap(styles, paths=None):
365 def stylemap(styles, paths=None):
364 """Return path to mapfile for a given style.
366 """Return path to mapfile for a given style.
365
367
366 Searches mapfile in the following locations:
368 Searches mapfile in the following locations:
367 1. templatepath/style/map
369 1. templatepath/style/map
368 2. templatepath/map-style
370 2. templatepath/map-style
369 3. templatepath/map
371 3. templatepath/map
370 """
372 """
371
373
372 if paths is None:
374 if paths is None:
373 paths = templatepath()
375 paths = templatepath()
374 elif isinstance(paths, str):
376 elif isinstance(paths, str):
375 paths = [paths]
377 paths = [paths]
376
378
377 if isinstance(styles, str):
379 if isinstance(styles, str):
378 styles = [styles]
380 styles = [styles]
379
381
380 for style in styles:
382 for style in styles:
381 if not style:
383 if not style:
382 continue
384 continue
383 locations = [os.path.join(style, 'map'), 'map-' + style]
385 locations = [os.path.join(style, 'map'), 'map-' + style]
384 locations.append('map')
386 locations.append('map')
385
387
386 for path in paths:
388 for path in paths:
387 for location in locations:
389 for location in locations:
388 mapfile = os.path.join(path, location)
390 mapfile = os.path.join(path, location)
389 if os.path.isfile(mapfile):
391 if os.path.isfile(mapfile):
390 return style, mapfile
392 return style, mapfile
391
393
392 raise RuntimeError("No hgweb templates found in %r" % paths)
394 raise RuntimeError("No hgweb templates found in %r" % paths)
@@ -1,1383 +1,1390 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 Quoting for ui.logtemplate
46 Quoting for ui.logtemplate
47
47
48 $ hg tip --config "ui.logtemplate={rev}\n"
48 $ hg tip --config "ui.logtemplate={rev}\n"
49 8
49 8
50 $ hg tip --config "ui.logtemplate='{rev}\n'"
50 $ hg tip --config "ui.logtemplate='{rev}\n'"
51 8
51 8
52 $ hg tip --config 'ui.logtemplate="{rev}\n"'
52 $ hg tip --config 'ui.logtemplate="{rev}\n"'
53 8
53 8
54
54
55 Make sure user/global hgrc does not affect tests
55 Make sure user/global hgrc does not affect tests
56
56
57 $ echo '[ui]' > .hg/hgrc
57 $ echo '[ui]' > .hg/hgrc
58 $ echo 'logtemplate =' >> .hg/hgrc
58 $ echo 'logtemplate =' >> .hg/hgrc
59 $ echo 'style =' >> .hg/hgrc
59 $ echo 'style =' >> .hg/hgrc
60
60
61 Default style is like normal output:
61 Default style is like normal output:
62
62
63 $ hg log > log.out
63 $ hg log > log.out
64 $ hg log --style default > style.out
64 $ hg log --style default > style.out
65 $ cmp log.out style.out || diff -u log.out style.out
65 $ cmp log.out style.out || diff -u log.out style.out
66
66
67 $ hg log -v > log.out
67 $ hg log -v > log.out
68 $ hg log -v --style default > style.out
68 $ hg log -v --style default > style.out
69 $ cmp log.out style.out || diff -u log.out style.out
69 $ cmp log.out style.out || diff -u log.out style.out
70
70
71 $ hg log --debug > log.out
71 $ hg log --debug > log.out
72 $ hg log --debug --style default > style.out
72 $ hg log --debug --style default > style.out
73 $ cmp log.out style.out || diff -u log.out style.out
73 $ cmp log.out style.out || diff -u log.out style.out
74
74
75 Revision with no copies (used to print a traceback):
75 Revision with no copies (used to print a traceback):
76
76
77 $ hg tip -v --template '\n'
77 $ hg tip -v --template '\n'
78
78
79
79
80 Compact style works:
80 Compact style works:
81
81
82 $ hg log --style compact
82 $ hg log --style compact
83 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
83 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
84 third
84 third
85
85
86 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
86 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user
87 second
87 second
88
88
89 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
89 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
90 merge
90 merge
91
91
92 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
92 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
93 new head
93 new head
94
94
95 4 bbe44766e73d 1970-01-17 04:53 +0000 person
95 4 bbe44766e73d 1970-01-17 04:53 +0000 person
96 new branch
96 new branch
97
97
98 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
98 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
99 no user, no domain
99 no user, no domain
100
100
101 2 97054abb4ab8 1970-01-14 21:20 +0000 other
101 2 97054abb4ab8 1970-01-14 21:20 +0000 other
102 no person
102 no person
103
103
104 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
104 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other
105 other 1
105 other 1
106
106
107 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
107 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user
108 line 1
108 line 1
109
109
110
110
111 $ hg log -v --style compact
111 $ hg log -v --style compact
112 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
112 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test
113 third
113 third
114
114
115 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
115 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
116 second
116 second
117
117
118 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
118 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
119 merge
119 merge
120
120
121 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
121 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person
122 new head
122 new head
123
123
124 4 bbe44766e73d 1970-01-17 04:53 +0000 person
124 4 bbe44766e73d 1970-01-17 04:53 +0000 person
125 new branch
125 new branch
126
126
127 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
127 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person
128 no user, no domain
128 no user, no domain
129
129
130 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
130 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place
131 no person
131 no person
132
132
133 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
133 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
134 other 1
134 other 1
135 other 2
135 other 2
136
136
137 other 3
137 other 3
138
138
139 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
139 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
140 line 1
140 line 1
141 line 2
141 line 2
142
142
143
143
144 $ hg log --debug --style compact
144 $ hg log --debug --style compact
145 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
145 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test
146 third
146 third
147
147
148 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
148 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname>
149 second
149 second
150
150
151 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
151 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person
152 merge
152 merge
153
153
154 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
154 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person
155 new head
155 new head
156
156
157 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
157 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person
158 new branch
158 new branch
159
159
160 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
160 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person
161 no user, no domain
161 no user, no domain
162
162
163 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
163 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place
164 no person
164 no person
165
165
166 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
166 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place>
167 other 1
167 other 1
168 other 2
168 other 2
169
169
170 other 3
170 other 3
171
171
172 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
172 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname>
173 line 1
173 line 1
174 line 2
174 line 2
175
175
176
176
177 Test xml styles:
177 Test xml styles:
178
178
179 $ hg log --style xml
179 $ hg log --style xml
180 <?xml version="1.0"?>
180 <?xml version="1.0"?>
181 <log>
181 <log>
182 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
182 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
183 <tag>tip</tag>
183 <tag>tip</tag>
184 <author email="test">test</author>
184 <author email="test">test</author>
185 <date>2020-01-01T10:01:00+00:00</date>
185 <date>2020-01-01T10:01:00+00:00</date>
186 <msg xml:space="preserve">third</msg>
186 <msg xml:space="preserve">third</msg>
187 </logentry>
187 </logentry>
188 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
188 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
189 <parent revision="-1" node="0000000000000000000000000000000000000000" />
189 <parent revision="-1" node="0000000000000000000000000000000000000000" />
190 <author email="user@hostname">User Name</author>
190 <author email="user@hostname">User Name</author>
191 <date>1970-01-12T13:46:40+00:00</date>
191 <date>1970-01-12T13:46:40+00:00</date>
192 <msg xml:space="preserve">second</msg>
192 <msg xml:space="preserve">second</msg>
193 </logentry>
193 </logentry>
194 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
194 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
195 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
195 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
196 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
196 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
197 <author email="person">person</author>
197 <author email="person">person</author>
198 <date>1970-01-18T08:40:01+00:00</date>
198 <date>1970-01-18T08:40:01+00:00</date>
199 <msg xml:space="preserve">merge</msg>
199 <msg xml:space="preserve">merge</msg>
200 </logentry>
200 </logentry>
201 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
201 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
202 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
202 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
203 <author email="person">person</author>
203 <author email="person">person</author>
204 <date>1970-01-18T08:40:00+00:00</date>
204 <date>1970-01-18T08:40:00+00:00</date>
205 <msg xml:space="preserve">new head</msg>
205 <msg xml:space="preserve">new head</msg>
206 </logentry>
206 </logentry>
207 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
207 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
208 <branch>foo</branch>
208 <branch>foo</branch>
209 <author email="person">person</author>
209 <author email="person">person</author>
210 <date>1970-01-17T04:53:20+00:00</date>
210 <date>1970-01-17T04:53:20+00:00</date>
211 <msg xml:space="preserve">new branch</msg>
211 <msg xml:space="preserve">new branch</msg>
212 </logentry>
212 </logentry>
213 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
213 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
214 <author email="person">person</author>
214 <author email="person">person</author>
215 <date>1970-01-16T01:06:40+00:00</date>
215 <date>1970-01-16T01:06:40+00:00</date>
216 <msg xml:space="preserve">no user, no domain</msg>
216 <msg xml:space="preserve">no user, no domain</msg>
217 </logentry>
217 </logentry>
218 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
218 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
219 <author email="other@place">other</author>
219 <author email="other@place">other</author>
220 <date>1970-01-14T21:20:00+00:00</date>
220 <date>1970-01-14T21:20:00+00:00</date>
221 <msg xml:space="preserve">no person</msg>
221 <msg xml:space="preserve">no person</msg>
222 </logentry>
222 </logentry>
223 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
223 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
224 <author email="other@place">A. N. Other</author>
224 <author email="other@place">A. N. Other</author>
225 <date>1970-01-13T17:33:20+00:00</date>
225 <date>1970-01-13T17:33:20+00:00</date>
226 <msg xml:space="preserve">other 1
226 <msg xml:space="preserve">other 1
227 other 2
227 other 2
228
228
229 other 3</msg>
229 other 3</msg>
230 </logentry>
230 </logentry>
231 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
231 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
232 <author email="user@hostname">User Name</author>
232 <author email="user@hostname">User Name</author>
233 <date>1970-01-12T13:46:40+00:00</date>
233 <date>1970-01-12T13:46:40+00:00</date>
234 <msg xml:space="preserve">line 1
234 <msg xml:space="preserve">line 1
235 line 2</msg>
235 line 2</msg>
236 </logentry>
236 </logentry>
237 </log>
237 </log>
238
238
239 $ hg log -v --style xml
239 $ hg log -v --style xml
240 <?xml version="1.0"?>
240 <?xml version="1.0"?>
241 <log>
241 <log>
242 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
242 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
243 <tag>tip</tag>
243 <tag>tip</tag>
244 <author email="test">test</author>
244 <author email="test">test</author>
245 <date>2020-01-01T10:01:00+00:00</date>
245 <date>2020-01-01T10:01:00+00:00</date>
246 <msg xml:space="preserve">third</msg>
246 <msg xml:space="preserve">third</msg>
247 <paths>
247 <paths>
248 <path action="A">fourth</path>
248 <path action="A">fourth</path>
249 <path action="A">third</path>
249 <path action="A">third</path>
250 <path action="R">second</path>
250 <path action="R">second</path>
251 </paths>
251 </paths>
252 <copies>
252 <copies>
253 <copy source="second">fourth</copy>
253 <copy source="second">fourth</copy>
254 </copies>
254 </copies>
255 </logentry>
255 </logentry>
256 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
256 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
257 <parent revision="-1" node="0000000000000000000000000000000000000000" />
257 <parent revision="-1" node="0000000000000000000000000000000000000000" />
258 <author email="user@hostname">User Name</author>
258 <author email="user@hostname">User Name</author>
259 <date>1970-01-12T13:46:40+00:00</date>
259 <date>1970-01-12T13:46:40+00:00</date>
260 <msg xml:space="preserve">second</msg>
260 <msg xml:space="preserve">second</msg>
261 <paths>
261 <paths>
262 <path action="A">second</path>
262 <path action="A">second</path>
263 </paths>
263 </paths>
264 </logentry>
264 </logentry>
265 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
265 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
266 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
266 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
267 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
267 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
268 <author email="person">person</author>
268 <author email="person">person</author>
269 <date>1970-01-18T08:40:01+00:00</date>
269 <date>1970-01-18T08:40:01+00:00</date>
270 <msg xml:space="preserve">merge</msg>
270 <msg xml:space="preserve">merge</msg>
271 <paths>
271 <paths>
272 </paths>
272 </paths>
273 </logentry>
273 </logentry>
274 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
274 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
275 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
275 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
276 <author email="person">person</author>
276 <author email="person">person</author>
277 <date>1970-01-18T08:40:00+00:00</date>
277 <date>1970-01-18T08:40:00+00:00</date>
278 <msg xml:space="preserve">new head</msg>
278 <msg xml:space="preserve">new head</msg>
279 <paths>
279 <paths>
280 <path action="A">d</path>
280 <path action="A">d</path>
281 </paths>
281 </paths>
282 </logentry>
282 </logentry>
283 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
283 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
284 <branch>foo</branch>
284 <branch>foo</branch>
285 <author email="person">person</author>
285 <author email="person">person</author>
286 <date>1970-01-17T04:53:20+00:00</date>
286 <date>1970-01-17T04:53:20+00:00</date>
287 <msg xml:space="preserve">new branch</msg>
287 <msg xml:space="preserve">new branch</msg>
288 <paths>
288 <paths>
289 </paths>
289 </paths>
290 </logentry>
290 </logentry>
291 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
291 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
292 <author email="person">person</author>
292 <author email="person">person</author>
293 <date>1970-01-16T01:06:40+00:00</date>
293 <date>1970-01-16T01:06:40+00:00</date>
294 <msg xml:space="preserve">no user, no domain</msg>
294 <msg xml:space="preserve">no user, no domain</msg>
295 <paths>
295 <paths>
296 <path action="M">c</path>
296 <path action="M">c</path>
297 </paths>
297 </paths>
298 </logentry>
298 </logentry>
299 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
299 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
300 <author email="other@place">other</author>
300 <author email="other@place">other</author>
301 <date>1970-01-14T21:20:00+00:00</date>
301 <date>1970-01-14T21:20:00+00:00</date>
302 <msg xml:space="preserve">no person</msg>
302 <msg xml:space="preserve">no person</msg>
303 <paths>
303 <paths>
304 <path action="A">c</path>
304 <path action="A">c</path>
305 </paths>
305 </paths>
306 </logentry>
306 </logentry>
307 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
307 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
308 <author email="other@place">A. N. Other</author>
308 <author email="other@place">A. N. Other</author>
309 <date>1970-01-13T17:33:20+00:00</date>
309 <date>1970-01-13T17:33:20+00:00</date>
310 <msg xml:space="preserve">other 1
310 <msg xml:space="preserve">other 1
311 other 2
311 other 2
312
312
313 other 3</msg>
313 other 3</msg>
314 <paths>
314 <paths>
315 <path action="A">b</path>
315 <path action="A">b</path>
316 </paths>
316 </paths>
317 </logentry>
317 </logentry>
318 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
318 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
319 <author email="user@hostname">User Name</author>
319 <author email="user@hostname">User Name</author>
320 <date>1970-01-12T13:46:40+00:00</date>
320 <date>1970-01-12T13:46:40+00:00</date>
321 <msg xml:space="preserve">line 1
321 <msg xml:space="preserve">line 1
322 line 2</msg>
322 line 2</msg>
323 <paths>
323 <paths>
324 <path action="A">a</path>
324 <path action="A">a</path>
325 </paths>
325 </paths>
326 </logentry>
326 </logentry>
327 </log>
327 </log>
328
328
329 $ hg log --debug --style xml
329 $ hg log --debug --style xml
330 <?xml version="1.0"?>
330 <?xml version="1.0"?>
331 <log>
331 <log>
332 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
332 <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
333 <tag>tip</tag>
333 <tag>tip</tag>
334 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
334 <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
335 <parent revision="-1" node="0000000000000000000000000000000000000000" />
335 <parent revision="-1" node="0000000000000000000000000000000000000000" />
336 <author email="test">test</author>
336 <author email="test">test</author>
337 <date>2020-01-01T10:01:00+00:00</date>
337 <date>2020-01-01T10:01:00+00:00</date>
338 <msg xml:space="preserve">third</msg>
338 <msg xml:space="preserve">third</msg>
339 <paths>
339 <paths>
340 <path action="A">fourth</path>
340 <path action="A">fourth</path>
341 <path action="A">third</path>
341 <path action="A">third</path>
342 <path action="R">second</path>
342 <path action="R">second</path>
343 </paths>
343 </paths>
344 <copies>
344 <copies>
345 <copy source="second">fourth</copy>
345 <copy source="second">fourth</copy>
346 </copies>
346 </copies>
347 <extra key="branch">default</extra>
347 <extra key="branch">default</extra>
348 </logentry>
348 </logentry>
349 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
349 <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
350 <parent revision="-1" node="0000000000000000000000000000000000000000" />
350 <parent revision="-1" node="0000000000000000000000000000000000000000" />
351 <parent revision="-1" node="0000000000000000000000000000000000000000" />
351 <parent revision="-1" node="0000000000000000000000000000000000000000" />
352 <author email="user@hostname">User Name</author>
352 <author email="user@hostname">User Name</author>
353 <date>1970-01-12T13:46:40+00:00</date>
353 <date>1970-01-12T13:46:40+00:00</date>
354 <msg xml:space="preserve">second</msg>
354 <msg xml:space="preserve">second</msg>
355 <paths>
355 <paths>
356 <path action="A">second</path>
356 <path action="A">second</path>
357 </paths>
357 </paths>
358 <extra key="branch">default</extra>
358 <extra key="branch">default</extra>
359 </logentry>
359 </logentry>
360 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
360 <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
361 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
361 <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
362 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
362 <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
363 <author email="person">person</author>
363 <author email="person">person</author>
364 <date>1970-01-18T08:40:01+00:00</date>
364 <date>1970-01-18T08:40:01+00:00</date>
365 <msg xml:space="preserve">merge</msg>
365 <msg xml:space="preserve">merge</msg>
366 <paths>
366 <paths>
367 </paths>
367 </paths>
368 <extra key="branch">default</extra>
368 <extra key="branch">default</extra>
369 </logentry>
369 </logentry>
370 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
370 <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
371 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
371 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
372 <parent revision="-1" node="0000000000000000000000000000000000000000" />
372 <parent revision="-1" node="0000000000000000000000000000000000000000" />
373 <author email="person">person</author>
373 <author email="person">person</author>
374 <date>1970-01-18T08:40:00+00:00</date>
374 <date>1970-01-18T08:40:00+00:00</date>
375 <msg xml:space="preserve">new head</msg>
375 <msg xml:space="preserve">new head</msg>
376 <paths>
376 <paths>
377 <path action="A">d</path>
377 <path action="A">d</path>
378 </paths>
378 </paths>
379 <extra key="branch">default</extra>
379 <extra key="branch">default</extra>
380 </logentry>
380 </logentry>
381 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
381 <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
382 <branch>foo</branch>
382 <branch>foo</branch>
383 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
383 <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
384 <parent revision="-1" node="0000000000000000000000000000000000000000" />
384 <parent revision="-1" node="0000000000000000000000000000000000000000" />
385 <author email="person">person</author>
385 <author email="person">person</author>
386 <date>1970-01-17T04:53:20+00:00</date>
386 <date>1970-01-17T04:53:20+00:00</date>
387 <msg xml:space="preserve">new branch</msg>
387 <msg xml:space="preserve">new branch</msg>
388 <paths>
388 <paths>
389 </paths>
389 </paths>
390 <extra key="branch">foo</extra>
390 <extra key="branch">foo</extra>
391 </logentry>
391 </logentry>
392 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
392 <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
393 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
393 <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
394 <parent revision="-1" node="0000000000000000000000000000000000000000" />
394 <parent revision="-1" node="0000000000000000000000000000000000000000" />
395 <author email="person">person</author>
395 <author email="person">person</author>
396 <date>1970-01-16T01:06:40+00:00</date>
396 <date>1970-01-16T01:06:40+00:00</date>
397 <msg xml:space="preserve">no user, no domain</msg>
397 <msg xml:space="preserve">no user, no domain</msg>
398 <paths>
398 <paths>
399 <path action="M">c</path>
399 <path action="M">c</path>
400 </paths>
400 </paths>
401 <extra key="branch">default</extra>
401 <extra key="branch">default</extra>
402 </logentry>
402 </logentry>
403 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
403 <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
404 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
404 <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
405 <parent revision="-1" node="0000000000000000000000000000000000000000" />
405 <parent revision="-1" node="0000000000000000000000000000000000000000" />
406 <author email="other@place">other</author>
406 <author email="other@place">other</author>
407 <date>1970-01-14T21:20:00+00:00</date>
407 <date>1970-01-14T21:20:00+00:00</date>
408 <msg xml:space="preserve">no person</msg>
408 <msg xml:space="preserve">no person</msg>
409 <paths>
409 <paths>
410 <path action="A">c</path>
410 <path action="A">c</path>
411 </paths>
411 </paths>
412 <extra key="branch">default</extra>
412 <extra key="branch">default</extra>
413 </logentry>
413 </logentry>
414 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
414 <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
415 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
415 <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
416 <parent revision="-1" node="0000000000000000000000000000000000000000" />
416 <parent revision="-1" node="0000000000000000000000000000000000000000" />
417 <author email="other@place">A. N. Other</author>
417 <author email="other@place">A. N. Other</author>
418 <date>1970-01-13T17:33:20+00:00</date>
418 <date>1970-01-13T17:33:20+00:00</date>
419 <msg xml:space="preserve">other 1
419 <msg xml:space="preserve">other 1
420 other 2
420 other 2
421
421
422 other 3</msg>
422 other 3</msg>
423 <paths>
423 <paths>
424 <path action="A">b</path>
424 <path action="A">b</path>
425 </paths>
425 </paths>
426 <extra key="branch">default</extra>
426 <extra key="branch">default</extra>
427 </logentry>
427 </logentry>
428 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
428 <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
429 <parent revision="-1" node="0000000000000000000000000000000000000000" />
429 <parent revision="-1" node="0000000000000000000000000000000000000000" />
430 <parent revision="-1" node="0000000000000000000000000000000000000000" />
430 <parent revision="-1" node="0000000000000000000000000000000000000000" />
431 <author email="user@hostname">User Name</author>
431 <author email="user@hostname">User Name</author>
432 <date>1970-01-12T13:46:40+00:00</date>
432 <date>1970-01-12T13:46:40+00:00</date>
433 <msg xml:space="preserve">line 1
433 <msg xml:space="preserve">line 1
434 line 2</msg>
434 line 2</msg>
435 <paths>
435 <paths>
436 <path action="A">a</path>
436 <path action="A">a</path>
437 </paths>
437 </paths>
438 <extra key="branch">default</extra>
438 <extra key="branch">default</extra>
439 </logentry>
439 </logentry>
440 </log>
440 </log>
441
441
442
442
443 Error if style not readable:
443 Error if style not readable:
444
444
445 #if unix-permissions
445 #if unix-permissions
446 $ touch q
446 $ touch q
447 $ chmod 0 q
447 $ chmod 0 q
448 $ hg log --style ./q
448 $ hg log --style ./q
449 abort: Permission denied: ./q
449 abort: Permission denied: ./q
450 [255]
450 [255]
451 #endif
451 #endif
452
452
453 Error if no style:
453 Error if no style:
454
454
455 $ hg log --style notexist
455 $ hg log --style notexist
456 abort: style not found: notexist
456 abort: style not found: notexist
457 [255]
457 [255]
458
458
459 Error if style missing key:
459 Error if style missing key:
460
460
461 $ echo 'q = q' > t
461 $ echo 'q = q' > t
462 $ hg log --style ./t
462 $ hg log --style ./t
463 abort: "changeset" not in template map
463 abort: "changeset" not in template map
464 [255]
464 [255]
465
465
466 Error if style missing value:
467
468 $ echo 'changeset =' > t
469 $ hg log --style t
470 abort: t:1: missing value
471 [255]
472
466 Error if include fails:
473 Error if include fails:
467
474
468 $ echo 'changeset = q' >> t
475 $ echo 'changeset = q' >> t
469 #if unix-permissions
476 #if unix-permissions
470 $ hg log --style ./t
477 $ hg log --style ./t
471 abort: template file ./q: Permission denied
478 abort: template file ./q: Permission denied
472 [255]
479 [255]
473 $ rm q
480 $ rm q
474 #endif
481 #endif
475
482
476 Include works:
483 Include works:
477
484
478 $ echo '{rev}' > q
485 $ echo '{rev}' > q
479 $ hg log --style ./t
486 $ hg log --style ./t
480 8
487 8
481 7
488 7
482 6
489 6
483 5
490 5
484 4
491 4
485 3
492 3
486 2
493 2
487 1
494 1
488 0
495 0
489
496
490 ui.style works:
497 ui.style works:
491
498
492 $ echo '[ui]' > .hg/hgrc
499 $ echo '[ui]' > .hg/hgrc
493 $ echo 'style = t' >> .hg/hgrc
500 $ echo 'style = t' >> .hg/hgrc
494 $ hg log
501 $ hg log
495 8
502 8
496 7
503 7
497 6
504 6
498 5
505 5
499 4
506 4
500 3
507 3
501 2
508 2
502 1
509 1
503 0
510 0
504
511
505
512
506 Issue338:
513 Issue338:
507
514
508 $ hg log --style=changelog > changelog
515 $ hg log --style=changelog > changelog
509
516
510 $ cat changelog
517 $ cat changelog
511 2020-01-01 test <test>
518 2020-01-01 test <test>
512
519
513 * fourth, second, third:
520 * fourth, second, third:
514 third
521 third
515 [95c24699272e] [tip]
522 [95c24699272e] [tip]
516
523
517 1970-01-12 User Name <user@hostname>
524 1970-01-12 User Name <user@hostname>
518
525
519 * second:
526 * second:
520 second
527 second
521 [29114dbae42b]
528 [29114dbae42b]
522
529
523 1970-01-18 person <person>
530 1970-01-18 person <person>
524
531
525 * merge
532 * merge
526 [d41e714fe50d]
533 [d41e714fe50d]
527
534
528 * d:
535 * d:
529 new head
536 new head
530 [13207e5a10d9]
537 [13207e5a10d9]
531
538
532 1970-01-17 person <person>
539 1970-01-17 person <person>
533
540
534 * new branch
541 * new branch
535 [bbe44766e73d] <foo>
542 [bbe44766e73d] <foo>
536
543
537 1970-01-16 person <person>
544 1970-01-16 person <person>
538
545
539 * c:
546 * c:
540 no user, no domain
547 no user, no domain
541 [10e46f2dcbf4]
548 [10e46f2dcbf4]
542
549
543 1970-01-14 other <other@place>
550 1970-01-14 other <other@place>
544
551
545 * c:
552 * c:
546 no person
553 no person
547 [97054abb4ab8]
554 [97054abb4ab8]
548
555
549 1970-01-13 A. N. Other <other@place>
556 1970-01-13 A. N. Other <other@place>
550
557
551 * b:
558 * b:
552 other 1 other 2
559 other 1 other 2
553
560
554 other 3
561 other 3
555 [b608e9d1a3f0]
562 [b608e9d1a3f0]
556
563
557 1970-01-12 User Name <user@hostname>
564 1970-01-12 User Name <user@hostname>
558
565
559 * a:
566 * a:
560 line 1 line 2
567 line 1 line 2
561 [1e4e1b8f71e0]
568 [1e4e1b8f71e0]
562
569
563
570
564 Issue2130: xml output for 'hg heads' is malformed
571 Issue2130: xml output for 'hg heads' is malformed
565
572
566 $ hg heads --style changelog
573 $ hg heads --style changelog
567 2020-01-01 test <test>
574 2020-01-01 test <test>
568
575
569 * fourth, second, third:
576 * fourth, second, third:
570 third
577 third
571 [95c24699272e] [tip]
578 [95c24699272e] [tip]
572
579
573 1970-01-18 person <person>
580 1970-01-18 person <person>
574
581
575 * merge
582 * merge
576 [d41e714fe50d]
583 [d41e714fe50d]
577
584
578 1970-01-17 person <person>
585 1970-01-17 person <person>
579
586
580 * new branch
587 * new branch
581 [bbe44766e73d] <foo>
588 [bbe44766e73d] <foo>
582
589
583
590
584 Keys work:
591 Keys work:
585
592
586 $ for key in author branch branches date desc file_adds file_dels file_mods \
593 $ for key in author branch branches date desc file_adds file_dels file_mods \
587 > file_copies file_copies_switch files \
594 > file_copies file_copies_switch files \
588 > manifest node parents rev tags diffstat extras; do
595 > manifest node parents rev tags diffstat extras; do
589 > for mode in '' --verbose --debug; do
596 > for mode in '' --verbose --debug; do
590 > hg log $mode --template "$key$mode: {$key}\n"
597 > hg log $mode --template "$key$mode: {$key}\n"
591 > done
598 > done
592 > done
599 > done
593 author: test
600 author: test
594 author: User Name <user@hostname>
601 author: User Name <user@hostname>
595 author: person
602 author: person
596 author: person
603 author: person
597 author: person
604 author: person
598 author: person
605 author: person
599 author: other@place
606 author: other@place
600 author: A. N. Other <other@place>
607 author: A. N. Other <other@place>
601 author: User Name <user@hostname>
608 author: User Name <user@hostname>
602 author--verbose: test
609 author--verbose: test
603 author--verbose: User Name <user@hostname>
610 author--verbose: User Name <user@hostname>
604 author--verbose: person
611 author--verbose: person
605 author--verbose: person
612 author--verbose: person
606 author--verbose: person
613 author--verbose: person
607 author--verbose: person
614 author--verbose: person
608 author--verbose: other@place
615 author--verbose: other@place
609 author--verbose: A. N. Other <other@place>
616 author--verbose: A. N. Other <other@place>
610 author--verbose: User Name <user@hostname>
617 author--verbose: User Name <user@hostname>
611 author--debug: test
618 author--debug: test
612 author--debug: User Name <user@hostname>
619 author--debug: User Name <user@hostname>
613 author--debug: person
620 author--debug: person
614 author--debug: person
621 author--debug: person
615 author--debug: person
622 author--debug: person
616 author--debug: person
623 author--debug: person
617 author--debug: other@place
624 author--debug: other@place
618 author--debug: A. N. Other <other@place>
625 author--debug: A. N. Other <other@place>
619 author--debug: User Name <user@hostname>
626 author--debug: User Name <user@hostname>
620 branch: default
627 branch: default
621 branch: default
628 branch: default
622 branch: default
629 branch: default
623 branch: default
630 branch: default
624 branch: foo
631 branch: foo
625 branch: default
632 branch: default
626 branch: default
633 branch: default
627 branch: default
634 branch: default
628 branch: default
635 branch: default
629 branch--verbose: default
636 branch--verbose: default
630 branch--verbose: default
637 branch--verbose: default
631 branch--verbose: default
638 branch--verbose: default
632 branch--verbose: default
639 branch--verbose: default
633 branch--verbose: foo
640 branch--verbose: foo
634 branch--verbose: default
641 branch--verbose: default
635 branch--verbose: default
642 branch--verbose: default
636 branch--verbose: default
643 branch--verbose: default
637 branch--verbose: default
644 branch--verbose: default
638 branch--debug: default
645 branch--debug: default
639 branch--debug: default
646 branch--debug: default
640 branch--debug: default
647 branch--debug: default
641 branch--debug: default
648 branch--debug: default
642 branch--debug: foo
649 branch--debug: foo
643 branch--debug: default
650 branch--debug: default
644 branch--debug: default
651 branch--debug: default
645 branch--debug: default
652 branch--debug: default
646 branch--debug: default
653 branch--debug: default
647 branches:
654 branches:
648 branches:
655 branches:
649 branches:
656 branches:
650 branches:
657 branches:
651 branches: foo
658 branches: foo
652 branches:
659 branches:
653 branches:
660 branches:
654 branches:
661 branches:
655 branches:
662 branches:
656 branches--verbose:
663 branches--verbose:
657 branches--verbose:
664 branches--verbose:
658 branches--verbose:
665 branches--verbose:
659 branches--verbose:
666 branches--verbose:
660 branches--verbose: foo
667 branches--verbose: foo
661 branches--verbose:
668 branches--verbose:
662 branches--verbose:
669 branches--verbose:
663 branches--verbose:
670 branches--verbose:
664 branches--verbose:
671 branches--verbose:
665 branches--debug:
672 branches--debug:
666 branches--debug:
673 branches--debug:
667 branches--debug:
674 branches--debug:
668 branches--debug:
675 branches--debug:
669 branches--debug: foo
676 branches--debug: foo
670 branches--debug:
677 branches--debug:
671 branches--debug:
678 branches--debug:
672 branches--debug:
679 branches--debug:
673 branches--debug:
680 branches--debug:
674 date: 1577872860.00
681 date: 1577872860.00
675 date: 1000000.00
682 date: 1000000.00
676 date: 1500001.00
683 date: 1500001.00
677 date: 1500000.00
684 date: 1500000.00
678 date: 1400000.00
685 date: 1400000.00
679 date: 1300000.00
686 date: 1300000.00
680 date: 1200000.00
687 date: 1200000.00
681 date: 1100000.00
688 date: 1100000.00
682 date: 1000000.00
689 date: 1000000.00
683 date--verbose: 1577872860.00
690 date--verbose: 1577872860.00
684 date--verbose: 1000000.00
691 date--verbose: 1000000.00
685 date--verbose: 1500001.00
692 date--verbose: 1500001.00
686 date--verbose: 1500000.00
693 date--verbose: 1500000.00
687 date--verbose: 1400000.00
694 date--verbose: 1400000.00
688 date--verbose: 1300000.00
695 date--verbose: 1300000.00
689 date--verbose: 1200000.00
696 date--verbose: 1200000.00
690 date--verbose: 1100000.00
697 date--verbose: 1100000.00
691 date--verbose: 1000000.00
698 date--verbose: 1000000.00
692 date--debug: 1577872860.00
699 date--debug: 1577872860.00
693 date--debug: 1000000.00
700 date--debug: 1000000.00
694 date--debug: 1500001.00
701 date--debug: 1500001.00
695 date--debug: 1500000.00
702 date--debug: 1500000.00
696 date--debug: 1400000.00
703 date--debug: 1400000.00
697 date--debug: 1300000.00
704 date--debug: 1300000.00
698 date--debug: 1200000.00
705 date--debug: 1200000.00
699 date--debug: 1100000.00
706 date--debug: 1100000.00
700 date--debug: 1000000.00
707 date--debug: 1000000.00
701 desc: third
708 desc: third
702 desc: second
709 desc: second
703 desc: merge
710 desc: merge
704 desc: new head
711 desc: new head
705 desc: new branch
712 desc: new branch
706 desc: no user, no domain
713 desc: no user, no domain
707 desc: no person
714 desc: no person
708 desc: other 1
715 desc: other 1
709 other 2
716 other 2
710
717
711 other 3
718 other 3
712 desc: line 1
719 desc: line 1
713 line 2
720 line 2
714 desc--verbose: third
721 desc--verbose: third
715 desc--verbose: second
722 desc--verbose: second
716 desc--verbose: merge
723 desc--verbose: merge
717 desc--verbose: new head
724 desc--verbose: new head
718 desc--verbose: new branch
725 desc--verbose: new branch
719 desc--verbose: no user, no domain
726 desc--verbose: no user, no domain
720 desc--verbose: no person
727 desc--verbose: no person
721 desc--verbose: other 1
728 desc--verbose: other 1
722 other 2
729 other 2
723
730
724 other 3
731 other 3
725 desc--verbose: line 1
732 desc--verbose: line 1
726 line 2
733 line 2
727 desc--debug: third
734 desc--debug: third
728 desc--debug: second
735 desc--debug: second
729 desc--debug: merge
736 desc--debug: merge
730 desc--debug: new head
737 desc--debug: new head
731 desc--debug: new branch
738 desc--debug: new branch
732 desc--debug: no user, no domain
739 desc--debug: no user, no domain
733 desc--debug: no person
740 desc--debug: no person
734 desc--debug: other 1
741 desc--debug: other 1
735 other 2
742 other 2
736
743
737 other 3
744 other 3
738 desc--debug: line 1
745 desc--debug: line 1
739 line 2
746 line 2
740 file_adds: fourth third
747 file_adds: fourth third
741 file_adds: second
748 file_adds: second
742 file_adds:
749 file_adds:
743 file_adds: d
750 file_adds: d
744 file_adds:
751 file_adds:
745 file_adds:
752 file_adds:
746 file_adds: c
753 file_adds: c
747 file_adds: b
754 file_adds: b
748 file_adds: a
755 file_adds: a
749 file_adds--verbose: fourth third
756 file_adds--verbose: fourth third
750 file_adds--verbose: second
757 file_adds--verbose: second
751 file_adds--verbose:
758 file_adds--verbose:
752 file_adds--verbose: d
759 file_adds--verbose: d
753 file_adds--verbose:
760 file_adds--verbose:
754 file_adds--verbose:
761 file_adds--verbose:
755 file_adds--verbose: c
762 file_adds--verbose: c
756 file_adds--verbose: b
763 file_adds--verbose: b
757 file_adds--verbose: a
764 file_adds--verbose: a
758 file_adds--debug: fourth third
765 file_adds--debug: fourth third
759 file_adds--debug: second
766 file_adds--debug: second
760 file_adds--debug:
767 file_adds--debug:
761 file_adds--debug: d
768 file_adds--debug: d
762 file_adds--debug:
769 file_adds--debug:
763 file_adds--debug:
770 file_adds--debug:
764 file_adds--debug: c
771 file_adds--debug: c
765 file_adds--debug: b
772 file_adds--debug: b
766 file_adds--debug: a
773 file_adds--debug: a
767 file_dels: second
774 file_dels: second
768 file_dels:
775 file_dels:
769 file_dels:
776 file_dels:
770 file_dels:
777 file_dels:
771 file_dels:
778 file_dels:
772 file_dels:
779 file_dels:
773 file_dels:
780 file_dels:
774 file_dels:
781 file_dels:
775 file_dels:
782 file_dels:
776 file_dels--verbose: second
783 file_dels--verbose: second
777 file_dels--verbose:
784 file_dels--verbose:
778 file_dels--verbose:
785 file_dels--verbose:
779 file_dels--verbose:
786 file_dels--verbose:
780 file_dels--verbose:
787 file_dels--verbose:
781 file_dels--verbose:
788 file_dels--verbose:
782 file_dels--verbose:
789 file_dels--verbose:
783 file_dels--verbose:
790 file_dels--verbose:
784 file_dels--verbose:
791 file_dels--verbose:
785 file_dels--debug: second
792 file_dels--debug: second
786 file_dels--debug:
793 file_dels--debug:
787 file_dels--debug:
794 file_dels--debug:
788 file_dels--debug:
795 file_dels--debug:
789 file_dels--debug:
796 file_dels--debug:
790 file_dels--debug:
797 file_dels--debug:
791 file_dels--debug:
798 file_dels--debug:
792 file_dels--debug:
799 file_dels--debug:
793 file_dels--debug:
800 file_dels--debug:
794 file_mods:
801 file_mods:
795 file_mods:
802 file_mods:
796 file_mods:
803 file_mods:
797 file_mods:
804 file_mods:
798 file_mods:
805 file_mods:
799 file_mods: c
806 file_mods: c
800 file_mods:
807 file_mods:
801 file_mods:
808 file_mods:
802 file_mods:
809 file_mods:
803 file_mods--verbose:
810 file_mods--verbose:
804 file_mods--verbose:
811 file_mods--verbose:
805 file_mods--verbose:
812 file_mods--verbose:
806 file_mods--verbose:
813 file_mods--verbose:
807 file_mods--verbose:
814 file_mods--verbose:
808 file_mods--verbose: c
815 file_mods--verbose: c
809 file_mods--verbose:
816 file_mods--verbose:
810 file_mods--verbose:
817 file_mods--verbose:
811 file_mods--verbose:
818 file_mods--verbose:
812 file_mods--debug:
819 file_mods--debug:
813 file_mods--debug:
820 file_mods--debug:
814 file_mods--debug:
821 file_mods--debug:
815 file_mods--debug:
822 file_mods--debug:
816 file_mods--debug:
823 file_mods--debug:
817 file_mods--debug: c
824 file_mods--debug: c
818 file_mods--debug:
825 file_mods--debug:
819 file_mods--debug:
826 file_mods--debug:
820 file_mods--debug:
827 file_mods--debug:
821 file_copies: fourth (second)
828 file_copies: fourth (second)
822 file_copies:
829 file_copies:
823 file_copies:
830 file_copies:
824 file_copies:
831 file_copies:
825 file_copies:
832 file_copies:
826 file_copies:
833 file_copies:
827 file_copies:
834 file_copies:
828 file_copies:
835 file_copies:
829 file_copies:
836 file_copies:
830 file_copies--verbose: fourth (second)
837 file_copies--verbose: fourth (second)
831 file_copies--verbose:
838 file_copies--verbose:
832 file_copies--verbose:
839 file_copies--verbose:
833 file_copies--verbose:
840 file_copies--verbose:
834 file_copies--verbose:
841 file_copies--verbose:
835 file_copies--verbose:
842 file_copies--verbose:
836 file_copies--verbose:
843 file_copies--verbose:
837 file_copies--verbose:
844 file_copies--verbose:
838 file_copies--verbose:
845 file_copies--verbose:
839 file_copies--debug: fourth (second)
846 file_copies--debug: fourth (second)
840 file_copies--debug:
847 file_copies--debug:
841 file_copies--debug:
848 file_copies--debug:
842 file_copies--debug:
849 file_copies--debug:
843 file_copies--debug:
850 file_copies--debug:
844 file_copies--debug:
851 file_copies--debug:
845 file_copies--debug:
852 file_copies--debug:
846 file_copies--debug:
853 file_copies--debug:
847 file_copies--debug:
854 file_copies--debug:
848 file_copies_switch:
855 file_copies_switch:
849 file_copies_switch:
856 file_copies_switch:
850 file_copies_switch:
857 file_copies_switch:
851 file_copies_switch:
858 file_copies_switch:
852 file_copies_switch:
859 file_copies_switch:
853 file_copies_switch:
860 file_copies_switch:
854 file_copies_switch:
861 file_copies_switch:
855 file_copies_switch:
862 file_copies_switch:
856 file_copies_switch:
863 file_copies_switch:
857 file_copies_switch--verbose:
864 file_copies_switch--verbose:
858 file_copies_switch--verbose:
865 file_copies_switch--verbose:
859 file_copies_switch--verbose:
866 file_copies_switch--verbose:
860 file_copies_switch--verbose:
867 file_copies_switch--verbose:
861 file_copies_switch--verbose:
868 file_copies_switch--verbose:
862 file_copies_switch--verbose:
869 file_copies_switch--verbose:
863 file_copies_switch--verbose:
870 file_copies_switch--verbose:
864 file_copies_switch--verbose:
871 file_copies_switch--verbose:
865 file_copies_switch--verbose:
872 file_copies_switch--verbose:
866 file_copies_switch--debug:
873 file_copies_switch--debug:
867 file_copies_switch--debug:
874 file_copies_switch--debug:
868 file_copies_switch--debug:
875 file_copies_switch--debug:
869 file_copies_switch--debug:
876 file_copies_switch--debug:
870 file_copies_switch--debug:
877 file_copies_switch--debug:
871 file_copies_switch--debug:
878 file_copies_switch--debug:
872 file_copies_switch--debug:
879 file_copies_switch--debug:
873 file_copies_switch--debug:
880 file_copies_switch--debug:
874 file_copies_switch--debug:
881 file_copies_switch--debug:
875 files: fourth second third
882 files: fourth second third
876 files: second
883 files: second
877 files:
884 files:
878 files: d
885 files: d
879 files:
886 files:
880 files: c
887 files: c
881 files: c
888 files: c
882 files: b
889 files: b
883 files: a
890 files: a
884 files--verbose: fourth second third
891 files--verbose: fourth second third
885 files--verbose: second
892 files--verbose: second
886 files--verbose:
893 files--verbose:
887 files--verbose: d
894 files--verbose: d
888 files--verbose:
895 files--verbose:
889 files--verbose: c
896 files--verbose: c
890 files--verbose: c
897 files--verbose: c
891 files--verbose: b
898 files--verbose: b
892 files--verbose: a
899 files--verbose: a
893 files--debug: fourth second third
900 files--debug: fourth second third
894 files--debug: second
901 files--debug: second
895 files--debug:
902 files--debug:
896 files--debug: d
903 files--debug: d
897 files--debug:
904 files--debug:
898 files--debug: c
905 files--debug: c
899 files--debug: c
906 files--debug: c
900 files--debug: b
907 files--debug: b
901 files--debug: a
908 files--debug: a
902 manifest: 6:94961b75a2da
909 manifest: 6:94961b75a2da
903 manifest: 5:f2dbc354b94e
910 manifest: 5:f2dbc354b94e
904 manifest: 4:4dc3def4f9b4
911 manifest: 4:4dc3def4f9b4
905 manifest: 4:4dc3def4f9b4
912 manifest: 4:4dc3def4f9b4
906 manifest: 3:cb5a1327723b
913 manifest: 3:cb5a1327723b
907 manifest: 3:cb5a1327723b
914 manifest: 3:cb5a1327723b
908 manifest: 2:6e0e82995c35
915 manifest: 2:6e0e82995c35
909 manifest: 1:4e8d705b1e53
916 manifest: 1:4e8d705b1e53
910 manifest: 0:a0c8bcbbb45c
917 manifest: 0:a0c8bcbbb45c
911 manifest--verbose: 6:94961b75a2da
918 manifest--verbose: 6:94961b75a2da
912 manifest--verbose: 5:f2dbc354b94e
919 manifest--verbose: 5:f2dbc354b94e
913 manifest--verbose: 4:4dc3def4f9b4
920 manifest--verbose: 4:4dc3def4f9b4
914 manifest--verbose: 4:4dc3def4f9b4
921 manifest--verbose: 4:4dc3def4f9b4
915 manifest--verbose: 3:cb5a1327723b
922 manifest--verbose: 3:cb5a1327723b
916 manifest--verbose: 3:cb5a1327723b
923 manifest--verbose: 3:cb5a1327723b
917 manifest--verbose: 2:6e0e82995c35
924 manifest--verbose: 2:6e0e82995c35
918 manifest--verbose: 1:4e8d705b1e53
925 manifest--verbose: 1:4e8d705b1e53
919 manifest--verbose: 0:a0c8bcbbb45c
926 manifest--verbose: 0:a0c8bcbbb45c
920 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
927 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
921 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
928 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
922 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
929 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
923 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
930 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
924 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
931 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
925 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
932 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
926 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
933 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
927 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
934 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
928 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
935 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
929 node: 95c24699272ef57d062b8bccc32c878bf841784a
936 node: 95c24699272ef57d062b8bccc32c878bf841784a
930 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
937 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
931 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
938 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
932 node: 13207e5a10d9fd28ec424934298e176197f2c67f
939 node: 13207e5a10d9fd28ec424934298e176197f2c67f
933 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
940 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
934 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
941 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
935 node: 97054abb4ab824450e9164180baf491ae0078465
942 node: 97054abb4ab824450e9164180baf491ae0078465
936 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
943 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
937 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
944 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
938 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
945 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
939 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
946 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
940 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
947 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
941 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
948 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
942 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
949 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
943 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
950 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
944 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
951 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
945 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
952 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
946 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
953 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
947 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
954 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
948 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
955 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
949 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
956 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
950 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
957 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
951 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
958 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
952 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
959 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
953 node--debug: 97054abb4ab824450e9164180baf491ae0078465
960 node--debug: 97054abb4ab824450e9164180baf491ae0078465
954 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
961 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
955 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
962 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
956 parents:
963 parents:
957 parents: -1:000000000000
964 parents: -1:000000000000
958 parents: 5:13207e5a10d9 4:bbe44766e73d
965 parents: 5:13207e5a10d9 4:bbe44766e73d
959 parents: 3:10e46f2dcbf4
966 parents: 3:10e46f2dcbf4
960 parents:
967 parents:
961 parents:
968 parents:
962 parents:
969 parents:
963 parents:
970 parents:
964 parents:
971 parents:
965 parents--verbose:
972 parents--verbose:
966 parents--verbose: -1:000000000000
973 parents--verbose: -1:000000000000
967 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
974 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
968 parents--verbose: 3:10e46f2dcbf4
975 parents--verbose: 3:10e46f2dcbf4
969 parents--verbose:
976 parents--verbose:
970 parents--verbose:
977 parents--verbose:
971 parents--verbose:
978 parents--verbose:
972 parents--verbose:
979 parents--verbose:
973 parents--verbose:
980 parents--verbose:
974 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
981 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
975 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
982 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
976 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
983 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
977 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
984 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
978 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
985 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
979 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
986 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
980 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
987 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
981 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
988 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
982 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
989 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
983 rev: 8
990 rev: 8
984 rev: 7
991 rev: 7
985 rev: 6
992 rev: 6
986 rev: 5
993 rev: 5
987 rev: 4
994 rev: 4
988 rev: 3
995 rev: 3
989 rev: 2
996 rev: 2
990 rev: 1
997 rev: 1
991 rev: 0
998 rev: 0
992 rev--verbose: 8
999 rev--verbose: 8
993 rev--verbose: 7
1000 rev--verbose: 7
994 rev--verbose: 6
1001 rev--verbose: 6
995 rev--verbose: 5
1002 rev--verbose: 5
996 rev--verbose: 4
1003 rev--verbose: 4
997 rev--verbose: 3
1004 rev--verbose: 3
998 rev--verbose: 2
1005 rev--verbose: 2
999 rev--verbose: 1
1006 rev--verbose: 1
1000 rev--verbose: 0
1007 rev--verbose: 0
1001 rev--debug: 8
1008 rev--debug: 8
1002 rev--debug: 7
1009 rev--debug: 7
1003 rev--debug: 6
1010 rev--debug: 6
1004 rev--debug: 5
1011 rev--debug: 5
1005 rev--debug: 4
1012 rev--debug: 4
1006 rev--debug: 3
1013 rev--debug: 3
1007 rev--debug: 2
1014 rev--debug: 2
1008 rev--debug: 1
1015 rev--debug: 1
1009 rev--debug: 0
1016 rev--debug: 0
1010 tags: tip
1017 tags: tip
1011 tags:
1018 tags:
1012 tags:
1019 tags:
1013 tags:
1020 tags:
1014 tags:
1021 tags:
1015 tags:
1022 tags:
1016 tags:
1023 tags:
1017 tags:
1024 tags:
1018 tags:
1025 tags:
1019 tags--verbose: tip
1026 tags--verbose: tip
1020 tags--verbose:
1027 tags--verbose:
1021 tags--verbose:
1028 tags--verbose:
1022 tags--verbose:
1029 tags--verbose:
1023 tags--verbose:
1030 tags--verbose:
1024 tags--verbose:
1031 tags--verbose:
1025 tags--verbose:
1032 tags--verbose:
1026 tags--verbose:
1033 tags--verbose:
1027 tags--verbose:
1034 tags--verbose:
1028 tags--debug: tip
1035 tags--debug: tip
1029 tags--debug:
1036 tags--debug:
1030 tags--debug:
1037 tags--debug:
1031 tags--debug:
1038 tags--debug:
1032 tags--debug:
1039 tags--debug:
1033 tags--debug:
1040 tags--debug:
1034 tags--debug:
1041 tags--debug:
1035 tags--debug:
1042 tags--debug:
1036 tags--debug:
1043 tags--debug:
1037 diffstat: 3: +2/-1
1044 diffstat: 3: +2/-1
1038 diffstat: 1: +1/-0
1045 diffstat: 1: +1/-0
1039 diffstat: 0: +0/-0
1046 diffstat: 0: +0/-0
1040 diffstat: 1: +1/-0
1047 diffstat: 1: +1/-0
1041 diffstat: 0: +0/-0
1048 diffstat: 0: +0/-0
1042 diffstat: 1: +1/-0
1049 diffstat: 1: +1/-0
1043 diffstat: 1: +4/-0
1050 diffstat: 1: +4/-0
1044 diffstat: 1: +2/-0
1051 diffstat: 1: +2/-0
1045 diffstat: 1: +1/-0
1052 diffstat: 1: +1/-0
1046 diffstat--verbose: 3: +2/-1
1053 diffstat--verbose: 3: +2/-1
1047 diffstat--verbose: 1: +1/-0
1054 diffstat--verbose: 1: +1/-0
1048 diffstat--verbose: 0: +0/-0
1055 diffstat--verbose: 0: +0/-0
1049 diffstat--verbose: 1: +1/-0
1056 diffstat--verbose: 1: +1/-0
1050 diffstat--verbose: 0: +0/-0
1057 diffstat--verbose: 0: +0/-0
1051 diffstat--verbose: 1: +1/-0
1058 diffstat--verbose: 1: +1/-0
1052 diffstat--verbose: 1: +4/-0
1059 diffstat--verbose: 1: +4/-0
1053 diffstat--verbose: 1: +2/-0
1060 diffstat--verbose: 1: +2/-0
1054 diffstat--verbose: 1: +1/-0
1061 diffstat--verbose: 1: +1/-0
1055 diffstat--debug: 3: +2/-1
1062 diffstat--debug: 3: +2/-1
1056 diffstat--debug: 1: +1/-0
1063 diffstat--debug: 1: +1/-0
1057 diffstat--debug: 0: +0/-0
1064 diffstat--debug: 0: +0/-0
1058 diffstat--debug: 1: +1/-0
1065 diffstat--debug: 1: +1/-0
1059 diffstat--debug: 0: +0/-0
1066 diffstat--debug: 0: +0/-0
1060 diffstat--debug: 1: +1/-0
1067 diffstat--debug: 1: +1/-0
1061 diffstat--debug: 1: +4/-0
1068 diffstat--debug: 1: +4/-0
1062 diffstat--debug: 1: +2/-0
1069 diffstat--debug: 1: +2/-0
1063 diffstat--debug: 1: +1/-0
1070 diffstat--debug: 1: +1/-0
1064 extras: branch=default
1071 extras: branch=default
1065 extras: branch=default
1072 extras: branch=default
1066 extras: branch=default
1073 extras: branch=default
1067 extras: branch=default
1074 extras: branch=default
1068 extras: branch=foo
1075 extras: branch=foo
1069 extras: branch=default
1076 extras: branch=default
1070 extras: branch=default
1077 extras: branch=default
1071 extras: branch=default
1078 extras: branch=default
1072 extras: branch=default
1079 extras: branch=default
1073 extras--verbose: branch=default
1080 extras--verbose: branch=default
1074 extras--verbose: branch=default
1081 extras--verbose: branch=default
1075 extras--verbose: branch=default
1082 extras--verbose: branch=default
1076 extras--verbose: branch=default
1083 extras--verbose: branch=default
1077 extras--verbose: branch=foo
1084 extras--verbose: branch=foo
1078 extras--verbose: branch=default
1085 extras--verbose: branch=default
1079 extras--verbose: branch=default
1086 extras--verbose: branch=default
1080 extras--verbose: branch=default
1087 extras--verbose: branch=default
1081 extras--verbose: branch=default
1088 extras--verbose: branch=default
1082 extras--debug: branch=default
1089 extras--debug: branch=default
1083 extras--debug: branch=default
1090 extras--debug: branch=default
1084 extras--debug: branch=default
1091 extras--debug: branch=default
1085 extras--debug: branch=default
1092 extras--debug: branch=default
1086 extras--debug: branch=foo
1093 extras--debug: branch=foo
1087 extras--debug: branch=default
1094 extras--debug: branch=default
1088 extras--debug: branch=default
1095 extras--debug: branch=default
1089 extras--debug: branch=default
1096 extras--debug: branch=default
1090 extras--debug: branch=default
1097 extras--debug: branch=default
1091
1098
1092
1099
1093 Filters work:
1100 Filters work:
1094
1101
1095 $ hg log --template '{author|domain}\n'
1102 $ hg log --template '{author|domain}\n'
1096
1103
1097 hostname
1104 hostname
1098
1105
1099
1106
1100
1107
1101
1108
1102 place
1109 place
1103 place
1110 place
1104 hostname
1111 hostname
1105
1112
1106 $ hg log --template '{author|person}\n'
1113 $ hg log --template '{author|person}\n'
1107 test
1114 test
1108 User Name
1115 User Name
1109 person
1116 person
1110 person
1117 person
1111 person
1118 person
1112 person
1119 person
1113 other
1120 other
1114 A. N. Other
1121 A. N. Other
1115 User Name
1122 User Name
1116
1123
1117 $ hg log --template '{author|user}\n'
1124 $ hg log --template '{author|user}\n'
1118 test
1125 test
1119 user
1126 user
1120 person
1127 person
1121 person
1128 person
1122 person
1129 person
1123 person
1130 person
1124 other
1131 other
1125 other
1132 other
1126 user
1133 user
1127
1134
1128 $ hg log --template '{date|date}\n'
1135 $ hg log --template '{date|date}\n'
1129 Wed Jan 01 10:01:00 2020 +0000
1136 Wed Jan 01 10:01:00 2020 +0000
1130 Mon Jan 12 13:46:40 1970 +0000
1137 Mon Jan 12 13:46:40 1970 +0000
1131 Sun Jan 18 08:40:01 1970 +0000
1138 Sun Jan 18 08:40:01 1970 +0000
1132 Sun Jan 18 08:40:00 1970 +0000
1139 Sun Jan 18 08:40:00 1970 +0000
1133 Sat Jan 17 04:53:20 1970 +0000
1140 Sat Jan 17 04:53:20 1970 +0000
1134 Fri Jan 16 01:06:40 1970 +0000
1141 Fri Jan 16 01:06:40 1970 +0000
1135 Wed Jan 14 21:20:00 1970 +0000
1142 Wed Jan 14 21:20:00 1970 +0000
1136 Tue Jan 13 17:33:20 1970 +0000
1143 Tue Jan 13 17:33:20 1970 +0000
1137 Mon Jan 12 13:46:40 1970 +0000
1144 Mon Jan 12 13:46:40 1970 +0000
1138
1145
1139 $ hg log --template '{date|isodate}\n'
1146 $ hg log --template '{date|isodate}\n'
1140 2020-01-01 10:01 +0000
1147 2020-01-01 10:01 +0000
1141 1970-01-12 13:46 +0000
1148 1970-01-12 13:46 +0000
1142 1970-01-18 08:40 +0000
1149 1970-01-18 08:40 +0000
1143 1970-01-18 08:40 +0000
1150 1970-01-18 08:40 +0000
1144 1970-01-17 04:53 +0000
1151 1970-01-17 04:53 +0000
1145 1970-01-16 01:06 +0000
1152 1970-01-16 01:06 +0000
1146 1970-01-14 21:20 +0000
1153 1970-01-14 21:20 +0000
1147 1970-01-13 17:33 +0000
1154 1970-01-13 17:33 +0000
1148 1970-01-12 13:46 +0000
1155 1970-01-12 13:46 +0000
1149
1156
1150 $ hg log --template '{date|isodatesec}\n'
1157 $ hg log --template '{date|isodatesec}\n'
1151 2020-01-01 10:01:00 +0000
1158 2020-01-01 10:01:00 +0000
1152 1970-01-12 13:46:40 +0000
1159 1970-01-12 13:46:40 +0000
1153 1970-01-18 08:40:01 +0000
1160 1970-01-18 08:40:01 +0000
1154 1970-01-18 08:40:00 +0000
1161 1970-01-18 08:40:00 +0000
1155 1970-01-17 04:53:20 +0000
1162 1970-01-17 04:53:20 +0000
1156 1970-01-16 01:06:40 +0000
1163 1970-01-16 01:06:40 +0000
1157 1970-01-14 21:20:00 +0000
1164 1970-01-14 21:20:00 +0000
1158 1970-01-13 17:33:20 +0000
1165 1970-01-13 17:33:20 +0000
1159 1970-01-12 13:46:40 +0000
1166 1970-01-12 13:46:40 +0000
1160
1167
1161 $ hg log --template '{date|rfc822date}\n'
1168 $ hg log --template '{date|rfc822date}\n'
1162 Wed, 01 Jan 2020 10:01:00 +0000
1169 Wed, 01 Jan 2020 10:01:00 +0000
1163 Mon, 12 Jan 1970 13:46:40 +0000
1170 Mon, 12 Jan 1970 13:46:40 +0000
1164 Sun, 18 Jan 1970 08:40:01 +0000
1171 Sun, 18 Jan 1970 08:40:01 +0000
1165 Sun, 18 Jan 1970 08:40:00 +0000
1172 Sun, 18 Jan 1970 08:40:00 +0000
1166 Sat, 17 Jan 1970 04:53:20 +0000
1173 Sat, 17 Jan 1970 04:53:20 +0000
1167 Fri, 16 Jan 1970 01:06:40 +0000
1174 Fri, 16 Jan 1970 01:06:40 +0000
1168 Wed, 14 Jan 1970 21:20:00 +0000
1175 Wed, 14 Jan 1970 21:20:00 +0000
1169 Tue, 13 Jan 1970 17:33:20 +0000
1176 Tue, 13 Jan 1970 17:33:20 +0000
1170 Mon, 12 Jan 1970 13:46:40 +0000
1177 Mon, 12 Jan 1970 13:46:40 +0000
1171
1178
1172 $ hg log --template '{desc|firstline}\n'
1179 $ hg log --template '{desc|firstline}\n'
1173 third
1180 third
1174 second
1181 second
1175 merge
1182 merge
1176 new head
1183 new head
1177 new branch
1184 new branch
1178 no user, no domain
1185 no user, no domain
1179 no person
1186 no person
1180 other 1
1187 other 1
1181 line 1
1188 line 1
1182
1189
1183 $ hg log --template '{node|short}\n'
1190 $ hg log --template '{node|short}\n'
1184 95c24699272e
1191 95c24699272e
1185 29114dbae42b
1192 29114dbae42b
1186 d41e714fe50d
1193 d41e714fe50d
1187 13207e5a10d9
1194 13207e5a10d9
1188 bbe44766e73d
1195 bbe44766e73d
1189 10e46f2dcbf4
1196 10e46f2dcbf4
1190 97054abb4ab8
1197 97054abb4ab8
1191 b608e9d1a3f0
1198 b608e9d1a3f0
1192 1e4e1b8f71e0
1199 1e4e1b8f71e0
1193
1200
1194 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1201 $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
1195 <changeset author="test"/>
1202 <changeset author="test"/>
1196 <changeset author="User Name &lt;user@hostname&gt;"/>
1203 <changeset author="User Name &lt;user@hostname&gt;"/>
1197 <changeset author="person"/>
1204 <changeset author="person"/>
1198 <changeset author="person"/>
1205 <changeset author="person"/>
1199 <changeset author="person"/>
1206 <changeset author="person"/>
1200 <changeset author="person"/>
1207 <changeset author="person"/>
1201 <changeset author="other@place"/>
1208 <changeset author="other@place"/>
1202 <changeset author="A. N. Other &lt;other@place&gt;"/>
1209 <changeset author="A. N. Other &lt;other@place&gt;"/>
1203 <changeset author="User Name &lt;user@hostname&gt;"/>
1210 <changeset author="User Name &lt;user@hostname&gt;"/>
1204
1211
1205 $ hg log --template '{rev}: {children}\n'
1212 $ hg log --template '{rev}: {children}\n'
1206 8:
1213 8:
1207 7: 8:95c24699272e
1214 7: 8:95c24699272e
1208 6:
1215 6:
1209 5: 6:d41e714fe50d
1216 5: 6:d41e714fe50d
1210 4: 6:d41e714fe50d
1217 4: 6:d41e714fe50d
1211 3: 4:bbe44766e73d 5:13207e5a10d9
1218 3: 4:bbe44766e73d 5:13207e5a10d9
1212 2: 3:10e46f2dcbf4
1219 2: 3:10e46f2dcbf4
1213 1: 2:97054abb4ab8
1220 1: 2:97054abb4ab8
1214 0: 1:b608e9d1a3f0
1221 0: 1:b608e9d1a3f0
1215
1222
1216 Formatnode filter works:
1223 Formatnode filter works:
1217
1224
1218 $ hg -q log -r 0 --template '{node|formatnode}\n'
1225 $ hg -q log -r 0 --template '{node|formatnode}\n'
1219 1e4e1b8f71e0
1226 1e4e1b8f71e0
1220
1227
1221 $ hg log -r 0 --template '{node|formatnode}\n'
1228 $ hg log -r 0 --template '{node|formatnode}\n'
1222 1e4e1b8f71e0
1229 1e4e1b8f71e0
1223
1230
1224 $ hg -v log -r 0 --template '{node|formatnode}\n'
1231 $ hg -v log -r 0 --template '{node|formatnode}\n'
1225 1e4e1b8f71e0
1232 1e4e1b8f71e0
1226
1233
1227 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1234 $ hg --debug log -r 0 --template '{node|formatnode}\n'
1228 1e4e1b8f71e05681d422154f5421e385fec3454f
1235 1e4e1b8f71e05681d422154f5421e385fec3454f
1229
1236
1230 Age filter:
1237 Age filter:
1231
1238
1232 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1239 $ hg log --template '{date|age}\n' > /dev/null || exit 1
1233
1240
1234 >>> from datetime import datetime
1241 >>> from datetime import datetime
1235 >>> fp = open('a', 'w')
1242 >>> fp = open('a', 'w')
1236 >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00')
1243 >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00')
1237 >>> fp.close()
1244 >>> fp.close()
1238 $ hg add a
1245 $ hg add a
1239 $ hg commit -m future -d "`cat a`"
1246 $ hg commit -m future -d "`cat a`"
1240
1247
1241 $ hg log -l1 --template '{date|age}\n'
1248 $ hg log -l1 --template '{date|age}\n'
1242 7 years from now
1249 7 years from now
1243
1250
1244 Error on syntax:
1251 Error on syntax:
1245
1252
1246 $ echo 'x = "f' >> t
1253 $ echo 'x = "f' >> t
1247 $ hg log
1254 $ hg log
1248 abort: t:3: unmatched quotes
1255 abort: t:3: unmatched quotes
1249 [255]
1256 [255]
1250
1257
1251 $ cd ..
1258 $ cd ..
1252
1259
1253
1260
1254 latesttag:
1261 latesttag:
1255
1262
1256 $ hg init latesttag
1263 $ hg init latesttag
1257 $ cd latesttag
1264 $ cd latesttag
1258
1265
1259 $ echo a > file
1266 $ echo a > file
1260 $ hg ci -Am a -d '0 0'
1267 $ hg ci -Am a -d '0 0'
1261 adding file
1268 adding file
1262
1269
1263 $ echo b >> file
1270 $ echo b >> file
1264 $ hg ci -m b -d '1 0'
1271 $ hg ci -m b -d '1 0'
1265
1272
1266 $ echo c >> head1
1273 $ echo c >> head1
1267 $ hg ci -Am h1c -d '2 0'
1274 $ hg ci -Am h1c -d '2 0'
1268 adding head1
1275 adding head1
1269
1276
1270 $ hg update -q 1
1277 $ hg update -q 1
1271 $ echo d >> head2
1278 $ echo d >> head2
1272 $ hg ci -Am h2d -d '3 0'
1279 $ hg ci -Am h2d -d '3 0'
1273 adding head2
1280 adding head2
1274 created new head
1281 created new head
1275
1282
1276 $ echo e >> head2
1283 $ echo e >> head2
1277 $ hg ci -m h2e -d '4 0'
1284 $ hg ci -m h2e -d '4 0'
1278
1285
1279 $ hg merge -q
1286 $ hg merge -q
1280 $ hg ci -m merge -d '5 0'
1287 $ hg ci -m merge -d '5 0'
1281
1288
1282 No tag set:
1289 No tag set:
1283
1290
1284 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1291 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1285 5: null+5
1292 5: null+5
1286 4: null+4
1293 4: null+4
1287 3: null+3
1294 3: null+3
1288 2: null+3
1295 2: null+3
1289 1: null+2
1296 1: null+2
1290 0: null+1
1297 0: null+1
1291
1298
1292 One common tag: longuest path wins:
1299 One common tag: longuest path wins:
1293
1300
1294 $ hg tag -r 1 -m t1 -d '6 0' t1
1301 $ hg tag -r 1 -m t1 -d '6 0' t1
1295 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1302 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1296 6: t1+4
1303 6: t1+4
1297 5: t1+3
1304 5: t1+3
1298 4: t1+2
1305 4: t1+2
1299 3: t1+1
1306 3: t1+1
1300 2: t1+1
1307 2: t1+1
1301 1: t1+0
1308 1: t1+0
1302 0: null+1
1309 0: null+1
1303
1310
1304 One ancestor tag: more recent wins:
1311 One ancestor tag: more recent wins:
1305
1312
1306 $ hg tag -r 2 -m t2 -d '7 0' t2
1313 $ hg tag -r 2 -m t2 -d '7 0' t2
1307 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1314 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1308 7: t2+3
1315 7: t2+3
1309 6: t2+2
1316 6: t2+2
1310 5: t2+1
1317 5: t2+1
1311 4: t1+2
1318 4: t1+2
1312 3: t1+1
1319 3: t1+1
1313 2: t2+0
1320 2: t2+0
1314 1: t1+0
1321 1: t1+0
1315 0: null+1
1322 0: null+1
1316
1323
1317 Two branch tags: more recent wins:
1324 Two branch tags: more recent wins:
1318
1325
1319 $ hg tag -r 3 -m t3 -d '8 0' t3
1326 $ hg tag -r 3 -m t3 -d '8 0' t3
1320 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1327 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1321 8: t3+5
1328 8: t3+5
1322 7: t3+4
1329 7: t3+4
1323 6: t3+3
1330 6: t3+3
1324 5: t3+2
1331 5: t3+2
1325 4: t3+1
1332 4: t3+1
1326 3: t3+0
1333 3: t3+0
1327 2: t2+0
1334 2: t2+0
1328 1: t1+0
1335 1: t1+0
1329 0: null+1
1336 0: null+1
1330
1337
1331 Merged tag overrides:
1338 Merged tag overrides:
1332
1339
1333 $ hg tag -r 5 -m t5 -d '9 0' t5
1340 $ hg tag -r 5 -m t5 -d '9 0' t5
1334 $ hg tag -r 3 -m at3 -d '10 0' at3
1341 $ hg tag -r 3 -m at3 -d '10 0' at3
1335 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1342 $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
1336 10: t5+5
1343 10: t5+5
1337 9: t5+4
1344 9: t5+4
1338 8: t5+3
1345 8: t5+3
1339 7: t5+2
1346 7: t5+2
1340 6: t5+1
1347 6: t5+1
1341 5: t5+0
1348 5: t5+0
1342 4: at3:t3+1
1349 4: at3:t3+1
1343 3: at3:t3+0
1350 3: at3:t3+0
1344 2: t2+0
1351 2: t2+0
1345 1: t1+0
1352 1: t1+0
1346 0: null+1
1353 0: null+1
1347
1354
1348 $ cd ..
1355 $ cd ..
1349
1356
1350
1357
1351 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1358 Style path expansion: issue1948 - ui.style option doesn't work on OSX
1352 if it is a relative path
1359 if it is a relative path
1353
1360
1354 $ mkdir -p home/styles
1361 $ mkdir -p home/styles
1355
1362
1356 $ cat > home/styles/teststyle <<EOF
1363 $ cat > home/styles/teststyle <<EOF
1357 > changeset = 'test {rev}:{node|short}\n'
1364 > changeset = 'test {rev}:{node|short}\n'
1358 > EOF
1365 > EOF
1359
1366
1360 $ HOME=`pwd`/home; export HOME
1367 $ HOME=`pwd`/home; export HOME
1361
1368
1362 $ cat > latesttag/.hg/hgrc <<EOF
1369 $ cat > latesttag/.hg/hgrc <<EOF
1363 > [ui]
1370 > [ui]
1364 > style = ~/styles/teststyle
1371 > style = ~/styles/teststyle
1365 > EOF
1372 > EOF
1366
1373
1367 $ hg -R latesttag tip
1374 $ hg -R latesttag tip
1368 test 10:dee8f28249af
1375 test 10:dee8f28249af
1369
1376
1370 Test recursive showlist template (issue1989):
1377 Test recursive showlist template (issue1989):
1371
1378
1372 $ cat > style1989 <<EOF
1379 $ cat > style1989 <<EOF
1373 > changeset = '{file_mods}{manifest}{extras}'
1380 > changeset = '{file_mods}{manifest}{extras}'
1374 > file_mod = 'M|{author|person}\n'
1381 > file_mod = 'M|{author|person}\n'
1375 > manifest = '{rev},{author}\n'
1382 > manifest = '{rev},{author}\n'
1376 > extra = '{key}: {author}\n'
1383 > extra = '{key}: {author}\n'
1377 > EOF
1384 > EOF
1378
1385
1379 $ hg -R latesttag log -r tip --style=style1989
1386 $ hg -R latesttag log -r tip --style=style1989
1380 M|test
1387 M|test
1381 10,test
1388 10,test
1382 branch: test
1389 branch: test
1383
1390
General Comments 0
You need to be logged in to leave comments. Login now