Show More
@@ -1,777 +1,789 b'' | |||||
1 | # templatekw.py - common changeset template keywords |
|
1 | # templatekw.py - common changeset template keywords | |
2 | # |
|
2 | # | |
3 | # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | from .i18n import _ |
|
10 | from .i18n import _ | |
11 | from .node import ( |
|
11 | from .node import ( | |
12 | hex, |
|
12 | hex, | |
13 | nullid, |
|
13 | nullid, | |
14 | short, |
|
14 | short, | |
15 | ) |
|
15 | ) | |
16 |
|
16 | |||
17 | from . import ( |
|
17 | from . import ( | |
18 | encoding, |
|
18 | encoding, | |
19 | error, |
|
19 | error, | |
20 | hbisect, |
|
20 | hbisect, | |
21 | obsutil, |
|
21 | obsutil, | |
22 | patch, |
|
22 | patch, | |
23 | pycompat, |
|
23 | pycompat, | |
24 | registrar, |
|
24 | registrar, | |
25 | scmutil, |
|
25 | scmutil, | |
26 | util, |
|
26 | util, | |
27 | ) |
|
27 | ) | |
28 |
|
28 | |||
29 | class _hybrid(object): |
|
29 | class _hybrid(object): | |
30 | """Wrapper for list or dict to support legacy template |
|
30 | """Wrapper for list or dict to support legacy template | |
31 |
|
31 | |||
32 | This class allows us to handle both: |
|
32 | This class allows us to handle both: | |
33 | - "{files}" (legacy command-line-specific list hack) and |
|
33 | - "{files}" (legacy command-line-specific list hack) and | |
34 | - "{files % '{file}\n'}" (hgweb-style with inlining and function support) |
|
34 | - "{files % '{file}\n'}" (hgweb-style with inlining and function support) | |
35 | and to access raw values: |
|
35 | and to access raw values: | |
36 | - "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}" |
|
36 | - "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}" | |
37 | - "{get(extras, key)}" |
|
37 | - "{get(extras, key)}" | |
38 | - "{files|json}" |
|
38 | - "{files|json}" | |
39 | """ |
|
39 | """ | |
40 |
|
40 | |||
41 | def __init__(self, gen, values, makemap, joinfmt): |
|
41 | def __init__(self, gen, values, makemap, joinfmt): | |
42 | if gen is not None: |
|
42 | if gen is not None: | |
43 | self.gen = gen |
|
43 | self.gen = gen | |
44 | self._values = values |
|
44 | self._values = values | |
45 | self._makemap = makemap |
|
45 | self._makemap = makemap | |
46 | self.joinfmt = joinfmt |
|
46 | self.joinfmt = joinfmt | |
47 | @util.propertycache |
|
47 | @util.propertycache | |
48 | def gen(self): |
|
48 | def gen(self): | |
49 | return self._defaultgen() |
|
49 | return self._defaultgen() | |
50 | def _defaultgen(self): |
|
50 | def _defaultgen(self): | |
51 | """Generator to stringify this as {join(self, ' ')}""" |
|
51 | """Generator to stringify this as {join(self, ' ')}""" | |
52 | for i, d in enumerate(self.itermaps()): |
|
52 | for i, d in enumerate(self.itermaps()): | |
53 | if i > 0: |
|
53 | if i > 0: | |
54 | yield ' ' |
|
54 | yield ' ' | |
55 | yield self.joinfmt(d) |
|
55 | yield self.joinfmt(d) | |
56 | def itermaps(self): |
|
56 | def itermaps(self): | |
57 | makemap = self._makemap |
|
57 | makemap = self._makemap | |
58 | for x in self._values: |
|
58 | for x in self._values: | |
59 | yield makemap(x) |
|
59 | yield makemap(x) | |
60 | def __contains__(self, x): |
|
60 | def __contains__(self, x): | |
61 | return x in self._values |
|
61 | return x in self._values | |
62 | def __getitem__(self, key): |
|
62 | def __getitem__(self, key): | |
63 | return self._values[key] |
|
63 | return self._values[key] | |
64 | def __len__(self): |
|
64 | def __len__(self): | |
65 | return len(self._values) |
|
65 | return len(self._values) | |
66 | def __iter__(self): |
|
66 | def __iter__(self): | |
67 | return iter(self._values) |
|
67 | return iter(self._values) | |
68 | def __getattr__(self, name): |
|
68 | def __getattr__(self, name): | |
69 | if name not in ('get', 'items', 'iteritems', 'iterkeys', 'itervalues', |
|
69 | if name not in ('get', 'items', 'iteritems', 'iterkeys', 'itervalues', | |
70 | 'keys', 'values'): |
|
70 | 'keys', 'values'): | |
71 | raise AttributeError(name) |
|
71 | raise AttributeError(name) | |
72 | return getattr(self._values, name) |
|
72 | return getattr(self._values, name) | |
73 |
|
73 | |||
74 | def hybriddict(data, key='key', value='value', fmt='%s=%s', gen=None): |
|
74 | def hybriddict(data, key='key', value='value', fmt='%s=%s', gen=None): | |
75 | """Wrap data to support both dict-like and string-like operations""" |
|
75 | """Wrap data to support both dict-like and string-like operations""" | |
76 | return _hybrid(gen, data, lambda k: {key: k, value: data[k]}, |
|
76 | return _hybrid(gen, data, lambda k: {key: k, value: data[k]}, | |
77 | lambda d: fmt % (d[key], d[value])) |
|
77 | lambda d: fmt % (d[key], d[value])) | |
78 |
|
78 | |||
79 | def hybridlist(data, name, fmt='%s', gen=None): |
|
79 | def hybridlist(data, name, fmt='%s', gen=None): | |
80 | """Wrap data to support both list-like and string-like operations""" |
|
80 | """Wrap data to support both list-like and string-like operations""" | |
81 | return _hybrid(gen, data, lambda x: {name: x}, lambda d: fmt % d[name]) |
|
81 | return _hybrid(gen, data, lambda x: {name: x}, lambda d: fmt % d[name]) | |
82 |
|
82 | |||
83 | def unwraphybrid(thing): |
|
83 | def unwraphybrid(thing): | |
84 | """Return an object which can be stringified possibly by using a legacy |
|
84 | """Return an object which can be stringified possibly by using a legacy | |
85 | template""" |
|
85 | template""" | |
86 | if not util.safehasattr(thing, 'gen'): |
|
86 | if not util.safehasattr(thing, 'gen'): | |
87 | return thing |
|
87 | return thing | |
88 | return thing.gen |
|
88 | return thing.gen | |
89 |
|
89 | |||
90 | def showdict(name, data, mapping, plural=None, key='key', value='value', |
|
90 | def showdict(name, data, mapping, plural=None, key='key', value='value', | |
91 | fmt='%s=%s', separator=' '): |
|
91 | fmt='%s=%s', separator=' '): | |
92 | c = [{key: k, value: v} for k, v in data.iteritems()] |
|
92 | c = [{key: k, value: v} for k, v in data.iteritems()] | |
93 | f = _showlist(name, c, mapping, plural, separator) |
|
93 | f = _showlist(name, c, mapping, plural, separator) | |
94 | return hybriddict(data, key=key, value=value, fmt=fmt, gen=f) |
|
94 | return hybriddict(data, key=key, value=value, fmt=fmt, gen=f) | |
95 |
|
95 | |||
96 | def showlist(name, values, mapping, plural=None, element=None, separator=' '): |
|
96 | def showlist(name, values, mapping, plural=None, element=None, separator=' '): | |
97 | if not element: |
|
97 | if not element: | |
98 | element = name |
|
98 | element = name | |
99 | f = _showlist(name, values, mapping, plural, separator) |
|
99 | f = _showlist(name, values, mapping, plural, separator) | |
100 | return hybridlist(values, name=element, gen=f) |
|
100 | return hybridlist(values, name=element, gen=f) | |
101 |
|
101 | |||
102 | def _showlist(name, values, mapping, plural=None, separator=' '): |
|
102 | def _showlist(name, values, mapping, plural=None, separator=' '): | |
103 | '''expand set of values. |
|
103 | '''expand set of values. | |
104 | name is name of key in template map. |
|
104 | name is name of key in template map. | |
105 | values is list of strings or dicts. |
|
105 | values is list of strings or dicts. | |
106 | plural is plural of name, if not simply name + 's'. |
|
106 | plural is plural of name, if not simply name + 's'. | |
107 | separator is used to join values as a string |
|
107 | separator is used to join values as a string | |
108 |
|
108 | |||
109 | expansion works like this, given name 'foo'. |
|
109 | expansion works like this, given name 'foo'. | |
110 |
|
110 | |||
111 | if values is empty, expand 'no_foos'. |
|
111 | if values is empty, expand 'no_foos'. | |
112 |
|
112 | |||
113 | if 'foo' not in template map, return values as a string, |
|
113 | if 'foo' not in template map, return values as a string, | |
114 | joined by 'separator'. |
|
114 | joined by 'separator'. | |
115 |
|
115 | |||
116 | expand 'start_foos'. |
|
116 | expand 'start_foos'. | |
117 |
|
117 | |||
118 | for each value, expand 'foo'. if 'last_foo' in template |
|
118 | for each value, expand 'foo'. if 'last_foo' in template | |
119 | map, expand it instead of 'foo' for last key. |
|
119 | map, expand it instead of 'foo' for last key. | |
120 |
|
120 | |||
121 | expand 'end_foos'. |
|
121 | expand 'end_foos'. | |
122 | ''' |
|
122 | ''' | |
123 | templ = mapping['templ'] |
|
123 | templ = mapping['templ'] | |
124 | strmapping = pycompat.strkwargs(mapping) |
|
124 | strmapping = pycompat.strkwargs(mapping) | |
125 | if not plural: |
|
125 | if not plural: | |
126 | plural = name + 's' |
|
126 | plural = name + 's' | |
127 | if not values: |
|
127 | if not values: | |
128 | noname = 'no_' + plural |
|
128 | noname = 'no_' + plural | |
129 | if noname in templ: |
|
129 | if noname in templ: | |
130 | yield templ(noname, **strmapping) |
|
130 | yield templ(noname, **strmapping) | |
131 | return |
|
131 | return | |
132 | if name not in templ: |
|
132 | if name not in templ: | |
133 | if isinstance(values[0], bytes): |
|
133 | if isinstance(values[0], bytes): | |
134 | yield separator.join(values) |
|
134 | yield separator.join(values) | |
135 | else: |
|
135 | else: | |
136 | for v in values: |
|
136 | for v in values: | |
137 | yield dict(v, **strmapping) |
|
137 | yield dict(v, **strmapping) | |
138 | return |
|
138 | return | |
139 | startname = 'start_' + plural |
|
139 | startname = 'start_' + plural | |
140 | if startname in templ: |
|
140 | if startname in templ: | |
141 | yield templ(startname, **strmapping) |
|
141 | yield templ(startname, **strmapping) | |
142 | vmapping = mapping.copy() |
|
142 | vmapping = mapping.copy() | |
143 | def one(v, tag=name): |
|
143 | def one(v, tag=name): | |
144 | try: |
|
144 | try: | |
145 | vmapping.update(v) |
|
145 | vmapping.update(v) | |
146 | except (AttributeError, ValueError): |
|
146 | except (AttributeError, ValueError): | |
147 | try: |
|
147 | try: | |
148 | for a, b in v: |
|
148 | for a, b in v: | |
149 | vmapping[a] = b |
|
149 | vmapping[a] = b | |
150 | except ValueError: |
|
150 | except ValueError: | |
151 | vmapping[name] = v |
|
151 | vmapping[name] = v | |
152 | return templ(tag, **pycompat.strkwargs(vmapping)) |
|
152 | return templ(tag, **pycompat.strkwargs(vmapping)) | |
153 | lastname = 'last_' + name |
|
153 | lastname = 'last_' + name | |
154 | if lastname in templ: |
|
154 | if lastname in templ: | |
155 | last = values.pop() |
|
155 | last = values.pop() | |
156 | else: |
|
156 | else: | |
157 | last = None |
|
157 | last = None | |
158 | for v in values: |
|
158 | for v in values: | |
159 | yield one(v) |
|
159 | yield one(v) | |
160 | if last is not None: |
|
160 | if last is not None: | |
161 | yield one(last, tag=lastname) |
|
161 | yield one(last, tag=lastname) | |
162 | endname = 'end_' + plural |
|
162 | endname = 'end_' + plural | |
163 | if endname in templ: |
|
163 | if endname in templ: | |
164 | yield templ(endname, **strmapping) |
|
164 | yield templ(endname, **strmapping) | |
165 |
|
165 | |||
166 | def _formatrevnode(ctx): |
|
166 | def _formatrevnode(ctx): | |
167 | """Format changeset as '{rev}:{node|formatnode}', which is the default |
|
167 | """Format changeset as '{rev}:{node|formatnode}', which is the default | |
168 | template provided by cmdutil.changeset_templater""" |
|
168 | template provided by cmdutil.changeset_templater""" | |
169 | repo = ctx.repo() |
|
169 | repo = ctx.repo() | |
170 | if repo.ui.debugflag: |
|
170 | if repo.ui.debugflag: | |
171 | hexfunc = hex |
|
171 | hexfunc = hex | |
172 | else: |
|
172 | else: | |
173 | hexfunc = short |
|
173 | hexfunc = short | |
174 | return '%d:%s' % (scmutil.intrev(ctx), hexfunc(scmutil.binnode(ctx))) |
|
174 | return '%d:%s' % (scmutil.intrev(ctx), hexfunc(scmutil.binnode(ctx))) | |
175 |
|
175 | |||
176 | def getfiles(repo, ctx, revcache): |
|
176 | def getfiles(repo, ctx, revcache): | |
177 | if 'files' not in revcache: |
|
177 | if 'files' not in revcache: | |
178 | revcache['files'] = repo.status(ctx.p1(), ctx)[:3] |
|
178 | revcache['files'] = repo.status(ctx.p1(), ctx)[:3] | |
179 | return revcache['files'] |
|
179 | return revcache['files'] | |
180 |
|
180 | |||
181 | def getlatesttags(repo, ctx, cache, pattern=None): |
|
181 | def getlatesttags(repo, ctx, cache, pattern=None): | |
182 | '''return date, distance and name for the latest tag of rev''' |
|
182 | '''return date, distance and name for the latest tag of rev''' | |
183 |
|
183 | |||
184 | cachename = 'latesttags' |
|
184 | cachename = 'latesttags' | |
185 | if pattern is not None: |
|
185 | if pattern is not None: | |
186 | cachename += '-' + pattern |
|
186 | cachename += '-' + pattern | |
187 | match = util.stringmatcher(pattern)[2] |
|
187 | match = util.stringmatcher(pattern)[2] | |
188 | else: |
|
188 | else: | |
189 | match = util.always |
|
189 | match = util.always | |
190 |
|
190 | |||
191 | if cachename not in cache: |
|
191 | if cachename not in cache: | |
192 | # Cache mapping from rev to a tuple with tag date, tag |
|
192 | # Cache mapping from rev to a tuple with tag date, tag | |
193 | # distance and tag name |
|
193 | # distance and tag name | |
194 | cache[cachename] = {-1: (0, 0, ['null'])} |
|
194 | cache[cachename] = {-1: (0, 0, ['null'])} | |
195 | latesttags = cache[cachename] |
|
195 | latesttags = cache[cachename] | |
196 |
|
196 | |||
197 | rev = ctx.rev() |
|
197 | rev = ctx.rev() | |
198 | todo = [rev] |
|
198 | todo = [rev] | |
199 | while todo: |
|
199 | while todo: | |
200 | rev = todo.pop() |
|
200 | rev = todo.pop() | |
201 | if rev in latesttags: |
|
201 | if rev in latesttags: | |
202 | continue |
|
202 | continue | |
203 | ctx = repo[rev] |
|
203 | ctx = repo[rev] | |
204 | tags = [t for t in ctx.tags() |
|
204 | tags = [t for t in ctx.tags() | |
205 | if (repo.tagtype(t) and repo.tagtype(t) != 'local' |
|
205 | if (repo.tagtype(t) and repo.tagtype(t) != 'local' | |
206 | and match(t))] |
|
206 | and match(t))] | |
207 | if tags: |
|
207 | if tags: | |
208 | latesttags[rev] = ctx.date()[0], 0, [t for t in sorted(tags)] |
|
208 | latesttags[rev] = ctx.date()[0], 0, [t for t in sorted(tags)] | |
209 | continue |
|
209 | continue | |
210 | try: |
|
210 | try: | |
211 | # The tuples are laid out so the right one can be found by |
|
211 | ptags = [latesttags[p.rev()] for p in ctx.parents()] | |
212 | # comparison. |
|
212 | if len(ptags) > 1: | |
213 | pdate, pdist, ptag = max( |
|
213 | if ptags[0][2] == ptags[1][2]: | |
214 | latesttags[p.rev()] for p in ctx.parents()) |
|
214 | # The tuples are laid out so the right one can be found by | |
|
215 | # comparison in this case. | |||
|
216 | pdate, pdist, ptag = max(ptags) | |||
|
217 | else: | |||
|
218 | def key(x): | |||
|
219 | changessincetag = len(repo.revs('only(%d, %s)', | |||
|
220 | ctx.rev(), x[2][0])) | |||
|
221 | # Smallest number of changes since tag wins. Date is | |||
|
222 | # used as tiebreaker. | |||
|
223 | return [-changessincetag, x[0]] | |||
|
224 | pdate, pdist, ptag = max(ptags, key=key) | |||
|
225 | else: | |||
|
226 | pdate, pdist, ptag = ptags[0] | |||
215 | except KeyError: |
|
227 | except KeyError: | |
216 | # Cache miss - recurse |
|
228 | # Cache miss - recurse | |
217 | todo.append(rev) |
|
229 | todo.append(rev) | |
218 | todo.extend(p.rev() for p in ctx.parents()) |
|
230 | todo.extend(p.rev() for p in ctx.parents()) | |
219 | continue |
|
231 | continue | |
220 | latesttags[rev] = pdate, pdist + 1, ptag |
|
232 | latesttags[rev] = pdate, pdist + 1, ptag | |
221 | return latesttags[rev] |
|
233 | return latesttags[rev] | |
222 |
|
234 | |||
223 | def getrenamedfn(repo, endrev=None): |
|
235 | def getrenamedfn(repo, endrev=None): | |
224 | rcache = {} |
|
236 | rcache = {} | |
225 | if endrev is None: |
|
237 | if endrev is None: | |
226 | endrev = len(repo) |
|
238 | endrev = len(repo) | |
227 |
|
239 | |||
228 | def getrenamed(fn, rev): |
|
240 | def getrenamed(fn, rev): | |
229 | '''looks up all renames for a file (up to endrev) the first |
|
241 | '''looks up all renames for a file (up to endrev) the first | |
230 | time the file is given. It indexes on the changerev and only |
|
242 | time the file is given. It indexes on the changerev and only | |
231 | parses the manifest if linkrev != changerev. |
|
243 | parses the manifest if linkrev != changerev. | |
232 | Returns rename info for fn at changerev rev.''' |
|
244 | Returns rename info for fn at changerev rev.''' | |
233 | if fn not in rcache: |
|
245 | if fn not in rcache: | |
234 | rcache[fn] = {} |
|
246 | rcache[fn] = {} | |
235 | fl = repo.file(fn) |
|
247 | fl = repo.file(fn) | |
236 | for i in fl: |
|
248 | for i in fl: | |
237 | lr = fl.linkrev(i) |
|
249 | lr = fl.linkrev(i) | |
238 | renamed = fl.renamed(fl.node(i)) |
|
250 | renamed = fl.renamed(fl.node(i)) | |
239 | rcache[fn][lr] = renamed |
|
251 | rcache[fn][lr] = renamed | |
240 | if lr >= endrev: |
|
252 | if lr >= endrev: | |
241 | break |
|
253 | break | |
242 | if rev in rcache[fn]: |
|
254 | if rev in rcache[fn]: | |
243 | return rcache[fn][rev] |
|
255 | return rcache[fn][rev] | |
244 |
|
256 | |||
245 | # If linkrev != rev (i.e. rev not found in rcache) fallback to |
|
257 | # If linkrev != rev (i.e. rev not found in rcache) fallback to | |
246 | # filectx logic. |
|
258 | # filectx logic. | |
247 | try: |
|
259 | try: | |
248 | return repo[rev][fn].renamed() |
|
260 | return repo[rev][fn].renamed() | |
249 | except error.LookupError: |
|
261 | except error.LookupError: | |
250 | return None |
|
262 | return None | |
251 |
|
263 | |||
252 | return getrenamed |
|
264 | return getrenamed | |
253 |
|
265 | |||
254 | # default templates internally used for rendering of lists |
|
266 | # default templates internally used for rendering of lists | |
255 | defaulttempl = { |
|
267 | defaulttempl = { | |
256 | 'parent': '{rev}:{node|formatnode} ', |
|
268 | 'parent': '{rev}:{node|formatnode} ', | |
257 | 'manifest': '{rev}:{node|formatnode}', |
|
269 | 'manifest': '{rev}:{node|formatnode}', | |
258 | 'file_copy': '{name} ({source})', |
|
270 | 'file_copy': '{name} ({source})', | |
259 | 'envvar': '{key}={value}', |
|
271 | 'envvar': '{key}={value}', | |
260 | 'extra': '{key}={value|stringescape}' |
|
272 | 'extra': '{key}={value|stringescape}' | |
261 | } |
|
273 | } | |
262 | # filecopy is preserved for compatibility reasons |
|
274 | # filecopy is preserved for compatibility reasons | |
263 | defaulttempl['filecopy'] = defaulttempl['file_copy'] |
|
275 | defaulttempl['filecopy'] = defaulttempl['file_copy'] | |
264 |
|
276 | |||
265 | # keywords are callables like: |
|
277 | # keywords are callables like: | |
266 | # fn(repo, ctx, templ, cache, revcache, **args) |
|
278 | # fn(repo, ctx, templ, cache, revcache, **args) | |
267 | # with: |
|
279 | # with: | |
268 | # repo - current repository instance |
|
280 | # repo - current repository instance | |
269 | # ctx - the changectx being displayed |
|
281 | # ctx - the changectx being displayed | |
270 | # templ - the templater instance |
|
282 | # templ - the templater instance | |
271 | # cache - a cache dictionary for the whole templater run |
|
283 | # cache - a cache dictionary for the whole templater run | |
272 | # revcache - a cache dictionary for the current revision |
|
284 | # revcache - a cache dictionary for the current revision | |
273 | keywords = {} |
|
285 | keywords = {} | |
274 |
|
286 | |||
275 | templatekeyword = registrar.templatekeyword(keywords) |
|
287 | templatekeyword = registrar.templatekeyword(keywords) | |
276 |
|
288 | |||
277 | @templatekeyword('author') |
|
289 | @templatekeyword('author') | |
278 | def showauthor(repo, ctx, templ, **args): |
|
290 | def showauthor(repo, ctx, templ, **args): | |
279 | """String. The unmodified author of the changeset.""" |
|
291 | """String. The unmodified author of the changeset.""" | |
280 | return ctx.user() |
|
292 | return ctx.user() | |
281 |
|
293 | |||
282 | @templatekeyword('bisect') |
|
294 | @templatekeyword('bisect') | |
283 | def showbisect(repo, ctx, templ, **args): |
|
295 | def showbisect(repo, ctx, templ, **args): | |
284 | """String. The changeset bisection status.""" |
|
296 | """String. The changeset bisection status.""" | |
285 | return hbisect.label(repo, ctx.node()) |
|
297 | return hbisect.label(repo, ctx.node()) | |
286 |
|
298 | |||
287 | @templatekeyword('branch') |
|
299 | @templatekeyword('branch') | |
288 | def showbranch(**args): |
|
300 | def showbranch(**args): | |
289 | """String. The name of the branch on which the changeset was |
|
301 | """String. The name of the branch on which the changeset was | |
290 | committed. |
|
302 | committed. | |
291 | """ |
|
303 | """ | |
292 | return args[r'ctx'].branch() |
|
304 | return args[r'ctx'].branch() | |
293 |
|
305 | |||
294 | @templatekeyword('branches') |
|
306 | @templatekeyword('branches') | |
295 | def showbranches(**args): |
|
307 | def showbranches(**args): | |
296 | """List of strings. The name of the branch on which the |
|
308 | """List of strings. The name of the branch on which the | |
297 | changeset was committed. Will be empty if the branch name was |
|
309 | changeset was committed. Will be empty if the branch name was | |
298 | default. (DEPRECATED) |
|
310 | default. (DEPRECATED) | |
299 | """ |
|
311 | """ | |
300 | args = pycompat.byteskwargs(args) |
|
312 | args = pycompat.byteskwargs(args) | |
301 | branch = args['ctx'].branch() |
|
313 | branch = args['ctx'].branch() | |
302 | if branch != 'default': |
|
314 | if branch != 'default': | |
303 | return showlist('branch', [branch], args, plural='branches') |
|
315 | return showlist('branch', [branch], args, plural='branches') | |
304 | return showlist('branch', [], args, plural='branches') |
|
316 | return showlist('branch', [], args, plural='branches') | |
305 |
|
317 | |||
306 | @templatekeyword('bookmarks') |
|
318 | @templatekeyword('bookmarks') | |
307 | def showbookmarks(**args): |
|
319 | def showbookmarks(**args): | |
308 | """List of strings. Any bookmarks associated with the |
|
320 | """List of strings. Any bookmarks associated with the | |
309 | changeset. Also sets 'active', the name of the active bookmark. |
|
321 | changeset. Also sets 'active', the name of the active bookmark. | |
310 | """ |
|
322 | """ | |
311 | args = pycompat.byteskwargs(args) |
|
323 | args = pycompat.byteskwargs(args) | |
312 | repo = args['ctx']._repo |
|
324 | repo = args['ctx']._repo | |
313 | bookmarks = args['ctx'].bookmarks() |
|
325 | bookmarks = args['ctx'].bookmarks() | |
314 | active = repo._activebookmark |
|
326 | active = repo._activebookmark | |
315 | makemap = lambda v: {'bookmark': v, 'active': active, 'current': active} |
|
327 | makemap = lambda v: {'bookmark': v, 'active': active, 'current': active} | |
316 | f = _showlist('bookmark', bookmarks, args) |
|
328 | f = _showlist('bookmark', bookmarks, args) | |
317 | return _hybrid(f, bookmarks, makemap, lambda x: x['bookmark']) |
|
329 | return _hybrid(f, bookmarks, makemap, lambda x: x['bookmark']) | |
318 |
|
330 | |||
319 | @templatekeyword('children') |
|
331 | @templatekeyword('children') | |
320 | def showchildren(**args): |
|
332 | def showchildren(**args): | |
321 | """List of strings. The children of the changeset.""" |
|
333 | """List of strings. The children of the changeset.""" | |
322 | args = pycompat.byteskwargs(args) |
|
334 | args = pycompat.byteskwargs(args) | |
323 | ctx = args['ctx'] |
|
335 | ctx = args['ctx'] | |
324 | childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()] |
|
336 | childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()] | |
325 | return showlist('children', childrevs, args, element='child') |
|
337 | return showlist('children', childrevs, args, element='child') | |
326 |
|
338 | |||
327 | # Deprecated, but kept alive for help generation a purpose. |
|
339 | # Deprecated, but kept alive for help generation a purpose. | |
328 | @templatekeyword('currentbookmark') |
|
340 | @templatekeyword('currentbookmark') | |
329 | def showcurrentbookmark(**args): |
|
341 | def showcurrentbookmark(**args): | |
330 | """String. The active bookmark, if it is |
|
342 | """String. The active bookmark, if it is | |
331 | associated with the changeset (DEPRECATED)""" |
|
343 | associated with the changeset (DEPRECATED)""" | |
332 | return showactivebookmark(**args) |
|
344 | return showactivebookmark(**args) | |
333 |
|
345 | |||
334 | @templatekeyword('activebookmark') |
|
346 | @templatekeyword('activebookmark') | |
335 | def showactivebookmark(**args): |
|
347 | def showactivebookmark(**args): | |
336 | """String. The active bookmark, if it is |
|
348 | """String. The active bookmark, if it is | |
337 | associated with the changeset""" |
|
349 | associated with the changeset""" | |
338 | active = args[r'repo']._activebookmark |
|
350 | active = args[r'repo']._activebookmark | |
339 | if active and active in args[r'ctx'].bookmarks(): |
|
351 | if active and active in args[r'ctx'].bookmarks(): | |
340 | return active |
|
352 | return active | |
341 | return '' |
|
353 | return '' | |
342 |
|
354 | |||
343 | @templatekeyword('date') |
|
355 | @templatekeyword('date') | |
344 | def showdate(repo, ctx, templ, **args): |
|
356 | def showdate(repo, ctx, templ, **args): | |
345 | """Date information. The date when the changeset was committed.""" |
|
357 | """Date information. The date when the changeset was committed.""" | |
346 | return ctx.date() |
|
358 | return ctx.date() | |
347 |
|
359 | |||
348 | @templatekeyword('desc') |
|
360 | @templatekeyword('desc') | |
349 | def showdescription(repo, ctx, templ, **args): |
|
361 | def showdescription(repo, ctx, templ, **args): | |
350 | """String. The text of the changeset description.""" |
|
362 | """String. The text of the changeset description.""" | |
351 | s = ctx.description() |
|
363 | s = ctx.description() | |
352 | if isinstance(s, encoding.localstr): |
|
364 | if isinstance(s, encoding.localstr): | |
353 | # try hard to preserve utf-8 bytes |
|
365 | # try hard to preserve utf-8 bytes | |
354 | return encoding.tolocal(encoding.fromlocal(s).strip()) |
|
366 | return encoding.tolocal(encoding.fromlocal(s).strip()) | |
355 | else: |
|
367 | else: | |
356 | return s.strip() |
|
368 | return s.strip() | |
357 |
|
369 | |||
358 | @templatekeyword('diffstat') |
|
370 | @templatekeyword('diffstat') | |
359 | def showdiffstat(repo, ctx, templ, **args): |
|
371 | def showdiffstat(repo, ctx, templ, **args): | |
360 | """String. Statistics of changes with the following format: |
|
372 | """String. Statistics of changes with the following format: | |
361 | "modified files: +added/-removed lines" |
|
373 | "modified files: +added/-removed lines" | |
362 | """ |
|
374 | """ | |
363 | stats = patch.diffstatdata(util.iterlines(ctx.diff(noprefix=False))) |
|
375 | stats = patch.diffstatdata(util.iterlines(ctx.diff(noprefix=False))) | |
364 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) |
|
376 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) | |
365 | return '%s: +%s/-%s' % (len(stats), adds, removes) |
|
377 | return '%s: +%s/-%s' % (len(stats), adds, removes) | |
366 |
|
378 | |||
367 | @templatekeyword('envvars') |
|
379 | @templatekeyword('envvars') | |
368 | def showenvvars(repo, **args): |
|
380 | def showenvvars(repo, **args): | |
369 | """A dictionary of environment variables. (EXPERIMENTAL)""" |
|
381 | """A dictionary of environment variables. (EXPERIMENTAL)""" | |
370 | args = pycompat.byteskwargs(args) |
|
382 | args = pycompat.byteskwargs(args) | |
371 | env = repo.ui.exportableenviron() |
|
383 | env = repo.ui.exportableenviron() | |
372 | env = util.sortdict((k, env[k]) for k in sorted(env)) |
|
384 | env = util.sortdict((k, env[k]) for k in sorted(env)) | |
373 | return showdict('envvar', env, args, plural='envvars') |
|
385 | return showdict('envvar', env, args, plural='envvars') | |
374 |
|
386 | |||
375 | @templatekeyword('extras') |
|
387 | @templatekeyword('extras') | |
376 | def showextras(**args): |
|
388 | def showextras(**args): | |
377 | """List of dicts with key, value entries of the 'extras' |
|
389 | """List of dicts with key, value entries of the 'extras' | |
378 | field of this changeset.""" |
|
390 | field of this changeset.""" | |
379 | args = pycompat.byteskwargs(args) |
|
391 | args = pycompat.byteskwargs(args) | |
380 | extras = args['ctx'].extra() |
|
392 | extras = args['ctx'].extra() | |
381 | extras = util.sortdict((k, extras[k]) for k in sorted(extras)) |
|
393 | extras = util.sortdict((k, extras[k]) for k in sorted(extras)) | |
382 | makemap = lambda k: {'key': k, 'value': extras[k]} |
|
394 | makemap = lambda k: {'key': k, 'value': extras[k]} | |
383 | c = [makemap(k) for k in extras] |
|
395 | c = [makemap(k) for k in extras] | |
384 | f = _showlist('extra', c, args, plural='extras') |
|
396 | f = _showlist('extra', c, args, plural='extras') | |
385 | return _hybrid(f, extras, makemap, |
|
397 | return _hybrid(f, extras, makemap, | |
386 | lambda x: '%s=%s' % (x['key'], util.escapestr(x['value']))) |
|
398 | lambda x: '%s=%s' % (x['key'], util.escapestr(x['value']))) | |
387 |
|
399 | |||
388 | @templatekeyword('file_adds') |
|
400 | @templatekeyword('file_adds') | |
389 | def showfileadds(**args): |
|
401 | def showfileadds(**args): | |
390 | """List of strings. Files added by this changeset.""" |
|
402 | """List of strings. Files added by this changeset.""" | |
391 | args = pycompat.byteskwargs(args) |
|
403 | args = pycompat.byteskwargs(args) | |
392 | repo, ctx, revcache = args['repo'], args['ctx'], args['revcache'] |
|
404 | repo, ctx, revcache = args['repo'], args['ctx'], args['revcache'] | |
393 | return showlist('file_add', getfiles(repo, ctx, revcache)[1], args, |
|
405 | return showlist('file_add', getfiles(repo, ctx, revcache)[1], args, | |
394 | element='file') |
|
406 | element='file') | |
395 |
|
407 | |||
396 | @templatekeyword('file_copies') |
|
408 | @templatekeyword('file_copies') | |
397 | def showfilecopies(**args): |
|
409 | def showfilecopies(**args): | |
398 | """List of strings. Files copied in this changeset with |
|
410 | """List of strings. Files copied in this changeset with | |
399 | their sources. |
|
411 | their sources. | |
400 | """ |
|
412 | """ | |
401 | args = pycompat.byteskwargs(args) |
|
413 | args = pycompat.byteskwargs(args) | |
402 | cache, ctx = args['cache'], args['ctx'] |
|
414 | cache, ctx = args['cache'], args['ctx'] | |
403 | copies = args['revcache'].get('copies') |
|
415 | copies = args['revcache'].get('copies') | |
404 | if copies is None: |
|
416 | if copies is None: | |
405 | if 'getrenamed' not in cache: |
|
417 | if 'getrenamed' not in cache: | |
406 | cache['getrenamed'] = getrenamedfn(args['repo']) |
|
418 | cache['getrenamed'] = getrenamedfn(args['repo']) | |
407 | copies = [] |
|
419 | copies = [] | |
408 | getrenamed = cache['getrenamed'] |
|
420 | getrenamed = cache['getrenamed'] | |
409 | for fn in ctx.files(): |
|
421 | for fn in ctx.files(): | |
410 | rename = getrenamed(fn, ctx.rev()) |
|
422 | rename = getrenamed(fn, ctx.rev()) | |
411 | if rename: |
|
423 | if rename: | |
412 | copies.append((fn, rename[0])) |
|
424 | copies.append((fn, rename[0])) | |
413 |
|
425 | |||
414 | copies = util.sortdict(copies) |
|
426 | copies = util.sortdict(copies) | |
415 | return showdict('file_copy', copies, args, plural='file_copies', |
|
427 | return showdict('file_copy', copies, args, plural='file_copies', | |
416 | key='name', value='source', fmt='%s (%s)') |
|
428 | key='name', value='source', fmt='%s (%s)') | |
417 |
|
429 | |||
418 | # showfilecopiesswitch() displays file copies only if copy records are |
|
430 | # showfilecopiesswitch() displays file copies only if copy records are | |
419 | # provided before calling the templater, usually with a --copies |
|
431 | # provided before calling the templater, usually with a --copies | |
420 | # command line switch. |
|
432 | # command line switch. | |
421 | @templatekeyword('file_copies_switch') |
|
433 | @templatekeyword('file_copies_switch') | |
422 | def showfilecopiesswitch(**args): |
|
434 | def showfilecopiesswitch(**args): | |
423 | """List of strings. Like "file_copies" but displayed |
|
435 | """List of strings. Like "file_copies" but displayed | |
424 | only if the --copied switch is set. |
|
436 | only if the --copied switch is set. | |
425 | """ |
|
437 | """ | |
426 | args = pycompat.byteskwargs(args) |
|
438 | args = pycompat.byteskwargs(args) | |
427 | copies = args['revcache'].get('copies') or [] |
|
439 | copies = args['revcache'].get('copies') or [] | |
428 | copies = util.sortdict(copies) |
|
440 | copies = util.sortdict(copies) | |
429 | return showdict('file_copy', copies, args, plural='file_copies', |
|
441 | return showdict('file_copy', copies, args, plural='file_copies', | |
430 | key='name', value='source', fmt='%s (%s)') |
|
442 | key='name', value='source', fmt='%s (%s)') | |
431 |
|
443 | |||
432 | @templatekeyword('file_dels') |
|
444 | @templatekeyword('file_dels') | |
433 | def showfiledels(**args): |
|
445 | def showfiledels(**args): | |
434 | """List of strings. Files removed by this changeset.""" |
|
446 | """List of strings. Files removed by this changeset.""" | |
435 | args = pycompat.byteskwargs(args) |
|
447 | args = pycompat.byteskwargs(args) | |
436 | repo, ctx, revcache = args['repo'], args['ctx'], args['revcache'] |
|
448 | repo, ctx, revcache = args['repo'], args['ctx'], args['revcache'] | |
437 | return showlist('file_del', getfiles(repo, ctx, revcache)[2], args, |
|
449 | return showlist('file_del', getfiles(repo, ctx, revcache)[2], args, | |
438 | element='file') |
|
450 | element='file') | |
439 |
|
451 | |||
440 | @templatekeyword('file_mods') |
|
452 | @templatekeyword('file_mods') | |
441 | def showfilemods(**args): |
|
453 | def showfilemods(**args): | |
442 | """List of strings. Files modified by this changeset.""" |
|
454 | """List of strings. Files modified by this changeset.""" | |
443 | args = pycompat.byteskwargs(args) |
|
455 | args = pycompat.byteskwargs(args) | |
444 | repo, ctx, revcache = args['repo'], args['ctx'], args['revcache'] |
|
456 | repo, ctx, revcache = args['repo'], args['ctx'], args['revcache'] | |
445 | return showlist('file_mod', getfiles(repo, ctx, revcache)[0], args, |
|
457 | return showlist('file_mod', getfiles(repo, ctx, revcache)[0], args, | |
446 | element='file') |
|
458 | element='file') | |
447 |
|
459 | |||
448 | @templatekeyword('files') |
|
460 | @templatekeyword('files') | |
449 | def showfiles(**args): |
|
461 | def showfiles(**args): | |
450 | """List of strings. All files modified, added, or removed by this |
|
462 | """List of strings. All files modified, added, or removed by this | |
451 | changeset. |
|
463 | changeset. | |
452 | """ |
|
464 | """ | |
453 | args = pycompat.byteskwargs(args) |
|
465 | args = pycompat.byteskwargs(args) | |
454 | return showlist('file', args['ctx'].files(), args) |
|
466 | return showlist('file', args['ctx'].files(), args) | |
455 |
|
467 | |||
456 | @templatekeyword('graphnode') |
|
468 | @templatekeyword('graphnode') | |
457 | def showgraphnode(repo, ctx, **args): |
|
469 | def showgraphnode(repo, ctx, **args): | |
458 | """String. The character representing the changeset node in |
|
470 | """String. The character representing the changeset node in | |
459 | an ASCII revision graph""" |
|
471 | an ASCII revision graph""" | |
460 | wpnodes = repo.dirstate.parents() |
|
472 | wpnodes = repo.dirstate.parents() | |
461 | if wpnodes[1] == nullid: |
|
473 | if wpnodes[1] == nullid: | |
462 | wpnodes = wpnodes[:1] |
|
474 | wpnodes = wpnodes[:1] | |
463 | if ctx.node() in wpnodes: |
|
475 | if ctx.node() in wpnodes: | |
464 | return '@' |
|
476 | return '@' | |
465 | elif ctx.obsolete(): |
|
477 | elif ctx.obsolete(): | |
466 | return 'x' |
|
478 | return 'x' | |
467 | elif ctx.closesbranch(): |
|
479 | elif ctx.closesbranch(): | |
468 | return '_' |
|
480 | return '_' | |
469 | else: |
|
481 | else: | |
470 | return 'o' |
|
482 | return 'o' | |
471 |
|
483 | |||
472 | @templatekeyword('index') |
|
484 | @templatekeyword('index') | |
473 | def showindex(**args): |
|
485 | def showindex(**args): | |
474 | """Integer. The current iteration of the loop. (0 indexed)""" |
|
486 | """Integer. The current iteration of the loop. (0 indexed)""" | |
475 | # just hosts documentation; should be overridden by template mapping |
|
487 | # just hosts documentation; should be overridden by template mapping | |
476 | raise error.Abort(_("can't use index in this context")) |
|
488 | raise error.Abort(_("can't use index in this context")) | |
477 |
|
489 | |||
478 | @templatekeyword('latesttag') |
|
490 | @templatekeyword('latesttag') | |
479 | def showlatesttag(**args): |
|
491 | def showlatesttag(**args): | |
480 | """List of strings. The global tags on the most recent globally |
|
492 | """List of strings. The global tags on the most recent globally | |
481 | tagged ancestor of this changeset. If no such tags exist, the list |
|
493 | tagged ancestor of this changeset. If no such tags exist, the list | |
482 | consists of the single string "null". |
|
494 | consists of the single string "null". | |
483 | """ |
|
495 | """ | |
484 | return showlatesttags(None, **args) |
|
496 | return showlatesttags(None, **args) | |
485 |
|
497 | |||
486 | def showlatesttags(pattern, **args): |
|
498 | def showlatesttags(pattern, **args): | |
487 | """helper method for the latesttag keyword and function""" |
|
499 | """helper method for the latesttag keyword and function""" | |
488 | args = pycompat.byteskwargs(args) |
|
500 | args = pycompat.byteskwargs(args) | |
489 | repo, ctx = args['repo'], args['ctx'] |
|
501 | repo, ctx = args['repo'], args['ctx'] | |
490 | cache = args['cache'] |
|
502 | cache = args['cache'] | |
491 | latesttags = getlatesttags(repo, ctx, cache, pattern) |
|
503 | latesttags = getlatesttags(repo, ctx, cache, pattern) | |
492 |
|
504 | |||
493 | # latesttag[0] is an implementation detail for sorting csets on different |
|
505 | # latesttag[0] is an implementation detail for sorting csets on different | |
494 | # branches in a stable manner- it is the date the tagged cset was created, |
|
506 | # branches in a stable manner- it is the date the tagged cset was created, | |
495 | # not the date the tag was created. Therefore it isn't made visible here. |
|
507 | # not the date the tag was created. Therefore it isn't made visible here. | |
496 | makemap = lambda v: { |
|
508 | makemap = lambda v: { | |
497 | 'changes': _showchangessincetag, |
|
509 | 'changes': _showchangessincetag, | |
498 | 'distance': latesttags[1], |
|
510 | 'distance': latesttags[1], | |
499 | 'latesttag': v, # BC with {latesttag % '{latesttag}'} |
|
511 | 'latesttag': v, # BC with {latesttag % '{latesttag}'} | |
500 | 'tag': v |
|
512 | 'tag': v | |
501 | } |
|
513 | } | |
502 |
|
514 | |||
503 | tags = latesttags[2] |
|
515 | tags = latesttags[2] | |
504 | f = _showlist('latesttag', tags, args, separator=':') |
|
516 | f = _showlist('latesttag', tags, args, separator=':') | |
505 | return _hybrid(f, tags, makemap, lambda x: x['latesttag']) |
|
517 | return _hybrid(f, tags, makemap, lambda x: x['latesttag']) | |
506 |
|
518 | |||
507 | @templatekeyword('latesttagdistance') |
|
519 | @templatekeyword('latesttagdistance') | |
508 | def showlatesttagdistance(repo, ctx, templ, cache, **args): |
|
520 | def showlatesttagdistance(repo, ctx, templ, cache, **args): | |
509 | """Integer. Longest path to the latest tag.""" |
|
521 | """Integer. Longest path to the latest tag.""" | |
510 | return getlatesttags(repo, ctx, cache)[1] |
|
522 | return getlatesttags(repo, ctx, cache)[1] | |
511 |
|
523 | |||
512 | @templatekeyword('changessincelatesttag') |
|
524 | @templatekeyword('changessincelatesttag') | |
513 | def showchangessincelatesttag(repo, ctx, templ, cache, **args): |
|
525 | def showchangessincelatesttag(repo, ctx, templ, cache, **args): | |
514 | """Integer. All ancestors not in the latest tag.""" |
|
526 | """Integer. All ancestors not in the latest tag.""" | |
515 | latesttag = getlatesttags(repo, ctx, cache)[2][0] |
|
527 | latesttag = getlatesttags(repo, ctx, cache)[2][0] | |
516 |
|
528 | |||
517 | return _showchangessincetag(repo, ctx, tag=latesttag, **args) |
|
529 | return _showchangessincetag(repo, ctx, tag=latesttag, **args) | |
518 |
|
530 | |||
519 | def _showchangessincetag(repo, ctx, **args): |
|
531 | def _showchangessincetag(repo, ctx, **args): | |
520 | offset = 0 |
|
532 | offset = 0 | |
521 | revs = [ctx.rev()] |
|
533 | revs = [ctx.rev()] | |
522 | tag = args[r'tag'] |
|
534 | tag = args[r'tag'] | |
523 |
|
535 | |||
524 | # The only() revset doesn't currently support wdir() |
|
536 | # The only() revset doesn't currently support wdir() | |
525 | if ctx.rev() is None: |
|
537 | if ctx.rev() is None: | |
526 | offset = 1 |
|
538 | offset = 1 | |
527 | revs = [p.rev() for p in ctx.parents()] |
|
539 | revs = [p.rev() for p in ctx.parents()] | |
528 |
|
540 | |||
529 | return len(repo.revs('only(%ld, %s)', revs, tag)) + offset |
|
541 | return len(repo.revs('only(%ld, %s)', revs, tag)) + offset | |
530 |
|
542 | |||
531 | @templatekeyword('manifest') |
|
543 | @templatekeyword('manifest') | |
532 | def showmanifest(**args): |
|
544 | def showmanifest(**args): | |
533 | repo, ctx, templ = args[r'repo'], args[r'ctx'], args[r'templ'] |
|
545 | repo, ctx, templ = args[r'repo'], args[r'ctx'], args[r'templ'] | |
534 | mnode = ctx.manifestnode() |
|
546 | mnode = ctx.manifestnode() | |
535 | if mnode is None: |
|
547 | if mnode is None: | |
536 | # just avoid crash, we might want to use the 'ff...' hash in future |
|
548 | # just avoid crash, we might want to use the 'ff...' hash in future | |
537 | return |
|
549 | return | |
538 | args = args.copy() |
|
550 | args = args.copy() | |
539 | args.update({r'rev': repo.manifestlog._revlog.rev(mnode), |
|
551 | args.update({r'rev': repo.manifestlog._revlog.rev(mnode), | |
540 | r'node': hex(mnode)}) |
|
552 | r'node': hex(mnode)}) | |
541 | return templ('manifest', **args) |
|
553 | return templ('manifest', **args) | |
542 |
|
554 | |||
543 | def shownames(namespace, **args): |
|
555 | def shownames(namespace, **args): | |
544 | """helper method to generate a template keyword for a namespace""" |
|
556 | """helper method to generate a template keyword for a namespace""" | |
545 | args = pycompat.byteskwargs(args) |
|
557 | args = pycompat.byteskwargs(args) | |
546 | ctx = args['ctx'] |
|
558 | ctx = args['ctx'] | |
547 | repo = ctx.repo() |
|
559 | repo = ctx.repo() | |
548 | ns = repo.names[namespace] |
|
560 | ns = repo.names[namespace] | |
549 | names = ns.names(repo, ctx.node()) |
|
561 | names = ns.names(repo, ctx.node()) | |
550 | return showlist(ns.templatename, names, args, plural=namespace) |
|
562 | return showlist(ns.templatename, names, args, plural=namespace) | |
551 |
|
563 | |||
552 | @templatekeyword('namespaces') |
|
564 | @templatekeyword('namespaces') | |
553 | def shownamespaces(**args): |
|
565 | def shownamespaces(**args): | |
554 | """Dict of lists. Names attached to this changeset per |
|
566 | """Dict of lists. Names attached to this changeset per | |
555 | namespace.""" |
|
567 | namespace.""" | |
556 | args = pycompat.byteskwargs(args) |
|
568 | args = pycompat.byteskwargs(args) | |
557 | ctx = args['ctx'] |
|
569 | ctx = args['ctx'] | |
558 | repo = ctx.repo() |
|
570 | repo = ctx.repo() | |
559 |
|
571 | |||
560 | namespaces = util.sortdict() |
|
572 | namespaces = util.sortdict() | |
561 | colornames = {} |
|
573 | colornames = {} | |
562 | builtins = {} |
|
574 | builtins = {} | |
563 |
|
575 | |||
564 | for k, ns in repo.names.iteritems(): |
|
576 | for k, ns in repo.names.iteritems(): | |
565 | namespaces[k] = showlist('name', ns.names(repo, ctx.node()), args) |
|
577 | namespaces[k] = showlist('name', ns.names(repo, ctx.node()), args) | |
566 | colornames[k] = ns.colorname |
|
578 | colornames[k] = ns.colorname | |
567 | builtins[k] = ns.builtin |
|
579 | builtins[k] = ns.builtin | |
568 |
|
580 | |||
569 | f = _showlist('namespace', list(namespaces), args) |
|
581 | f = _showlist('namespace', list(namespaces), args) | |
570 |
|
582 | |||
571 | def makemap(ns): |
|
583 | def makemap(ns): | |
572 | return { |
|
584 | return { | |
573 | 'namespace': ns, |
|
585 | 'namespace': ns, | |
574 | 'names': namespaces[ns], |
|
586 | 'names': namespaces[ns], | |
575 | 'builtin': builtins[ns], |
|
587 | 'builtin': builtins[ns], | |
576 | 'colorname': colornames[ns], |
|
588 | 'colorname': colornames[ns], | |
577 | } |
|
589 | } | |
578 |
|
590 | |||
579 | return _hybrid(f, namespaces, makemap, lambda x: x['namespace']) |
|
591 | return _hybrid(f, namespaces, makemap, lambda x: x['namespace']) | |
580 |
|
592 | |||
581 | @templatekeyword('node') |
|
593 | @templatekeyword('node') | |
582 | def shownode(repo, ctx, templ, **args): |
|
594 | def shownode(repo, ctx, templ, **args): | |
583 | """String. The changeset identification hash, as a 40 hexadecimal |
|
595 | """String. The changeset identification hash, as a 40 hexadecimal | |
584 | digit string. |
|
596 | digit string. | |
585 | """ |
|
597 | """ | |
586 | return ctx.hex() |
|
598 | return ctx.hex() | |
587 |
|
599 | |||
588 | @templatekeyword('obsolete') |
|
600 | @templatekeyword('obsolete') | |
589 | def showobsolete(repo, ctx, templ, **args): |
|
601 | def showobsolete(repo, ctx, templ, **args): | |
590 | """String. Whether the changeset is obsolete. |
|
602 | """String. Whether the changeset is obsolete. | |
591 | """ |
|
603 | """ | |
592 | if ctx.obsolete(): |
|
604 | if ctx.obsolete(): | |
593 | return 'obsolete' |
|
605 | return 'obsolete' | |
594 | return '' |
|
606 | return '' | |
595 |
|
607 | |||
596 | @templatekeyword('peerpaths') |
|
608 | @templatekeyword('peerpaths') | |
597 | def showpeerpaths(repo, **args): |
|
609 | def showpeerpaths(repo, **args): | |
598 | """A dictionary of repository locations defined in the [paths] section |
|
610 | """A dictionary of repository locations defined in the [paths] section | |
599 | of your configuration file. (EXPERIMENTAL)""" |
|
611 | of your configuration file. (EXPERIMENTAL)""" | |
600 | # see commands.paths() for naming of dictionary keys |
|
612 | # see commands.paths() for naming of dictionary keys | |
601 | paths = util.sortdict() |
|
613 | paths = util.sortdict() | |
602 | for k, p in sorted(repo.ui.paths.iteritems()): |
|
614 | for k, p in sorted(repo.ui.paths.iteritems()): | |
603 | d = util.sortdict() |
|
615 | d = util.sortdict() | |
604 | d['url'] = p.rawloc |
|
616 | d['url'] = p.rawloc | |
605 | d.update((o, v) for o, v in sorted(p.suboptions.iteritems())) |
|
617 | d.update((o, v) for o, v in sorted(p.suboptions.iteritems())) | |
606 | def f(): |
|
618 | def f(): | |
607 | yield d['url'] |
|
619 | yield d['url'] | |
608 | paths[k] = hybriddict(d, gen=f()) |
|
620 | paths[k] = hybriddict(d, gen=f()) | |
609 |
|
621 | |||
610 | # no hybriddict() since d['path'] can't be formatted as a string. perhaps |
|
622 | # no hybriddict() since d['path'] can't be formatted as a string. perhaps | |
611 | # hybriddict() should call templatefilters.stringify(d[value]). |
|
623 | # hybriddict() should call templatefilters.stringify(d[value]). | |
612 | return _hybrid(None, paths, lambda k: {'name': k, 'path': paths[k]}, |
|
624 | return _hybrid(None, paths, lambda k: {'name': k, 'path': paths[k]}, | |
613 | lambda d: '%s=%s' % (d['name'], d['path']['url'])) |
|
625 | lambda d: '%s=%s' % (d['name'], d['path']['url'])) | |
614 |
|
626 | |||
615 | @templatekeyword("predecessors") |
|
627 | @templatekeyword("predecessors") | |
616 | def showpredecessors(repo, ctx, **args): |
|
628 | def showpredecessors(repo, ctx, **args): | |
617 | """Returns the list if the closest visible successors |
|
629 | """Returns the list if the closest visible successors | |
618 | """ |
|
630 | """ | |
619 | predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node())) |
|
631 | predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node())) | |
620 | predecessors = map(hex, predecessors) |
|
632 | predecessors = map(hex, predecessors) | |
621 |
|
633 | |||
622 | return _hybrid(None, predecessors, |
|
634 | return _hybrid(None, predecessors, | |
623 | lambda x: {'ctx': repo[x], 'revcache': {}}, |
|
635 | lambda x: {'ctx': repo[x], 'revcache': {}}, | |
624 | lambda d: _formatrevnode(d['ctx'])) |
|
636 | lambda d: _formatrevnode(d['ctx'])) | |
625 |
|
637 | |||
626 | @templatekeyword("successorssets") |
|
638 | @templatekeyword("successorssets") | |
627 | def showsuccessorssets(repo, ctx, **args): |
|
639 | def showsuccessorssets(repo, ctx, **args): | |
628 | """Returns a string of sets of successors for a changectx |
|
640 | """Returns a string of sets of successors for a changectx | |
629 |
|
641 | |||
630 | Format used is: [ctx1, ctx2], [ctx3] if ctx has been splitted into ctx1 and |
|
642 | Format used is: [ctx1, ctx2], [ctx3] if ctx has been splitted into ctx1 and | |
631 | ctx2 while also diverged into ctx3""" |
|
643 | ctx2 while also diverged into ctx3""" | |
632 | if not ctx.obsolete(): |
|
644 | if not ctx.obsolete(): | |
633 | return '' |
|
645 | return '' | |
634 | args = pycompat.byteskwargs(args) |
|
646 | args = pycompat.byteskwargs(args) | |
635 |
|
647 | |||
636 | ssets = obsutil.successorssets(repo, ctx.node(), closest=True) |
|
648 | ssets = obsutil.successorssets(repo, ctx.node(), closest=True) | |
637 | ssets = [[hex(n) for n in ss] for ss in ssets] |
|
649 | ssets = [[hex(n) for n in ss] for ss in ssets] | |
638 |
|
650 | |||
639 | data = [] |
|
651 | data = [] | |
640 | for ss in ssets: |
|
652 | for ss in ssets: | |
641 | h = _hybrid(None, ss, lambda x: {'ctx': repo[x], 'revcache': {}}, |
|
653 | h = _hybrid(None, ss, lambda x: {'ctx': repo[x], 'revcache': {}}, | |
642 | lambda d: _formatrevnode(d['ctx'])) |
|
654 | lambda d: _formatrevnode(d['ctx'])) | |
643 | data.append(h) |
|
655 | data.append(h) | |
644 |
|
656 | |||
645 | # Format the successorssets |
|
657 | # Format the successorssets | |
646 | def render(d): |
|
658 | def render(d): | |
647 | t = [] |
|
659 | t = [] | |
648 | for i in d.gen: |
|
660 | for i in d.gen: | |
649 | t.append(i) |
|
661 | t.append(i) | |
650 | return "".join(t) |
|
662 | return "".join(t) | |
651 |
|
663 | |||
652 | def gen(data): |
|
664 | def gen(data): | |
653 | yield "; ".join(render(d) for d in data) |
|
665 | yield "; ".join(render(d) for d in data) | |
654 |
|
666 | |||
655 | return _hybrid(gen(data), data, lambda x: {'successorset': x}, |
|
667 | return _hybrid(gen(data), data, lambda x: {'successorset': x}, | |
656 | lambda d: d["successorset"]) |
|
668 | lambda d: d["successorset"]) | |
657 |
|
669 | |||
658 | @templatekeyword('p1rev') |
|
670 | @templatekeyword('p1rev') | |
659 | def showp1rev(repo, ctx, templ, **args): |
|
671 | def showp1rev(repo, ctx, templ, **args): | |
660 | """Integer. The repository-local revision number of the changeset's |
|
672 | """Integer. The repository-local revision number of the changeset's | |
661 | first parent, or -1 if the changeset has no parents.""" |
|
673 | first parent, or -1 if the changeset has no parents.""" | |
662 | return ctx.p1().rev() |
|
674 | return ctx.p1().rev() | |
663 |
|
675 | |||
664 | @templatekeyword('p2rev') |
|
676 | @templatekeyword('p2rev') | |
665 | def showp2rev(repo, ctx, templ, **args): |
|
677 | def showp2rev(repo, ctx, templ, **args): | |
666 | """Integer. The repository-local revision number of the changeset's |
|
678 | """Integer. The repository-local revision number of the changeset's | |
667 | second parent, or -1 if the changeset has no second parent.""" |
|
679 | second parent, or -1 if the changeset has no second parent.""" | |
668 | return ctx.p2().rev() |
|
680 | return ctx.p2().rev() | |
669 |
|
681 | |||
670 | @templatekeyword('p1node') |
|
682 | @templatekeyword('p1node') | |
671 | def showp1node(repo, ctx, templ, **args): |
|
683 | def showp1node(repo, ctx, templ, **args): | |
672 | """String. The identification hash of the changeset's first parent, |
|
684 | """String. The identification hash of the changeset's first parent, | |
673 | as a 40 digit hexadecimal string. If the changeset has no parents, all |
|
685 | as a 40 digit hexadecimal string. If the changeset has no parents, all | |
674 | digits are 0.""" |
|
686 | digits are 0.""" | |
675 | return ctx.p1().hex() |
|
687 | return ctx.p1().hex() | |
676 |
|
688 | |||
677 | @templatekeyword('p2node') |
|
689 | @templatekeyword('p2node') | |
678 | def showp2node(repo, ctx, templ, **args): |
|
690 | def showp2node(repo, ctx, templ, **args): | |
679 | """String. The identification hash of the changeset's second |
|
691 | """String. The identification hash of the changeset's second | |
680 | parent, as a 40 digit hexadecimal string. If the changeset has no second |
|
692 | parent, as a 40 digit hexadecimal string. If the changeset has no second | |
681 | parent, all digits are 0.""" |
|
693 | parent, all digits are 0.""" | |
682 | return ctx.p2().hex() |
|
694 | return ctx.p2().hex() | |
683 |
|
695 | |||
684 | @templatekeyword('parents') |
|
696 | @templatekeyword('parents') | |
685 | def showparents(**args): |
|
697 | def showparents(**args): | |
686 | """List of strings. The parents of the changeset in "rev:node" |
|
698 | """List of strings. The parents of the changeset in "rev:node" | |
687 | format. If the changeset has only one "natural" parent (the predecessor |
|
699 | format. If the changeset has only one "natural" parent (the predecessor | |
688 | revision) nothing is shown.""" |
|
700 | revision) nothing is shown.""" | |
689 | args = pycompat.byteskwargs(args) |
|
701 | args = pycompat.byteskwargs(args) | |
690 | repo = args['repo'] |
|
702 | repo = args['repo'] | |
691 | ctx = args['ctx'] |
|
703 | ctx = args['ctx'] | |
692 | pctxs = scmutil.meaningfulparents(repo, ctx) |
|
704 | pctxs = scmutil.meaningfulparents(repo, ctx) | |
693 | # ifcontains() needs a list of str |
|
705 | # ifcontains() needs a list of str | |
694 | prevs = ["%d" % p.rev() for p in pctxs] |
|
706 | prevs = ["%d" % p.rev() for p in pctxs] | |
695 | parents = [[('rev', p.rev()), |
|
707 | parents = [[('rev', p.rev()), | |
696 | ('node', p.hex()), |
|
708 | ('node', p.hex()), | |
697 | ('phase', p.phasestr())] |
|
709 | ('phase', p.phasestr())] | |
698 | for p in pctxs] |
|
710 | for p in pctxs] | |
699 | f = _showlist('parent', parents, args) |
|
711 | f = _showlist('parent', parents, args) | |
700 | return _hybrid(f, prevs, lambda x: {'ctx': repo[int(x)], 'revcache': {}}, |
|
712 | return _hybrid(f, prevs, lambda x: {'ctx': repo[int(x)], 'revcache': {}}, | |
701 | lambda d: _formatrevnode(d['ctx'])) |
|
713 | lambda d: _formatrevnode(d['ctx'])) | |
702 |
|
714 | |||
703 | @templatekeyword('phase') |
|
715 | @templatekeyword('phase') | |
704 | def showphase(repo, ctx, templ, **args): |
|
716 | def showphase(repo, ctx, templ, **args): | |
705 | """String. The changeset phase name.""" |
|
717 | """String. The changeset phase name.""" | |
706 | return ctx.phasestr() |
|
718 | return ctx.phasestr() | |
707 |
|
719 | |||
708 | @templatekeyword('phaseidx') |
|
720 | @templatekeyword('phaseidx') | |
709 | def showphaseidx(repo, ctx, templ, **args): |
|
721 | def showphaseidx(repo, ctx, templ, **args): | |
710 | """Integer. The changeset phase index.""" |
|
722 | """Integer. The changeset phase index.""" | |
711 | return ctx.phase() |
|
723 | return ctx.phase() | |
712 |
|
724 | |||
713 | @templatekeyword('rev') |
|
725 | @templatekeyword('rev') | |
714 | def showrev(repo, ctx, templ, **args): |
|
726 | def showrev(repo, ctx, templ, **args): | |
715 | """Integer. The repository-local changeset revision number.""" |
|
727 | """Integer. The repository-local changeset revision number.""" | |
716 | return scmutil.intrev(ctx) |
|
728 | return scmutil.intrev(ctx) | |
717 |
|
729 | |||
718 | def showrevslist(name, revs, **args): |
|
730 | def showrevslist(name, revs, **args): | |
719 | """helper to generate a list of revisions in which a mapped template will |
|
731 | """helper to generate a list of revisions in which a mapped template will | |
720 | be evaluated""" |
|
732 | be evaluated""" | |
721 | args = pycompat.byteskwargs(args) |
|
733 | args = pycompat.byteskwargs(args) | |
722 | repo = args['ctx'].repo() |
|
734 | repo = args['ctx'].repo() | |
723 | # ifcontains() needs a list of str |
|
735 | # ifcontains() needs a list of str | |
724 | revs = ["%d" % r for r in revs] |
|
736 | revs = ["%d" % r for r in revs] | |
725 | f = _showlist(name, revs, args) |
|
737 | f = _showlist(name, revs, args) | |
726 | return _hybrid(f, revs, |
|
738 | return _hybrid(f, revs, | |
727 | lambda x: {name: x, 'ctx': repo[int(x)], 'revcache': {}}, |
|
739 | lambda x: {name: x, 'ctx': repo[int(x)], 'revcache': {}}, | |
728 | lambda d: d[name]) |
|
740 | lambda d: d[name]) | |
729 |
|
741 | |||
730 | @templatekeyword('subrepos') |
|
742 | @templatekeyword('subrepos') | |
731 | def showsubrepos(**args): |
|
743 | def showsubrepos(**args): | |
732 | """List of strings. Updated subrepositories in the changeset.""" |
|
744 | """List of strings. Updated subrepositories in the changeset.""" | |
733 | args = pycompat.byteskwargs(args) |
|
745 | args = pycompat.byteskwargs(args) | |
734 | ctx = args['ctx'] |
|
746 | ctx = args['ctx'] | |
735 | substate = ctx.substate |
|
747 | substate = ctx.substate | |
736 | if not substate: |
|
748 | if not substate: | |
737 | return showlist('subrepo', [], args) |
|
749 | return showlist('subrepo', [], args) | |
738 | psubstate = ctx.parents()[0].substate or {} |
|
750 | psubstate = ctx.parents()[0].substate or {} | |
739 | subrepos = [] |
|
751 | subrepos = [] | |
740 | for sub in substate: |
|
752 | for sub in substate: | |
741 | if sub not in psubstate or substate[sub] != psubstate[sub]: |
|
753 | if sub not in psubstate or substate[sub] != psubstate[sub]: | |
742 | subrepos.append(sub) # modified or newly added in ctx |
|
754 | subrepos.append(sub) # modified or newly added in ctx | |
743 | for sub in psubstate: |
|
755 | for sub in psubstate: | |
744 | if sub not in substate: |
|
756 | if sub not in substate: | |
745 | subrepos.append(sub) # removed in ctx |
|
757 | subrepos.append(sub) # removed in ctx | |
746 | return showlist('subrepo', sorted(subrepos), args) |
|
758 | return showlist('subrepo', sorted(subrepos), args) | |
747 |
|
759 | |||
748 | # don't remove "showtags" definition, even though namespaces will put |
|
760 | # don't remove "showtags" definition, even though namespaces will put | |
749 | # a helper function for "tags" keyword into "keywords" map automatically, |
|
761 | # a helper function for "tags" keyword into "keywords" map automatically, | |
750 | # because online help text is built without namespaces initialization |
|
762 | # because online help text is built without namespaces initialization | |
751 | @templatekeyword('tags') |
|
763 | @templatekeyword('tags') | |
752 | def showtags(**args): |
|
764 | def showtags(**args): | |
753 | """List of strings. Any tags associated with the changeset.""" |
|
765 | """List of strings. Any tags associated with the changeset.""" | |
754 | return shownames('tags', **args) |
|
766 | return shownames('tags', **args) | |
755 |
|
767 | |||
756 | def loadkeyword(ui, extname, registrarobj): |
|
768 | def loadkeyword(ui, extname, registrarobj): | |
757 | """Load template keyword from specified registrarobj |
|
769 | """Load template keyword from specified registrarobj | |
758 | """ |
|
770 | """ | |
759 | for name, func in registrarobj._table.iteritems(): |
|
771 | for name, func in registrarobj._table.iteritems(): | |
760 | keywords[name] = func |
|
772 | keywords[name] = func | |
761 |
|
773 | |||
762 | @templatekeyword('termwidth') |
|
774 | @templatekeyword('termwidth') | |
763 | def termwidth(repo, ctx, templ, **args): |
|
775 | def termwidth(repo, ctx, templ, **args): | |
764 | """Integer. The width of the current terminal.""" |
|
776 | """Integer. The width of the current terminal.""" | |
765 | return repo.ui.termwidth() |
|
777 | return repo.ui.termwidth() | |
766 |
|
778 | |||
767 | @templatekeyword('troubles') |
|
779 | @templatekeyword('troubles') | |
768 | def showtroubles(**args): |
|
780 | def showtroubles(**args): | |
769 | """List of strings. Evolution troubles affecting the changeset. |
|
781 | """List of strings. Evolution troubles affecting the changeset. | |
770 |
|
782 | |||
771 | (EXPERIMENTAL) |
|
783 | (EXPERIMENTAL) | |
772 | """ |
|
784 | """ | |
773 | args = pycompat.byteskwargs(args) |
|
785 | args = pycompat.byteskwargs(args) | |
774 | return showlist('trouble', args['ctx'].troubles(), args) |
|
786 | return showlist('trouble', args['ctx'].troubles(), args) | |
775 |
|
787 | |||
776 | # tell hggettext to extract docstrings from these functions: |
|
788 | # tell hggettext to extract docstrings from these functions: | |
777 | i18nfunctions = keywords.values() |
|
789 | i18nfunctions = keywords.values() |
@@ -1,4384 +1,4418 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 | Test arithmetic operators have the right precedence: |
|
32 | Test arithmetic operators have the right precedence: | |
33 |
|
33 | |||
34 | $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' |
|
34 | $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' | |
35 | 2020 1964 |
|
35 | 2020 1964 | |
36 | $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' |
|
36 | $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' | |
37 | 9860 5908 |
|
37 | 9860 5908 | |
38 |
|
38 | |||
39 | Test division: |
|
39 | Test division: | |
40 |
|
40 | |||
41 | $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n' |
|
41 | $ hg debugtemplate -r0 -v '{5 / 2} {mod(5, 2)}\n' | |
42 | (template |
|
42 | (template | |
43 | (/ |
|
43 | (/ | |
44 | ('integer', '5') |
|
44 | ('integer', '5') | |
45 | ('integer', '2')) |
|
45 | ('integer', '2')) | |
46 | ('string', ' ') |
|
46 | ('string', ' ') | |
47 | (func |
|
47 | (func | |
48 | ('symbol', 'mod') |
|
48 | ('symbol', 'mod') | |
49 | (list |
|
49 | (list | |
50 | ('integer', '5') |
|
50 | ('integer', '5') | |
51 | ('integer', '2'))) |
|
51 | ('integer', '2'))) | |
52 | ('string', '\n')) |
|
52 | ('string', '\n')) | |
53 | 2 1 |
|
53 | 2 1 | |
54 | $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n' |
|
54 | $ hg debugtemplate -r0 -v '{5 / -2} {mod(5, -2)}\n' | |
55 | (template |
|
55 | (template | |
56 | (/ |
|
56 | (/ | |
57 | ('integer', '5') |
|
57 | ('integer', '5') | |
58 | (negate |
|
58 | (negate | |
59 | ('integer', '2'))) |
|
59 | ('integer', '2'))) | |
60 | ('string', ' ') |
|
60 | ('string', ' ') | |
61 | (func |
|
61 | (func | |
62 | ('symbol', 'mod') |
|
62 | ('symbol', 'mod') | |
63 | (list |
|
63 | (list | |
64 | ('integer', '5') |
|
64 | ('integer', '5') | |
65 | (negate |
|
65 | (negate | |
66 | ('integer', '2')))) |
|
66 | ('integer', '2')))) | |
67 | ('string', '\n')) |
|
67 | ('string', '\n')) | |
68 | -3 -1 |
|
68 | -3 -1 | |
69 | $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n' |
|
69 | $ hg debugtemplate -r0 -v '{-5 / 2} {mod(-5, 2)}\n' | |
70 | (template |
|
70 | (template | |
71 | (/ |
|
71 | (/ | |
72 | (negate |
|
72 | (negate | |
73 | ('integer', '5')) |
|
73 | ('integer', '5')) | |
74 | ('integer', '2')) |
|
74 | ('integer', '2')) | |
75 | ('string', ' ') |
|
75 | ('string', ' ') | |
76 | (func |
|
76 | (func | |
77 | ('symbol', 'mod') |
|
77 | ('symbol', 'mod') | |
78 | (list |
|
78 | (list | |
79 | (negate |
|
79 | (negate | |
80 | ('integer', '5')) |
|
80 | ('integer', '5')) | |
81 | ('integer', '2'))) |
|
81 | ('integer', '2'))) | |
82 | ('string', '\n')) |
|
82 | ('string', '\n')) | |
83 | -3 1 |
|
83 | -3 1 | |
84 | $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n' |
|
84 | $ hg debugtemplate -r0 -v '{-5 / -2} {mod(-5, -2)}\n' | |
85 | (template |
|
85 | (template | |
86 | (/ |
|
86 | (/ | |
87 | (negate |
|
87 | (negate | |
88 | ('integer', '5')) |
|
88 | ('integer', '5')) | |
89 | (negate |
|
89 | (negate | |
90 | ('integer', '2'))) |
|
90 | ('integer', '2'))) | |
91 | ('string', ' ') |
|
91 | ('string', ' ') | |
92 | (func |
|
92 | (func | |
93 | ('symbol', 'mod') |
|
93 | ('symbol', 'mod') | |
94 | (list |
|
94 | (list | |
95 | (negate |
|
95 | (negate | |
96 | ('integer', '5')) |
|
96 | ('integer', '5')) | |
97 | (negate |
|
97 | (negate | |
98 | ('integer', '2')))) |
|
98 | ('integer', '2')))) | |
99 | ('string', '\n')) |
|
99 | ('string', '\n')) | |
100 | 2 -1 |
|
100 | 2 -1 | |
101 |
|
101 | |||
102 | Filters bind closer than arithmetic: |
|
102 | Filters bind closer than arithmetic: | |
103 |
|
103 | |||
104 | $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n' |
|
104 | $ hg debugtemplate -r0 -v '{revset(".")|count - 1}\n' | |
105 | (template |
|
105 | (template | |
106 | (- |
|
106 | (- | |
107 | (| |
|
107 | (| | |
108 | (func |
|
108 | (func | |
109 | ('symbol', 'revset') |
|
109 | ('symbol', 'revset') | |
110 | ('string', '.')) |
|
110 | ('string', '.')) | |
111 | ('symbol', 'count')) |
|
111 | ('symbol', 'count')) | |
112 | ('integer', '1')) |
|
112 | ('integer', '1')) | |
113 | ('string', '\n')) |
|
113 | ('string', '\n')) | |
114 | 0 |
|
114 | 0 | |
115 |
|
115 | |||
116 | But negate binds closer still: |
|
116 | But negate binds closer still: | |
117 |
|
117 | |||
118 | $ hg debugtemplate -r0 -v '{1-3|stringify}\n' |
|
118 | $ hg debugtemplate -r0 -v '{1-3|stringify}\n' | |
119 | (template |
|
119 | (template | |
120 | (- |
|
120 | (- | |
121 | ('integer', '1') |
|
121 | ('integer', '1') | |
122 | (| |
|
122 | (| | |
123 | ('integer', '3') |
|
123 | ('integer', '3') | |
124 | ('symbol', 'stringify'))) |
|
124 | ('symbol', 'stringify'))) | |
125 | ('string', '\n')) |
|
125 | ('string', '\n')) | |
126 | hg: parse error: arithmetic only defined on integers |
|
126 | hg: parse error: arithmetic only defined on integers | |
127 | [255] |
|
127 | [255] | |
128 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' |
|
128 | $ hg debugtemplate -r0 -v '{-3|stringify}\n' | |
129 | (template |
|
129 | (template | |
130 | (| |
|
130 | (| | |
131 | (negate |
|
131 | (negate | |
132 | ('integer', '3')) |
|
132 | ('integer', '3')) | |
133 | ('symbol', 'stringify')) |
|
133 | ('symbol', 'stringify')) | |
134 | ('string', '\n')) |
|
134 | ('string', '\n')) | |
135 | -3 |
|
135 | -3 | |
136 |
|
136 | |||
137 | Keyword arguments: |
|
137 | Keyword arguments: | |
138 |
|
138 | |||
139 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' |
|
139 | $ hg debugtemplate -r0 -v '{foo=bar|baz}' | |
140 | (template |
|
140 | (template | |
141 | (keyvalue |
|
141 | (keyvalue | |
142 | ('symbol', 'foo') |
|
142 | ('symbol', 'foo') | |
143 | (| |
|
143 | (| | |
144 | ('symbol', 'bar') |
|
144 | ('symbol', 'bar') | |
145 | ('symbol', 'baz')))) |
|
145 | ('symbol', 'baz')))) | |
146 | hg: parse error: can't use a key-value pair in this context |
|
146 | hg: parse error: can't use a key-value pair in this context | |
147 | [255] |
|
147 | [255] | |
148 |
|
148 | |||
149 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' |
|
149 | $ hg debugtemplate '{pad("foo", width=10, left=true)}\n' | |
150 | foo |
|
150 | foo | |
151 |
|
151 | |||
152 | Call function which takes named arguments by filter syntax: |
|
152 | Call function which takes named arguments by filter syntax: | |
153 |
|
153 | |||
154 | $ hg debugtemplate '{" "|separate}' |
|
154 | $ hg debugtemplate '{" "|separate}' | |
155 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' |
|
155 | $ hg debugtemplate '{("not", "an", "argument", "list")|separate}' | |
156 | hg: parse error: unknown method 'list' |
|
156 | hg: parse error: unknown method 'list' | |
157 | [255] |
|
157 | [255] | |
158 |
|
158 | |||
159 | Second branch starting at nullrev: |
|
159 | Second branch starting at nullrev: | |
160 |
|
160 | |||
161 | $ hg update null |
|
161 | $ hg update null | |
162 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
162 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
163 | $ echo second > second |
|
163 | $ echo second > second | |
164 | $ hg add second |
|
164 | $ hg add second | |
165 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' |
|
165 | $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>' | |
166 | created new head |
|
166 | created new head | |
167 |
|
167 | |||
168 | $ echo third > third |
|
168 | $ echo third > third | |
169 | $ hg add third |
|
169 | $ hg add third | |
170 | $ hg mv second fourth |
|
170 | $ hg mv second fourth | |
171 | $ hg commit -m third -d "2020-01-01 10:01" |
|
171 | $ hg commit -m third -d "2020-01-01 10:01" | |
172 |
|
172 | |||
173 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . |
|
173 | $ hg log --template '{join(file_copies, ",\n")}\n' -r . | |
174 | fourth (second) |
|
174 | fourth (second) | |
175 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . |
|
175 | $ hg log -T '{file_copies % "{source} -> {name}\n"}' -r . | |
176 | second -> fourth |
|
176 | second -> fourth | |
177 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 |
|
177 | $ hg log -T '{rev} {ifcontains("fourth", file_copies, "t", "f")}\n' -r .:7 | |
178 | 8 t |
|
178 | 8 t | |
179 | 7 f |
|
179 | 7 f | |
180 |
|
180 | |||
181 | Working-directory revision has special identifiers, though they are still |
|
181 | Working-directory revision has special identifiers, though they are still | |
182 | experimental: |
|
182 | experimental: | |
183 |
|
183 | |||
184 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' |
|
184 | $ hg log -r 'wdir()' -T '{rev}:{node}\n' | |
185 | 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
185 | 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
186 |
|
186 | |||
187 | Some keywords are invalid for working-directory revision, but they should |
|
187 | Some keywords are invalid for working-directory revision, but they should | |
188 | never cause crash: |
|
188 | never cause crash: | |
189 |
|
189 | |||
190 | $ hg log -r 'wdir()' -T '{manifest}\n' |
|
190 | $ hg log -r 'wdir()' -T '{manifest}\n' | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | Quoting for ui.logtemplate |
|
193 | Quoting for ui.logtemplate | |
194 |
|
194 | |||
195 | $ hg tip --config "ui.logtemplate={rev}\n" |
|
195 | $ hg tip --config "ui.logtemplate={rev}\n" | |
196 | 8 |
|
196 | 8 | |
197 | $ hg tip --config "ui.logtemplate='{rev}\n'" |
|
197 | $ hg tip --config "ui.logtemplate='{rev}\n'" | |
198 | 8 |
|
198 | 8 | |
199 | $ hg tip --config 'ui.logtemplate="{rev}\n"' |
|
199 | $ hg tip --config 'ui.logtemplate="{rev}\n"' | |
200 | 8 |
|
200 | 8 | |
201 | $ hg tip --config 'ui.logtemplate=n{rev}\n' |
|
201 | $ hg tip --config 'ui.logtemplate=n{rev}\n' | |
202 | n8 |
|
202 | n8 | |
203 |
|
203 | |||
204 | Make sure user/global hgrc does not affect tests |
|
204 | Make sure user/global hgrc does not affect tests | |
205 |
|
205 | |||
206 | $ echo '[ui]' > .hg/hgrc |
|
206 | $ echo '[ui]' > .hg/hgrc | |
207 | $ echo 'logtemplate =' >> .hg/hgrc |
|
207 | $ echo 'logtemplate =' >> .hg/hgrc | |
208 | $ echo 'style =' >> .hg/hgrc |
|
208 | $ echo 'style =' >> .hg/hgrc | |
209 |
|
209 | |||
210 | Add some simple styles to settings |
|
210 | Add some simple styles to settings | |
211 |
|
211 | |||
212 | $ cat <<'EOF' >> .hg/hgrc |
|
212 | $ cat <<'EOF' >> .hg/hgrc | |
213 | > [templates] |
|
213 | > [templates] | |
214 | > simple = "{rev}\n" |
|
214 | > simple = "{rev}\n" | |
215 | > simple2 = {rev}\n |
|
215 | > simple2 = {rev}\n | |
216 | > rev = "should not precede {rev} keyword\n" |
|
216 | > rev = "should not precede {rev} keyword\n" | |
217 | > EOF |
|
217 | > EOF | |
218 |
|
218 | |||
219 | $ hg log -l1 -Tsimple |
|
219 | $ hg log -l1 -Tsimple | |
220 | 8 |
|
220 | 8 | |
221 | $ hg log -l1 -Tsimple2 |
|
221 | $ hg log -l1 -Tsimple2 | |
222 | 8 |
|
222 | 8 | |
223 | $ hg log -l1 -Trev |
|
223 | $ hg log -l1 -Trev | |
224 | should not precede 8 keyword |
|
224 | should not precede 8 keyword | |
225 | $ hg log -l1 -T '{simple}' |
|
225 | $ hg log -l1 -T '{simple}' | |
226 | 8 |
|
226 | 8 | |
227 |
|
227 | |||
228 | Map file shouldn't see user templates: |
|
228 | Map file shouldn't see user templates: | |
229 |
|
229 | |||
230 | $ cat <<EOF > tmpl |
|
230 | $ cat <<EOF > tmpl | |
231 | > changeset = 'nothing expanded:{simple}\n' |
|
231 | > changeset = 'nothing expanded:{simple}\n' | |
232 | > EOF |
|
232 | > EOF | |
233 | $ hg log -l1 --style ./tmpl |
|
233 | $ hg log -l1 --style ./tmpl | |
234 | nothing expanded: |
|
234 | nothing expanded: | |
235 |
|
235 | |||
236 | Test templates and style maps in files: |
|
236 | Test templates and style maps in files: | |
237 |
|
237 | |||
238 | $ echo "{rev}" > tmpl |
|
238 | $ echo "{rev}" > tmpl | |
239 | $ hg log -l1 -T./tmpl |
|
239 | $ hg log -l1 -T./tmpl | |
240 | 8 |
|
240 | 8 | |
241 | $ hg log -l1 -Tblah/blah |
|
241 | $ hg log -l1 -Tblah/blah | |
242 | blah/blah (no-eol) |
|
242 | blah/blah (no-eol) | |
243 |
|
243 | |||
244 | $ printf 'changeset = "{rev}\\n"\n' > map-simple |
|
244 | $ printf 'changeset = "{rev}\\n"\n' > map-simple | |
245 | $ hg log -l1 -T./map-simple |
|
245 | $ hg log -l1 -T./map-simple | |
246 | 8 |
|
246 | 8 | |
247 |
|
247 | |||
248 | Test template map inheritance |
|
248 | Test template map inheritance | |
249 |
|
249 | |||
250 | $ echo "__base__ = map-cmdline.default" > map-simple |
|
250 | $ echo "__base__ = map-cmdline.default" > map-simple | |
251 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple |
|
251 | $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple | |
252 | $ hg log -l1 -T./map-simple |
|
252 | $ hg log -l1 -T./map-simple | |
253 | changeset: ***8*** |
|
253 | changeset: ***8*** | |
254 | tag: tip |
|
254 | tag: tip | |
255 | user: test |
|
255 | user: test | |
256 | date: Wed Jan 01 10:01:00 2020 +0000 |
|
256 | date: Wed Jan 01 10:01:00 2020 +0000 | |
257 | summary: third |
|
257 | summary: third | |
258 |
|
258 | |||
259 |
|
259 | |||
260 | Test docheader, docfooter and separator in template map |
|
260 | Test docheader, docfooter and separator in template map | |
261 |
|
261 | |||
262 | $ cat <<'EOF' > map-myjson |
|
262 | $ cat <<'EOF' > map-myjson | |
263 | > docheader = '\{\n' |
|
263 | > docheader = '\{\n' | |
264 | > docfooter = '\n}\n' |
|
264 | > docfooter = '\n}\n' | |
265 | > separator = ',\n' |
|
265 | > separator = ',\n' | |
266 | > changeset = ' {dict(rev, node|short)|json}' |
|
266 | > changeset = ' {dict(rev, node|short)|json}' | |
267 | > EOF |
|
267 | > EOF | |
268 | $ hg log -l2 -T./map-myjson |
|
268 | $ hg log -l2 -T./map-myjson | |
269 | { |
|
269 | { | |
270 | {"node": "95c24699272e", "rev": 8}, |
|
270 | {"node": "95c24699272e", "rev": 8}, | |
271 | {"node": "29114dbae42b", "rev": 7} |
|
271 | {"node": "29114dbae42b", "rev": 7} | |
272 | } |
|
272 | } | |
273 |
|
273 | |||
274 | Test docheader, docfooter and separator in [templates] section |
|
274 | Test docheader, docfooter and separator in [templates] section | |
275 |
|
275 | |||
276 | $ cat <<'EOF' >> .hg/hgrc |
|
276 | $ cat <<'EOF' >> .hg/hgrc | |
277 | > [templates] |
|
277 | > [templates] | |
278 | > myjson = ' {dict(rev, node|short)|json}' |
|
278 | > myjson = ' {dict(rev, node|short)|json}' | |
279 | > myjson:docheader = '\{\n' |
|
279 | > myjson:docheader = '\{\n' | |
280 | > myjson:docfooter = '\n}\n' |
|
280 | > myjson:docfooter = '\n}\n' | |
281 | > myjson:separator = ',\n' |
|
281 | > myjson:separator = ',\n' | |
282 | > :docheader = 'should not be selected as a docheader for literal templates\n' |
|
282 | > :docheader = 'should not be selected as a docheader for literal templates\n' | |
283 | > EOF |
|
283 | > EOF | |
284 | $ hg log -l2 -Tmyjson |
|
284 | $ hg log -l2 -Tmyjson | |
285 | { |
|
285 | { | |
286 | {"node": "95c24699272e", "rev": 8}, |
|
286 | {"node": "95c24699272e", "rev": 8}, | |
287 | {"node": "29114dbae42b", "rev": 7} |
|
287 | {"node": "29114dbae42b", "rev": 7} | |
288 | } |
|
288 | } | |
289 | $ hg log -l1 -T'{rev}\n' |
|
289 | $ hg log -l1 -T'{rev}\n' | |
290 | 8 |
|
290 | 8 | |
291 |
|
291 | |||
292 | Template should precede style option |
|
292 | Template should precede style option | |
293 |
|
293 | |||
294 | $ hg log -l1 --style default -T '{rev}\n' |
|
294 | $ hg log -l1 --style default -T '{rev}\n' | |
295 | 8 |
|
295 | 8 | |
296 |
|
296 | |||
297 | Add a commit with empty description, to ensure that the templates |
|
297 | Add a commit with empty description, to ensure that the templates | |
298 | below will omit the description line. |
|
298 | below will omit the description line. | |
299 |
|
299 | |||
300 | $ echo c >> c |
|
300 | $ echo c >> c | |
301 | $ hg add c |
|
301 | $ hg add c | |
302 | $ hg commit -qm ' ' |
|
302 | $ hg commit -qm ' ' | |
303 |
|
303 | |||
304 | Default style is like normal output. Phases style should be the same |
|
304 | Default style is like normal output. Phases style should be the same | |
305 | as default style, except for extra phase lines. |
|
305 | as default style, except for extra phase lines. | |
306 |
|
306 | |||
307 | $ hg log > log.out |
|
307 | $ hg log > log.out | |
308 | $ hg log --style default > style.out |
|
308 | $ hg log --style default > style.out | |
309 | $ cmp log.out style.out || diff -u log.out style.out |
|
309 | $ cmp log.out style.out || diff -u log.out style.out | |
310 | $ hg log -T phases > phases.out |
|
310 | $ hg log -T phases > phases.out | |
311 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
311 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
312 | +phase: draft |
|
312 | +phase: draft | |
313 | +phase: draft |
|
313 | +phase: draft | |
314 | +phase: draft |
|
314 | +phase: draft | |
315 | +phase: draft |
|
315 | +phase: draft | |
316 | +phase: draft |
|
316 | +phase: draft | |
317 | +phase: draft |
|
317 | +phase: draft | |
318 | +phase: draft |
|
318 | +phase: draft | |
319 | +phase: draft |
|
319 | +phase: draft | |
320 | +phase: draft |
|
320 | +phase: draft | |
321 | +phase: draft |
|
321 | +phase: draft | |
322 |
|
322 | |||
323 | $ hg log -v > log.out |
|
323 | $ hg log -v > log.out | |
324 | $ hg log -v --style default > style.out |
|
324 | $ hg log -v --style default > style.out | |
325 | $ cmp log.out style.out || diff -u log.out style.out |
|
325 | $ cmp log.out style.out || diff -u log.out style.out | |
326 | $ hg log -v -T phases > phases.out |
|
326 | $ hg log -v -T phases > phases.out | |
327 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
327 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
328 | +phase: draft |
|
328 | +phase: draft | |
329 | +phase: draft |
|
329 | +phase: draft | |
330 | +phase: draft |
|
330 | +phase: draft | |
331 | +phase: draft |
|
331 | +phase: draft | |
332 | +phase: draft |
|
332 | +phase: draft | |
333 | +phase: draft |
|
333 | +phase: draft | |
334 | +phase: draft |
|
334 | +phase: draft | |
335 | +phase: draft |
|
335 | +phase: draft | |
336 | +phase: draft |
|
336 | +phase: draft | |
337 | +phase: draft |
|
337 | +phase: draft | |
338 |
|
338 | |||
339 | $ hg log -q > log.out |
|
339 | $ hg log -q > log.out | |
340 | $ hg log -q --style default > style.out |
|
340 | $ hg log -q --style default > style.out | |
341 | $ cmp log.out style.out || diff -u log.out style.out |
|
341 | $ cmp log.out style.out || diff -u log.out style.out | |
342 | $ hg log -q -T phases > phases.out |
|
342 | $ hg log -q -T phases > phases.out | |
343 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
343 | $ cmp log.out phases.out || diff -u log.out phases.out | |
344 |
|
344 | |||
345 | $ hg log --debug > log.out |
|
345 | $ hg log --debug > log.out | |
346 | $ hg log --debug --style default > style.out |
|
346 | $ hg log --debug --style default > style.out | |
347 | $ cmp log.out style.out || diff -u log.out style.out |
|
347 | $ cmp log.out style.out || diff -u log.out style.out | |
348 | $ hg log --debug -T phases > phases.out |
|
348 | $ hg log --debug -T phases > phases.out | |
349 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
349 | $ cmp log.out phases.out || diff -u log.out phases.out | |
350 |
|
350 | |||
351 | Default style of working-directory revision should also be the same (but |
|
351 | Default style of working-directory revision should also be the same (but | |
352 | date may change while running tests): |
|
352 | date may change while running tests): | |
353 |
|
353 | |||
354 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out |
|
354 | $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out | |
355 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out |
|
355 | $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out | |
356 | $ cmp log.out style.out || diff -u log.out style.out |
|
356 | $ cmp log.out style.out || diff -u log.out style.out | |
357 |
|
357 | |||
358 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out |
|
358 | $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out | |
359 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out |
|
359 | $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out | |
360 | $ cmp log.out style.out || diff -u log.out style.out |
|
360 | $ cmp log.out style.out || diff -u log.out style.out | |
361 |
|
361 | |||
362 | $ hg log -r 'wdir()' -q > log.out |
|
362 | $ hg log -r 'wdir()' -q > log.out | |
363 | $ hg log -r 'wdir()' -q --style default > style.out |
|
363 | $ hg log -r 'wdir()' -q --style default > style.out | |
364 | $ cmp log.out style.out || diff -u log.out style.out |
|
364 | $ cmp log.out style.out || diff -u log.out style.out | |
365 |
|
365 | |||
366 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out |
|
366 | $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out | |
367 | $ hg log -r 'wdir()' --debug --style default \ |
|
367 | $ hg log -r 'wdir()' --debug --style default \ | |
368 | > | sed 's|^date:.*|date:|' > style.out |
|
368 | > | sed 's|^date:.*|date:|' > style.out | |
369 | $ cmp log.out style.out || diff -u log.out style.out |
|
369 | $ cmp log.out style.out || diff -u log.out style.out | |
370 |
|
370 | |||
371 | Default style should also preserve color information (issue2866): |
|
371 | Default style should also preserve color information (issue2866): | |
372 |
|
372 | |||
373 | $ cp $HGRCPATH $HGRCPATH-bak |
|
373 | $ cp $HGRCPATH $HGRCPATH-bak | |
374 | $ cat <<EOF >> $HGRCPATH |
|
374 | $ cat <<EOF >> $HGRCPATH | |
375 | > [extensions] |
|
375 | > [extensions] | |
376 | > color= |
|
376 | > color= | |
377 | > EOF |
|
377 | > EOF | |
378 |
|
378 | |||
379 | $ hg --color=debug log > log.out |
|
379 | $ hg --color=debug log > log.out | |
380 | $ hg --color=debug log --style default > style.out |
|
380 | $ hg --color=debug log --style default > style.out | |
381 | $ cmp log.out style.out || diff -u log.out style.out |
|
381 | $ cmp log.out style.out || diff -u log.out style.out | |
382 | $ hg --color=debug log -T phases > phases.out |
|
382 | $ hg --color=debug log -T phases > phases.out | |
383 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
383 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
384 | +[log.phase|phase: draft] |
|
384 | +[log.phase|phase: draft] | |
385 | +[log.phase|phase: draft] |
|
385 | +[log.phase|phase: draft] | |
386 | +[log.phase|phase: draft] |
|
386 | +[log.phase|phase: draft] | |
387 | +[log.phase|phase: draft] |
|
387 | +[log.phase|phase: draft] | |
388 | +[log.phase|phase: draft] |
|
388 | +[log.phase|phase: draft] | |
389 | +[log.phase|phase: draft] |
|
389 | +[log.phase|phase: draft] | |
390 | +[log.phase|phase: draft] |
|
390 | +[log.phase|phase: draft] | |
391 | +[log.phase|phase: draft] |
|
391 | +[log.phase|phase: draft] | |
392 | +[log.phase|phase: draft] |
|
392 | +[log.phase|phase: draft] | |
393 | +[log.phase|phase: draft] |
|
393 | +[log.phase|phase: draft] | |
394 |
|
394 | |||
395 | $ hg --color=debug -v log > log.out |
|
395 | $ hg --color=debug -v log > log.out | |
396 | $ hg --color=debug -v log --style default > style.out |
|
396 | $ hg --color=debug -v log --style default > style.out | |
397 | $ cmp log.out style.out || diff -u log.out style.out |
|
397 | $ cmp log.out style.out || diff -u log.out style.out | |
398 | $ hg --color=debug -v log -T phases > phases.out |
|
398 | $ hg --color=debug -v log -T phases > phases.out | |
399 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' |
|
399 | $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@' | |
400 | +[log.phase|phase: draft] |
|
400 | +[log.phase|phase: draft] | |
401 | +[log.phase|phase: draft] |
|
401 | +[log.phase|phase: draft] | |
402 | +[log.phase|phase: draft] |
|
402 | +[log.phase|phase: draft] | |
403 | +[log.phase|phase: draft] |
|
403 | +[log.phase|phase: draft] | |
404 | +[log.phase|phase: draft] |
|
404 | +[log.phase|phase: draft] | |
405 | +[log.phase|phase: draft] |
|
405 | +[log.phase|phase: draft] | |
406 | +[log.phase|phase: draft] |
|
406 | +[log.phase|phase: draft] | |
407 | +[log.phase|phase: draft] |
|
407 | +[log.phase|phase: draft] | |
408 | +[log.phase|phase: draft] |
|
408 | +[log.phase|phase: draft] | |
409 | +[log.phase|phase: draft] |
|
409 | +[log.phase|phase: draft] | |
410 |
|
410 | |||
411 | $ hg --color=debug -q log > log.out |
|
411 | $ hg --color=debug -q log > log.out | |
412 | $ hg --color=debug -q log --style default > style.out |
|
412 | $ hg --color=debug -q log --style default > style.out | |
413 | $ cmp log.out style.out || diff -u log.out style.out |
|
413 | $ cmp log.out style.out || diff -u log.out style.out | |
414 | $ hg --color=debug -q log -T phases > phases.out |
|
414 | $ hg --color=debug -q log -T phases > phases.out | |
415 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
415 | $ cmp log.out phases.out || diff -u log.out phases.out | |
416 |
|
416 | |||
417 | $ hg --color=debug --debug log > log.out |
|
417 | $ hg --color=debug --debug log > log.out | |
418 | $ hg --color=debug --debug log --style default > style.out |
|
418 | $ hg --color=debug --debug log --style default > style.out | |
419 | $ cmp log.out style.out || diff -u log.out style.out |
|
419 | $ cmp log.out style.out || diff -u log.out style.out | |
420 | $ hg --color=debug --debug log -T phases > phases.out |
|
420 | $ hg --color=debug --debug log -T phases > phases.out | |
421 | $ cmp log.out phases.out || diff -u log.out phases.out |
|
421 | $ cmp log.out phases.out || diff -u log.out phases.out | |
422 |
|
422 | |||
423 | $ mv $HGRCPATH-bak $HGRCPATH |
|
423 | $ mv $HGRCPATH-bak $HGRCPATH | |
424 |
|
424 | |||
425 | Remove commit with empty commit message, so as to not pollute further |
|
425 | Remove commit with empty commit message, so as to not pollute further | |
426 | tests. |
|
426 | tests. | |
427 |
|
427 | |||
428 | $ hg --config extensions.strip= strip -q . |
|
428 | $ hg --config extensions.strip= strip -q . | |
429 |
|
429 | |||
430 | Revision with no copies (used to print a traceback): |
|
430 | Revision with no copies (used to print a traceback): | |
431 |
|
431 | |||
432 | $ hg tip -v --template '\n' |
|
432 | $ hg tip -v --template '\n' | |
433 |
|
433 | |||
434 |
|
434 | |||
435 | Compact style works: |
|
435 | Compact style works: | |
436 |
|
436 | |||
437 | $ hg log -Tcompact |
|
437 | $ hg log -Tcompact | |
438 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
438 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
439 | third |
|
439 | third | |
440 |
|
440 | |||
441 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user |
|
441 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 user | |
442 | second |
|
442 | second | |
443 |
|
443 | |||
444 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
444 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
445 | merge |
|
445 | merge | |
446 |
|
446 | |||
447 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
447 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
448 | new head |
|
448 | new head | |
449 |
|
449 | |||
450 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
450 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
451 | new branch |
|
451 | new branch | |
452 |
|
452 | |||
453 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
453 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
454 | no user, no domain |
|
454 | no user, no domain | |
455 |
|
455 | |||
456 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other |
|
456 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other | |
457 | no person |
|
457 | no person | |
458 |
|
458 | |||
459 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other |
|
459 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 other | |
460 | other 1 |
|
460 | other 1 | |
461 |
|
461 | |||
462 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user |
|
462 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 user | |
463 | line 1 |
|
463 | line 1 | |
464 |
|
464 | |||
465 |
|
465 | |||
466 | $ hg log -v --style compact |
|
466 | $ hg log -v --style compact | |
467 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test |
|
467 | 8[tip] 95c24699272e 2020-01-01 10:01 +0000 test | |
468 | third |
|
468 | third | |
469 |
|
469 | |||
470 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
470 | 7:-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
471 | second |
|
471 | second | |
472 |
|
472 | |||
473 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
473 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
474 | merge |
|
474 | merge | |
475 |
|
475 | |||
476 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
476 | 5:3 13207e5a10d9 1970-01-18 08:40 +0000 person | |
477 | new head |
|
477 | new head | |
478 |
|
478 | |||
479 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
479 | 4 bbe44766e73d 1970-01-17 04:53 +0000 person | |
480 | new branch |
|
480 | new branch | |
481 |
|
481 | |||
482 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
482 | 3 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
483 | no user, no domain |
|
483 | no user, no domain | |
484 |
|
484 | |||
485 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
485 | 2 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
486 | no person |
|
486 | no person | |
487 |
|
487 | |||
488 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
488 | 1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
489 | other 1 |
|
489 | other 1 | |
490 | other 2 |
|
490 | other 2 | |
491 |
|
491 | |||
492 | other 3 |
|
492 | other 3 | |
493 |
|
493 | |||
494 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
494 | 0 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
495 | line 1 |
|
495 | line 1 | |
496 | line 2 |
|
496 | line 2 | |
497 |
|
497 | |||
498 |
|
498 | |||
499 | $ hg log --debug --style compact |
|
499 | $ hg log --debug --style compact | |
500 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test |
|
500 | 8[tip]:7,-1 95c24699272e 2020-01-01 10:01 +0000 test | |
501 | third |
|
501 | third | |
502 |
|
502 | |||
503 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
503 | 7:-1,-1 29114dbae42b 1970-01-12 13:46 +0000 User Name <user@hostname> | |
504 | second |
|
504 | second | |
505 |
|
505 | |||
506 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person |
|
506 | 6:5,4 d41e714fe50d 1970-01-18 08:40 +0000 person | |
507 | merge |
|
507 | merge | |
508 |
|
508 | |||
509 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person |
|
509 | 5:3,-1 13207e5a10d9 1970-01-18 08:40 +0000 person | |
510 | new head |
|
510 | new head | |
511 |
|
511 | |||
512 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person |
|
512 | 4:3,-1 bbe44766e73d 1970-01-17 04:53 +0000 person | |
513 | new branch |
|
513 | new branch | |
514 |
|
514 | |||
515 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person |
|
515 | 3:2,-1 10e46f2dcbf4 1970-01-16 01:06 +0000 person | |
516 | no user, no domain |
|
516 | no user, no domain | |
517 |
|
517 | |||
518 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place |
|
518 | 2:1,-1 97054abb4ab8 1970-01-14 21:20 +0000 other@place | |
519 | no person |
|
519 | no person | |
520 |
|
520 | |||
521 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> |
|
521 | 1:0,-1 b608e9d1a3f0 1970-01-13 17:33 +0000 A. N. Other <other@place> | |
522 | other 1 |
|
522 | other 1 | |
523 | other 2 |
|
523 | other 2 | |
524 |
|
524 | |||
525 | other 3 |
|
525 | other 3 | |
526 |
|
526 | |||
527 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> |
|
527 | 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:46 +0000 User Name <user@hostname> | |
528 | line 1 |
|
528 | line 1 | |
529 | line 2 |
|
529 | line 2 | |
530 |
|
530 | |||
531 |
|
531 | |||
532 | Test xml styles: |
|
532 | Test xml styles: | |
533 |
|
533 | |||
534 | $ hg log --style xml -r 'not all()' |
|
534 | $ hg log --style xml -r 'not all()' | |
535 | <?xml version="1.0"?> |
|
535 | <?xml version="1.0"?> | |
536 | <log> |
|
536 | <log> | |
537 | </log> |
|
537 | </log> | |
538 |
|
538 | |||
539 | $ hg log --style xml |
|
539 | $ hg log --style xml | |
540 | <?xml version="1.0"?> |
|
540 | <?xml version="1.0"?> | |
541 | <log> |
|
541 | <log> | |
542 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
542 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
543 | <tag>tip</tag> |
|
543 | <tag>tip</tag> | |
544 | <author email="test">test</author> |
|
544 | <author email="test">test</author> | |
545 | <date>2020-01-01T10:01:00+00:00</date> |
|
545 | <date>2020-01-01T10:01:00+00:00</date> | |
546 | <msg xml:space="preserve">third</msg> |
|
546 | <msg xml:space="preserve">third</msg> | |
547 | </logentry> |
|
547 | </logentry> | |
548 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
548 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
549 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
549 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
550 | <author email="user@hostname">User Name</author> |
|
550 | <author email="user@hostname">User Name</author> | |
551 | <date>1970-01-12T13:46:40+00:00</date> |
|
551 | <date>1970-01-12T13:46:40+00:00</date> | |
552 | <msg xml:space="preserve">second</msg> |
|
552 | <msg xml:space="preserve">second</msg> | |
553 | </logentry> |
|
553 | </logentry> | |
554 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
554 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
555 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
555 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
556 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
556 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
557 | <author email="person">person</author> |
|
557 | <author email="person">person</author> | |
558 | <date>1970-01-18T08:40:01+00:00</date> |
|
558 | <date>1970-01-18T08:40:01+00:00</date> | |
559 | <msg xml:space="preserve">merge</msg> |
|
559 | <msg xml:space="preserve">merge</msg> | |
560 | </logentry> |
|
560 | </logentry> | |
561 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
561 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
562 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
562 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
563 | <author email="person">person</author> |
|
563 | <author email="person">person</author> | |
564 | <date>1970-01-18T08:40:00+00:00</date> |
|
564 | <date>1970-01-18T08:40:00+00:00</date> | |
565 | <msg xml:space="preserve">new head</msg> |
|
565 | <msg xml:space="preserve">new head</msg> | |
566 | </logentry> |
|
566 | </logentry> | |
567 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
567 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
568 | <branch>foo</branch> |
|
568 | <branch>foo</branch> | |
569 | <author email="person">person</author> |
|
569 | <author email="person">person</author> | |
570 | <date>1970-01-17T04:53:20+00:00</date> |
|
570 | <date>1970-01-17T04:53:20+00:00</date> | |
571 | <msg xml:space="preserve">new branch</msg> |
|
571 | <msg xml:space="preserve">new branch</msg> | |
572 | </logentry> |
|
572 | </logentry> | |
573 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
573 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
574 | <author email="person">person</author> |
|
574 | <author email="person">person</author> | |
575 | <date>1970-01-16T01:06:40+00:00</date> |
|
575 | <date>1970-01-16T01:06:40+00:00</date> | |
576 | <msg xml:space="preserve">no user, no domain</msg> |
|
576 | <msg xml:space="preserve">no user, no domain</msg> | |
577 | </logentry> |
|
577 | </logentry> | |
578 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
578 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
579 | <author email="other@place">other</author> |
|
579 | <author email="other@place">other</author> | |
580 | <date>1970-01-14T21:20:00+00:00</date> |
|
580 | <date>1970-01-14T21:20:00+00:00</date> | |
581 | <msg xml:space="preserve">no person</msg> |
|
581 | <msg xml:space="preserve">no person</msg> | |
582 | </logentry> |
|
582 | </logentry> | |
583 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
583 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
584 | <author email="other@place">A. N. Other</author> |
|
584 | <author email="other@place">A. N. Other</author> | |
585 | <date>1970-01-13T17:33:20+00:00</date> |
|
585 | <date>1970-01-13T17:33:20+00:00</date> | |
586 | <msg xml:space="preserve">other 1 |
|
586 | <msg xml:space="preserve">other 1 | |
587 | other 2 |
|
587 | other 2 | |
588 |
|
588 | |||
589 | other 3</msg> |
|
589 | other 3</msg> | |
590 | </logentry> |
|
590 | </logentry> | |
591 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
591 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
592 | <author email="user@hostname">User Name</author> |
|
592 | <author email="user@hostname">User Name</author> | |
593 | <date>1970-01-12T13:46:40+00:00</date> |
|
593 | <date>1970-01-12T13:46:40+00:00</date> | |
594 | <msg xml:space="preserve">line 1 |
|
594 | <msg xml:space="preserve">line 1 | |
595 | line 2</msg> |
|
595 | line 2</msg> | |
596 | </logentry> |
|
596 | </logentry> | |
597 | </log> |
|
597 | </log> | |
598 |
|
598 | |||
599 | $ hg log -v --style xml |
|
599 | $ hg log -v --style xml | |
600 | <?xml version="1.0"?> |
|
600 | <?xml version="1.0"?> | |
601 | <log> |
|
601 | <log> | |
602 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
602 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
603 | <tag>tip</tag> |
|
603 | <tag>tip</tag> | |
604 | <author email="test">test</author> |
|
604 | <author email="test">test</author> | |
605 | <date>2020-01-01T10:01:00+00:00</date> |
|
605 | <date>2020-01-01T10:01:00+00:00</date> | |
606 | <msg xml:space="preserve">third</msg> |
|
606 | <msg xml:space="preserve">third</msg> | |
607 | <paths> |
|
607 | <paths> | |
608 | <path action="A">fourth</path> |
|
608 | <path action="A">fourth</path> | |
609 | <path action="A">third</path> |
|
609 | <path action="A">third</path> | |
610 | <path action="R">second</path> |
|
610 | <path action="R">second</path> | |
611 | </paths> |
|
611 | </paths> | |
612 | <copies> |
|
612 | <copies> | |
613 | <copy source="second">fourth</copy> |
|
613 | <copy source="second">fourth</copy> | |
614 | </copies> |
|
614 | </copies> | |
615 | </logentry> |
|
615 | </logentry> | |
616 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
616 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
617 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
617 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
618 | <author email="user@hostname">User Name</author> |
|
618 | <author email="user@hostname">User Name</author> | |
619 | <date>1970-01-12T13:46:40+00:00</date> |
|
619 | <date>1970-01-12T13:46:40+00:00</date> | |
620 | <msg xml:space="preserve">second</msg> |
|
620 | <msg xml:space="preserve">second</msg> | |
621 | <paths> |
|
621 | <paths> | |
622 | <path action="A">second</path> |
|
622 | <path action="A">second</path> | |
623 | </paths> |
|
623 | </paths> | |
624 | </logentry> |
|
624 | </logentry> | |
625 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
625 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
626 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
626 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
627 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
627 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
628 | <author email="person">person</author> |
|
628 | <author email="person">person</author> | |
629 | <date>1970-01-18T08:40:01+00:00</date> |
|
629 | <date>1970-01-18T08:40:01+00:00</date> | |
630 | <msg xml:space="preserve">merge</msg> |
|
630 | <msg xml:space="preserve">merge</msg> | |
631 | <paths> |
|
631 | <paths> | |
632 | </paths> |
|
632 | </paths> | |
633 | </logentry> |
|
633 | </logentry> | |
634 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
634 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
635 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
635 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
636 | <author email="person">person</author> |
|
636 | <author email="person">person</author> | |
637 | <date>1970-01-18T08:40:00+00:00</date> |
|
637 | <date>1970-01-18T08:40:00+00:00</date> | |
638 | <msg xml:space="preserve">new head</msg> |
|
638 | <msg xml:space="preserve">new head</msg> | |
639 | <paths> |
|
639 | <paths> | |
640 | <path action="A">d</path> |
|
640 | <path action="A">d</path> | |
641 | </paths> |
|
641 | </paths> | |
642 | </logentry> |
|
642 | </logentry> | |
643 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
643 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
644 | <branch>foo</branch> |
|
644 | <branch>foo</branch> | |
645 | <author email="person">person</author> |
|
645 | <author email="person">person</author> | |
646 | <date>1970-01-17T04:53:20+00:00</date> |
|
646 | <date>1970-01-17T04:53:20+00:00</date> | |
647 | <msg xml:space="preserve">new branch</msg> |
|
647 | <msg xml:space="preserve">new branch</msg> | |
648 | <paths> |
|
648 | <paths> | |
649 | </paths> |
|
649 | </paths> | |
650 | </logentry> |
|
650 | </logentry> | |
651 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
651 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
652 | <author email="person">person</author> |
|
652 | <author email="person">person</author> | |
653 | <date>1970-01-16T01:06:40+00:00</date> |
|
653 | <date>1970-01-16T01:06:40+00:00</date> | |
654 | <msg xml:space="preserve">no user, no domain</msg> |
|
654 | <msg xml:space="preserve">no user, no domain</msg> | |
655 | <paths> |
|
655 | <paths> | |
656 | <path action="M">c</path> |
|
656 | <path action="M">c</path> | |
657 | </paths> |
|
657 | </paths> | |
658 | </logentry> |
|
658 | </logentry> | |
659 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
659 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
660 | <author email="other@place">other</author> |
|
660 | <author email="other@place">other</author> | |
661 | <date>1970-01-14T21:20:00+00:00</date> |
|
661 | <date>1970-01-14T21:20:00+00:00</date> | |
662 | <msg xml:space="preserve">no person</msg> |
|
662 | <msg xml:space="preserve">no person</msg> | |
663 | <paths> |
|
663 | <paths> | |
664 | <path action="A">c</path> |
|
664 | <path action="A">c</path> | |
665 | </paths> |
|
665 | </paths> | |
666 | </logentry> |
|
666 | </logentry> | |
667 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
667 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
668 | <author email="other@place">A. N. Other</author> |
|
668 | <author email="other@place">A. N. Other</author> | |
669 | <date>1970-01-13T17:33:20+00:00</date> |
|
669 | <date>1970-01-13T17:33:20+00:00</date> | |
670 | <msg xml:space="preserve">other 1 |
|
670 | <msg xml:space="preserve">other 1 | |
671 | other 2 |
|
671 | other 2 | |
672 |
|
672 | |||
673 | other 3</msg> |
|
673 | other 3</msg> | |
674 | <paths> |
|
674 | <paths> | |
675 | <path action="A">b</path> |
|
675 | <path action="A">b</path> | |
676 | </paths> |
|
676 | </paths> | |
677 | </logentry> |
|
677 | </logentry> | |
678 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
678 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
679 | <author email="user@hostname">User Name</author> |
|
679 | <author email="user@hostname">User Name</author> | |
680 | <date>1970-01-12T13:46:40+00:00</date> |
|
680 | <date>1970-01-12T13:46:40+00:00</date> | |
681 | <msg xml:space="preserve">line 1 |
|
681 | <msg xml:space="preserve">line 1 | |
682 | line 2</msg> |
|
682 | line 2</msg> | |
683 | <paths> |
|
683 | <paths> | |
684 | <path action="A">a</path> |
|
684 | <path action="A">a</path> | |
685 | </paths> |
|
685 | </paths> | |
686 | </logentry> |
|
686 | </logentry> | |
687 | </log> |
|
687 | </log> | |
688 |
|
688 | |||
689 | $ hg log --debug --style xml |
|
689 | $ hg log --debug --style xml | |
690 | <?xml version="1.0"?> |
|
690 | <?xml version="1.0"?> | |
691 | <log> |
|
691 | <log> | |
692 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> |
|
692 | <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a"> | |
693 | <tag>tip</tag> |
|
693 | <tag>tip</tag> | |
694 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> |
|
694 | <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" /> | |
695 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
695 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
696 | <author email="test">test</author> |
|
696 | <author email="test">test</author> | |
697 | <date>2020-01-01T10:01:00+00:00</date> |
|
697 | <date>2020-01-01T10:01:00+00:00</date> | |
698 | <msg xml:space="preserve">third</msg> |
|
698 | <msg xml:space="preserve">third</msg> | |
699 | <paths> |
|
699 | <paths> | |
700 | <path action="A">fourth</path> |
|
700 | <path action="A">fourth</path> | |
701 | <path action="A">third</path> |
|
701 | <path action="A">third</path> | |
702 | <path action="R">second</path> |
|
702 | <path action="R">second</path> | |
703 | </paths> |
|
703 | </paths> | |
704 | <copies> |
|
704 | <copies> | |
705 | <copy source="second">fourth</copy> |
|
705 | <copy source="second">fourth</copy> | |
706 | </copies> |
|
706 | </copies> | |
707 | <extra key="branch">default</extra> |
|
707 | <extra key="branch">default</extra> | |
708 | </logentry> |
|
708 | </logentry> | |
709 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> |
|
709 | <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453"> | |
710 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
710 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
711 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
711 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
712 | <author email="user@hostname">User Name</author> |
|
712 | <author email="user@hostname">User Name</author> | |
713 | <date>1970-01-12T13:46:40+00:00</date> |
|
713 | <date>1970-01-12T13:46:40+00:00</date> | |
714 | <msg xml:space="preserve">second</msg> |
|
714 | <msg xml:space="preserve">second</msg> | |
715 | <paths> |
|
715 | <paths> | |
716 | <path action="A">second</path> |
|
716 | <path action="A">second</path> | |
717 | </paths> |
|
717 | </paths> | |
718 | <extra key="branch">default</extra> |
|
718 | <extra key="branch">default</extra> | |
719 | </logentry> |
|
719 | </logentry> | |
720 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> |
|
720 | <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b"> | |
721 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> |
|
721 | <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" /> | |
722 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> |
|
722 | <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" /> | |
723 | <author email="person">person</author> |
|
723 | <author email="person">person</author> | |
724 | <date>1970-01-18T08:40:01+00:00</date> |
|
724 | <date>1970-01-18T08:40:01+00:00</date> | |
725 | <msg xml:space="preserve">merge</msg> |
|
725 | <msg xml:space="preserve">merge</msg> | |
726 | <paths> |
|
726 | <paths> | |
727 | </paths> |
|
727 | </paths> | |
728 | <extra key="branch">default</extra> |
|
728 | <extra key="branch">default</extra> | |
729 | </logentry> |
|
729 | </logentry> | |
730 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> |
|
730 | <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f"> | |
731 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
731 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
732 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
732 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
733 | <author email="person">person</author> |
|
733 | <author email="person">person</author> | |
734 | <date>1970-01-18T08:40:00+00:00</date> |
|
734 | <date>1970-01-18T08:40:00+00:00</date> | |
735 | <msg xml:space="preserve">new head</msg> |
|
735 | <msg xml:space="preserve">new head</msg> | |
736 | <paths> |
|
736 | <paths> | |
737 | <path action="A">d</path> |
|
737 | <path action="A">d</path> | |
738 | </paths> |
|
738 | </paths> | |
739 | <extra key="branch">default</extra> |
|
739 | <extra key="branch">default</extra> | |
740 | </logentry> |
|
740 | </logentry> | |
741 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> |
|
741 | <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74"> | |
742 | <branch>foo</branch> |
|
742 | <branch>foo</branch> | |
743 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> |
|
743 | <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" /> | |
744 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
744 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
745 | <author email="person">person</author> |
|
745 | <author email="person">person</author> | |
746 | <date>1970-01-17T04:53:20+00:00</date> |
|
746 | <date>1970-01-17T04:53:20+00:00</date> | |
747 | <msg xml:space="preserve">new branch</msg> |
|
747 | <msg xml:space="preserve">new branch</msg> | |
748 | <paths> |
|
748 | <paths> | |
749 | </paths> |
|
749 | </paths> | |
750 | <extra key="branch">foo</extra> |
|
750 | <extra key="branch">foo</extra> | |
751 | </logentry> |
|
751 | </logentry> | |
752 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> |
|
752 | <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47"> | |
753 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> |
|
753 | <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" /> | |
754 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
754 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
755 | <author email="person">person</author> |
|
755 | <author email="person">person</author> | |
756 | <date>1970-01-16T01:06:40+00:00</date> |
|
756 | <date>1970-01-16T01:06:40+00:00</date> | |
757 | <msg xml:space="preserve">no user, no domain</msg> |
|
757 | <msg xml:space="preserve">no user, no domain</msg> | |
758 | <paths> |
|
758 | <paths> | |
759 | <path action="M">c</path> |
|
759 | <path action="M">c</path> | |
760 | </paths> |
|
760 | </paths> | |
761 | <extra key="branch">default</extra> |
|
761 | <extra key="branch">default</extra> | |
762 | </logentry> |
|
762 | </logentry> | |
763 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> |
|
763 | <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465"> | |
764 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> |
|
764 | <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" /> | |
765 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
765 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
766 | <author email="other@place">other</author> |
|
766 | <author email="other@place">other</author> | |
767 | <date>1970-01-14T21:20:00+00:00</date> |
|
767 | <date>1970-01-14T21:20:00+00:00</date> | |
768 | <msg xml:space="preserve">no person</msg> |
|
768 | <msg xml:space="preserve">no person</msg> | |
769 | <paths> |
|
769 | <paths> | |
770 | <path action="A">c</path> |
|
770 | <path action="A">c</path> | |
771 | </paths> |
|
771 | </paths> | |
772 | <extra key="branch">default</extra> |
|
772 | <extra key="branch">default</extra> | |
773 | </logentry> |
|
773 | </logentry> | |
774 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> |
|
774 | <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965"> | |
775 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> |
|
775 | <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" /> | |
776 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
776 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
777 | <author email="other@place">A. N. Other</author> |
|
777 | <author email="other@place">A. N. Other</author> | |
778 | <date>1970-01-13T17:33:20+00:00</date> |
|
778 | <date>1970-01-13T17:33:20+00:00</date> | |
779 | <msg xml:space="preserve">other 1 |
|
779 | <msg xml:space="preserve">other 1 | |
780 | other 2 |
|
780 | other 2 | |
781 |
|
781 | |||
782 | other 3</msg> |
|
782 | other 3</msg> | |
783 | <paths> |
|
783 | <paths> | |
784 | <path action="A">b</path> |
|
784 | <path action="A">b</path> | |
785 | </paths> |
|
785 | </paths> | |
786 | <extra key="branch">default</extra> |
|
786 | <extra key="branch">default</extra> | |
787 | </logentry> |
|
787 | </logentry> | |
788 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> |
|
788 | <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f"> | |
789 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
789 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
790 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> |
|
790 | <parent revision="-1" node="0000000000000000000000000000000000000000" /> | |
791 | <author email="user@hostname">User Name</author> |
|
791 | <author email="user@hostname">User Name</author> | |
792 | <date>1970-01-12T13:46:40+00:00</date> |
|
792 | <date>1970-01-12T13:46:40+00:00</date> | |
793 | <msg xml:space="preserve">line 1 |
|
793 | <msg xml:space="preserve">line 1 | |
794 | line 2</msg> |
|
794 | line 2</msg> | |
795 | <paths> |
|
795 | <paths> | |
796 | <path action="A">a</path> |
|
796 | <path action="A">a</path> | |
797 | </paths> |
|
797 | </paths> | |
798 | <extra key="branch">default</extra> |
|
798 | <extra key="branch">default</extra> | |
799 | </logentry> |
|
799 | </logentry> | |
800 | </log> |
|
800 | </log> | |
801 |
|
801 | |||
802 |
|
802 | |||
803 | Test JSON style: |
|
803 | Test JSON style: | |
804 |
|
804 | |||
805 | $ hg log -k nosuch -Tjson |
|
805 | $ hg log -k nosuch -Tjson | |
806 | [] |
|
806 | [] | |
807 |
|
807 | |||
808 | $ hg log -qr . -Tjson |
|
808 | $ hg log -qr . -Tjson | |
809 | [ |
|
809 | [ | |
810 | { |
|
810 | { | |
811 | "rev": 8, |
|
811 | "rev": 8, | |
812 | "node": "95c24699272ef57d062b8bccc32c878bf841784a" |
|
812 | "node": "95c24699272ef57d062b8bccc32c878bf841784a" | |
813 | } |
|
813 | } | |
814 | ] |
|
814 | ] | |
815 |
|
815 | |||
816 | $ hg log -vpr . -Tjson --stat |
|
816 | $ hg log -vpr . -Tjson --stat | |
817 | [ |
|
817 | [ | |
818 | { |
|
818 | { | |
819 | "rev": 8, |
|
819 | "rev": 8, | |
820 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
820 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
821 | "branch": "default", |
|
821 | "branch": "default", | |
822 | "phase": "draft", |
|
822 | "phase": "draft", | |
823 | "user": "test", |
|
823 | "user": "test", | |
824 | "date": [1577872860, 0], |
|
824 | "date": [1577872860, 0], | |
825 | "desc": "third", |
|
825 | "desc": "third", | |
826 | "bookmarks": [], |
|
826 | "bookmarks": [], | |
827 | "tags": ["tip"], |
|
827 | "tags": ["tip"], | |
828 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
828 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
829 | "files": ["fourth", "second", "third"], |
|
829 | "files": ["fourth", "second", "third"], | |
830 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", |
|
830 | "diffstat": " fourth | 1 +\n second | 1 -\n third | 1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n", | |
831 | "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n" |
|
831 | "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n" | |
832 | } |
|
832 | } | |
833 | ] |
|
833 | ] | |
834 |
|
834 | |||
835 | honor --git but not format-breaking diffopts |
|
835 | honor --git but not format-breaking diffopts | |
836 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson |
|
836 | $ hg --config diff.noprefix=True log --git -vpr . -Tjson | |
837 | [ |
|
837 | [ | |
838 | { |
|
838 | { | |
839 | "rev": 8, |
|
839 | "rev": 8, | |
840 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
840 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
841 | "branch": "default", |
|
841 | "branch": "default", | |
842 | "phase": "draft", |
|
842 | "phase": "draft", | |
843 | "user": "test", |
|
843 | "user": "test", | |
844 | "date": [1577872860, 0], |
|
844 | "date": [1577872860, 0], | |
845 | "desc": "third", |
|
845 | "desc": "third", | |
846 | "bookmarks": [], |
|
846 | "bookmarks": [], | |
847 | "tags": ["tip"], |
|
847 | "tags": ["tip"], | |
848 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
848 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
849 | "files": ["fourth", "second", "third"], |
|
849 | "files": ["fourth", "second", "third"], | |
850 | "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n" |
|
850 | "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n" | |
851 | } |
|
851 | } | |
852 | ] |
|
852 | ] | |
853 |
|
853 | |||
854 | $ hg log -T json |
|
854 | $ hg log -T json | |
855 | [ |
|
855 | [ | |
856 | { |
|
856 | { | |
857 | "rev": 8, |
|
857 | "rev": 8, | |
858 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
858 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
859 | "branch": "default", |
|
859 | "branch": "default", | |
860 | "phase": "draft", |
|
860 | "phase": "draft", | |
861 | "user": "test", |
|
861 | "user": "test", | |
862 | "date": [1577872860, 0], |
|
862 | "date": [1577872860, 0], | |
863 | "desc": "third", |
|
863 | "desc": "third", | |
864 | "bookmarks": [], |
|
864 | "bookmarks": [], | |
865 | "tags": ["tip"], |
|
865 | "tags": ["tip"], | |
866 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"] |
|
866 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"] | |
867 | }, |
|
867 | }, | |
868 | { |
|
868 | { | |
869 | "rev": 7, |
|
869 | "rev": 7, | |
870 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
870 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
871 | "branch": "default", |
|
871 | "branch": "default", | |
872 | "phase": "draft", |
|
872 | "phase": "draft", | |
873 | "user": "User Name <user@hostname>", |
|
873 | "user": "User Name <user@hostname>", | |
874 | "date": [1000000, 0], |
|
874 | "date": [1000000, 0], | |
875 | "desc": "second", |
|
875 | "desc": "second", | |
876 | "bookmarks": [], |
|
876 | "bookmarks": [], | |
877 | "tags": [], |
|
877 | "tags": [], | |
878 | "parents": ["0000000000000000000000000000000000000000"] |
|
878 | "parents": ["0000000000000000000000000000000000000000"] | |
879 | }, |
|
879 | }, | |
880 | { |
|
880 | { | |
881 | "rev": 6, |
|
881 | "rev": 6, | |
882 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
882 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
883 | "branch": "default", |
|
883 | "branch": "default", | |
884 | "phase": "draft", |
|
884 | "phase": "draft", | |
885 | "user": "person", |
|
885 | "user": "person", | |
886 | "date": [1500001, 0], |
|
886 | "date": [1500001, 0], | |
887 | "desc": "merge", |
|
887 | "desc": "merge", | |
888 | "bookmarks": [], |
|
888 | "bookmarks": [], | |
889 | "tags": [], |
|
889 | "tags": [], | |
890 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"] |
|
890 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"] | |
891 | }, |
|
891 | }, | |
892 | { |
|
892 | { | |
893 | "rev": 5, |
|
893 | "rev": 5, | |
894 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
894 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
895 | "branch": "default", |
|
895 | "branch": "default", | |
896 | "phase": "draft", |
|
896 | "phase": "draft", | |
897 | "user": "person", |
|
897 | "user": "person", | |
898 | "date": [1500000, 0], |
|
898 | "date": [1500000, 0], | |
899 | "desc": "new head", |
|
899 | "desc": "new head", | |
900 | "bookmarks": [], |
|
900 | "bookmarks": [], | |
901 | "tags": [], |
|
901 | "tags": [], | |
902 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] |
|
902 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] | |
903 | }, |
|
903 | }, | |
904 | { |
|
904 | { | |
905 | "rev": 4, |
|
905 | "rev": 4, | |
906 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
906 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
907 | "branch": "foo", |
|
907 | "branch": "foo", | |
908 | "phase": "draft", |
|
908 | "phase": "draft", | |
909 | "user": "person", |
|
909 | "user": "person", | |
910 | "date": [1400000, 0], |
|
910 | "date": [1400000, 0], | |
911 | "desc": "new branch", |
|
911 | "desc": "new branch", | |
912 | "bookmarks": [], |
|
912 | "bookmarks": [], | |
913 | "tags": [], |
|
913 | "tags": [], | |
914 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] |
|
914 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"] | |
915 | }, |
|
915 | }, | |
916 | { |
|
916 | { | |
917 | "rev": 3, |
|
917 | "rev": 3, | |
918 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
918 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
919 | "branch": "default", |
|
919 | "branch": "default", | |
920 | "phase": "draft", |
|
920 | "phase": "draft", | |
921 | "user": "person", |
|
921 | "user": "person", | |
922 | "date": [1300000, 0], |
|
922 | "date": [1300000, 0], | |
923 | "desc": "no user, no domain", |
|
923 | "desc": "no user, no domain", | |
924 | "bookmarks": [], |
|
924 | "bookmarks": [], | |
925 | "tags": [], |
|
925 | "tags": [], | |
926 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"] |
|
926 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"] | |
927 | }, |
|
927 | }, | |
928 | { |
|
928 | { | |
929 | "rev": 2, |
|
929 | "rev": 2, | |
930 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
930 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
931 | "branch": "default", |
|
931 | "branch": "default", | |
932 | "phase": "draft", |
|
932 | "phase": "draft", | |
933 | "user": "other@place", |
|
933 | "user": "other@place", | |
934 | "date": [1200000, 0], |
|
934 | "date": [1200000, 0], | |
935 | "desc": "no person", |
|
935 | "desc": "no person", | |
936 | "bookmarks": [], |
|
936 | "bookmarks": [], | |
937 | "tags": [], |
|
937 | "tags": [], | |
938 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"] |
|
938 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"] | |
939 | }, |
|
939 | }, | |
940 | { |
|
940 | { | |
941 | "rev": 1, |
|
941 | "rev": 1, | |
942 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
942 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
943 | "branch": "default", |
|
943 | "branch": "default", | |
944 | "phase": "draft", |
|
944 | "phase": "draft", | |
945 | "user": "A. N. Other <other@place>", |
|
945 | "user": "A. N. Other <other@place>", | |
946 | "date": [1100000, 0], |
|
946 | "date": [1100000, 0], | |
947 | "desc": "other 1\nother 2\n\nother 3", |
|
947 | "desc": "other 1\nother 2\n\nother 3", | |
948 | "bookmarks": [], |
|
948 | "bookmarks": [], | |
949 | "tags": [], |
|
949 | "tags": [], | |
950 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"] |
|
950 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"] | |
951 | }, |
|
951 | }, | |
952 | { |
|
952 | { | |
953 | "rev": 0, |
|
953 | "rev": 0, | |
954 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
954 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
955 | "branch": "default", |
|
955 | "branch": "default", | |
956 | "phase": "draft", |
|
956 | "phase": "draft", | |
957 | "user": "User Name <user@hostname>", |
|
957 | "user": "User Name <user@hostname>", | |
958 | "date": [1000000, 0], |
|
958 | "date": [1000000, 0], | |
959 | "desc": "line 1\nline 2", |
|
959 | "desc": "line 1\nline 2", | |
960 | "bookmarks": [], |
|
960 | "bookmarks": [], | |
961 | "tags": [], |
|
961 | "tags": [], | |
962 | "parents": ["0000000000000000000000000000000000000000"] |
|
962 | "parents": ["0000000000000000000000000000000000000000"] | |
963 | } |
|
963 | } | |
964 | ] |
|
964 | ] | |
965 |
|
965 | |||
966 | $ hg heads -v -Tjson |
|
966 | $ hg heads -v -Tjson | |
967 | [ |
|
967 | [ | |
968 | { |
|
968 | { | |
969 | "rev": 8, |
|
969 | "rev": 8, | |
970 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
970 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
971 | "branch": "default", |
|
971 | "branch": "default", | |
972 | "phase": "draft", |
|
972 | "phase": "draft", | |
973 | "user": "test", |
|
973 | "user": "test", | |
974 | "date": [1577872860, 0], |
|
974 | "date": [1577872860, 0], | |
975 | "desc": "third", |
|
975 | "desc": "third", | |
976 | "bookmarks": [], |
|
976 | "bookmarks": [], | |
977 | "tags": ["tip"], |
|
977 | "tags": ["tip"], | |
978 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
978 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
979 | "files": ["fourth", "second", "third"] |
|
979 | "files": ["fourth", "second", "third"] | |
980 | }, |
|
980 | }, | |
981 | { |
|
981 | { | |
982 | "rev": 6, |
|
982 | "rev": 6, | |
983 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
983 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
984 | "branch": "default", |
|
984 | "branch": "default", | |
985 | "phase": "draft", |
|
985 | "phase": "draft", | |
986 | "user": "person", |
|
986 | "user": "person", | |
987 | "date": [1500001, 0], |
|
987 | "date": [1500001, 0], | |
988 | "desc": "merge", |
|
988 | "desc": "merge", | |
989 | "bookmarks": [], |
|
989 | "bookmarks": [], | |
990 | "tags": [], |
|
990 | "tags": [], | |
991 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
991 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
992 | "files": [] |
|
992 | "files": [] | |
993 | }, |
|
993 | }, | |
994 | { |
|
994 | { | |
995 | "rev": 4, |
|
995 | "rev": 4, | |
996 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
996 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
997 | "branch": "foo", |
|
997 | "branch": "foo", | |
998 | "phase": "draft", |
|
998 | "phase": "draft", | |
999 | "user": "person", |
|
999 | "user": "person", | |
1000 | "date": [1400000, 0], |
|
1000 | "date": [1400000, 0], | |
1001 | "desc": "new branch", |
|
1001 | "desc": "new branch", | |
1002 | "bookmarks": [], |
|
1002 | "bookmarks": [], | |
1003 | "tags": [], |
|
1003 | "tags": [], | |
1004 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1004 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1005 | "files": [] |
|
1005 | "files": [] | |
1006 | } |
|
1006 | } | |
1007 | ] |
|
1007 | ] | |
1008 |
|
1008 | |||
1009 | $ hg log --debug -Tjson |
|
1009 | $ hg log --debug -Tjson | |
1010 | [ |
|
1010 | [ | |
1011 | { |
|
1011 | { | |
1012 | "rev": 8, |
|
1012 | "rev": 8, | |
1013 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", |
|
1013 | "node": "95c24699272ef57d062b8bccc32c878bf841784a", | |
1014 | "branch": "default", |
|
1014 | "branch": "default", | |
1015 | "phase": "draft", |
|
1015 | "phase": "draft", | |
1016 | "user": "test", |
|
1016 | "user": "test", | |
1017 | "date": [1577872860, 0], |
|
1017 | "date": [1577872860, 0], | |
1018 | "desc": "third", |
|
1018 | "desc": "third", | |
1019 | "bookmarks": [], |
|
1019 | "bookmarks": [], | |
1020 | "tags": ["tip"], |
|
1020 | "tags": ["tip"], | |
1021 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], |
|
1021 | "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"], | |
1022 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", |
|
1022 | "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64", | |
1023 | "extra": {"branch": "default"}, |
|
1023 | "extra": {"branch": "default"}, | |
1024 | "modified": [], |
|
1024 | "modified": [], | |
1025 | "added": ["fourth", "third"], |
|
1025 | "added": ["fourth", "third"], | |
1026 | "removed": ["second"] |
|
1026 | "removed": ["second"] | |
1027 | }, |
|
1027 | }, | |
1028 | { |
|
1028 | { | |
1029 | "rev": 7, |
|
1029 | "rev": 7, | |
1030 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", |
|
1030 | "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453", | |
1031 | "branch": "default", |
|
1031 | "branch": "default", | |
1032 | "phase": "draft", |
|
1032 | "phase": "draft", | |
1033 | "user": "User Name <user@hostname>", |
|
1033 | "user": "User Name <user@hostname>", | |
1034 | "date": [1000000, 0], |
|
1034 | "date": [1000000, 0], | |
1035 | "desc": "second", |
|
1035 | "desc": "second", | |
1036 | "bookmarks": [], |
|
1036 | "bookmarks": [], | |
1037 | "tags": [], |
|
1037 | "tags": [], | |
1038 | "parents": ["0000000000000000000000000000000000000000"], |
|
1038 | "parents": ["0000000000000000000000000000000000000000"], | |
1039 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", |
|
1039 | "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf", | |
1040 | "extra": {"branch": "default"}, |
|
1040 | "extra": {"branch": "default"}, | |
1041 | "modified": [], |
|
1041 | "modified": [], | |
1042 | "added": ["second"], |
|
1042 | "added": ["second"], | |
1043 | "removed": [] |
|
1043 | "removed": [] | |
1044 | }, |
|
1044 | }, | |
1045 | { |
|
1045 | { | |
1046 | "rev": 6, |
|
1046 | "rev": 6, | |
1047 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", |
|
1047 | "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b", | |
1048 | "branch": "default", |
|
1048 | "branch": "default", | |
1049 | "phase": "draft", |
|
1049 | "phase": "draft", | |
1050 | "user": "person", |
|
1050 | "user": "person", | |
1051 | "date": [1500001, 0], |
|
1051 | "date": [1500001, 0], | |
1052 | "desc": "merge", |
|
1052 | "desc": "merge", | |
1053 | "bookmarks": [], |
|
1053 | "bookmarks": [], | |
1054 | "tags": [], |
|
1054 | "tags": [], | |
1055 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], |
|
1055 | "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"], | |
1056 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1056 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1057 | "extra": {"branch": "default"}, |
|
1057 | "extra": {"branch": "default"}, | |
1058 | "modified": [], |
|
1058 | "modified": [], | |
1059 | "added": [], |
|
1059 | "added": [], | |
1060 | "removed": [] |
|
1060 | "removed": [] | |
1061 | }, |
|
1061 | }, | |
1062 | { |
|
1062 | { | |
1063 | "rev": 5, |
|
1063 | "rev": 5, | |
1064 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", |
|
1064 | "node": "13207e5a10d9fd28ec424934298e176197f2c67f", | |
1065 | "branch": "default", |
|
1065 | "branch": "default", | |
1066 | "phase": "draft", |
|
1066 | "phase": "draft", | |
1067 | "user": "person", |
|
1067 | "user": "person", | |
1068 | "date": [1500000, 0], |
|
1068 | "date": [1500000, 0], | |
1069 | "desc": "new head", |
|
1069 | "desc": "new head", | |
1070 | "bookmarks": [], |
|
1070 | "bookmarks": [], | |
1071 | "tags": [], |
|
1071 | "tags": [], | |
1072 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1072 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1073 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", |
|
1073 | "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216", | |
1074 | "extra": {"branch": "default"}, |
|
1074 | "extra": {"branch": "default"}, | |
1075 | "modified": [], |
|
1075 | "modified": [], | |
1076 | "added": ["d"], |
|
1076 | "added": ["d"], | |
1077 | "removed": [] |
|
1077 | "removed": [] | |
1078 | }, |
|
1078 | }, | |
1079 | { |
|
1079 | { | |
1080 | "rev": 4, |
|
1080 | "rev": 4, | |
1081 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", |
|
1081 | "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74", | |
1082 | "branch": "foo", |
|
1082 | "branch": "foo", | |
1083 | "phase": "draft", |
|
1083 | "phase": "draft", | |
1084 | "user": "person", |
|
1084 | "user": "person", | |
1085 | "date": [1400000, 0], |
|
1085 | "date": [1400000, 0], | |
1086 | "desc": "new branch", |
|
1086 | "desc": "new branch", | |
1087 | "bookmarks": [], |
|
1087 | "bookmarks": [], | |
1088 | "tags": [], |
|
1088 | "tags": [], | |
1089 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], |
|
1089 | "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"], | |
1090 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1090 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1091 | "extra": {"branch": "foo"}, |
|
1091 | "extra": {"branch": "foo"}, | |
1092 | "modified": [], |
|
1092 | "modified": [], | |
1093 | "added": [], |
|
1093 | "added": [], | |
1094 | "removed": [] |
|
1094 | "removed": [] | |
1095 | }, |
|
1095 | }, | |
1096 | { |
|
1096 | { | |
1097 | "rev": 3, |
|
1097 | "rev": 3, | |
1098 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", |
|
1098 | "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47", | |
1099 | "branch": "default", |
|
1099 | "branch": "default", | |
1100 | "phase": "draft", |
|
1100 | "phase": "draft", | |
1101 | "user": "person", |
|
1101 | "user": "person", | |
1102 | "date": [1300000, 0], |
|
1102 | "date": [1300000, 0], | |
1103 | "desc": "no user, no domain", |
|
1103 | "desc": "no user, no domain", | |
1104 | "bookmarks": [], |
|
1104 | "bookmarks": [], | |
1105 | "tags": [], |
|
1105 | "tags": [], | |
1106 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], |
|
1106 | "parents": ["97054abb4ab824450e9164180baf491ae0078465"], | |
1107 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", |
|
1107 | "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc", | |
1108 | "extra": {"branch": "default"}, |
|
1108 | "extra": {"branch": "default"}, | |
1109 | "modified": ["c"], |
|
1109 | "modified": ["c"], | |
1110 | "added": [], |
|
1110 | "added": [], | |
1111 | "removed": [] |
|
1111 | "removed": [] | |
1112 | }, |
|
1112 | }, | |
1113 | { |
|
1113 | { | |
1114 | "rev": 2, |
|
1114 | "rev": 2, | |
1115 | "node": "97054abb4ab824450e9164180baf491ae0078465", |
|
1115 | "node": "97054abb4ab824450e9164180baf491ae0078465", | |
1116 | "branch": "default", |
|
1116 | "branch": "default", | |
1117 | "phase": "draft", |
|
1117 | "phase": "draft", | |
1118 | "user": "other@place", |
|
1118 | "user": "other@place", | |
1119 | "date": [1200000, 0], |
|
1119 | "date": [1200000, 0], | |
1120 | "desc": "no person", |
|
1120 | "desc": "no person", | |
1121 | "bookmarks": [], |
|
1121 | "bookmarks": [], | |
1122 | "tags": [], |
|
1122 | "tags": [], | |
1123 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], |
|
1123 | "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"], | |
1124 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", |
|
1124 | "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1", | |
1125 | "extra": {"branch": "default"}, |
|
1125 | "extra": {"branch": "default"}, | |
1126 | "modified": [], |
|
1126 | "modified": [], | |
1127 | "added": ["c"], |
|
1127 | "added": ["c"], | |
1128 | "removed": [] |
|
1128 | "removed": [] | |
1129 | }, |
|
1129 | }, | |
1130 | { |
|
1130 | { | |
1131 | "rev": 1, |
|
1131 | "rev": 1, | |
1132 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", |
|
1132 | "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965", | |
1133 | "branch": "default", |
|
1133 | "branch": "default", | |
1134 | "phase": "draft", |
|
1134 | "phase": "draft", | |
1135 | "user": "A. N. Other <other@place>", |
|
1135 | "user": "A. N. Other <other@place>", | |
1136 | "date": [1100000, 0], |
|
1136 | "date": [1100000, 0], | |
1137 | "desc": "other 1\nother 2\n\nother 3", |
|
1137 | "desc": "other 1\nother 2\n\nother 3", | |
1138 | "bookmarks": [], |
|
1138 | "bookmarks": [], | |
1139 | "tags": [], |
|
1139 | "tags": [], | |
1140 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], |
|
1140 | "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"], | |
1141 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", |
|
1141 | "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55", | |
1142 | "extra": {"branch": "default"}, |
|
1142 | "extra": {"branch": "default"}, | |
1143 | "modified": [], |
|
1143 | "modified": [], | |
1144 | "added": ["b"], |
|
1144 | "added": ["b"], | |
1145 | "removed": [] |
|
1145 | "removed": [] | |
1146 | }, |
|
1146 | }, | |
1147 | { |
|
1147 | { | |
1148 | "rev": 0, |
|
1148 | "rev": 0, | |
1149 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", |
|
1149 | "node": "1e4e1b8f71e05681d422154f5421e385fec3454f", | |
1150 | "branch": "default", |
|
1150 | "branch": "default", | |
1151 | "phase": "draft", |
|
1151 | "phase": "draft", | |
1152 | "user": "User Name <user@hostname>", |
|
1152 | "user": "User Name <user@hostname>", | |
1153 | "date": [1000000, 0], |
|
1153 | "date": [1000000, 0], | |
1154 | "desc": "line 1\nline 2", |
|
1154 | "desc": "line 1\nline 2", | |
1155 | "bookmarks": [], |
|
1155 | "bookmarks": [], | |
1156 | "tags": [], |
|
1156 | "tags": [], | |
1157 | "parents": ["0000000000000000000000000000000000000000"], |
|
1157 | "parents": ["0000000000000000000000000000000000000000"], | |
1158 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", |
|
1158 | "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0", | |
1159 | "extra": {"branch": "default"}, |
|
1159 | "extra": {"branch": "default"}, | |
1160 | "modified": [], |
|
1160 | "modified": [], | |
1161 | "added": ["a"], |
|
1161 | "added": ["a"], | |
1162 | "removed": [] |
|
1162 | "removed": [] | |
1163 | } |
|
1163 | } | |
1164 | ] |
|
1164 | ] | |
1165 |
|
1165 | |||
1166 | Error if style not readable: |
|
1166 | Error if style not readable: | |
1167 |
|
1167 | |||
1168 | #if unix-permissions no-root |
|
1168 | #if unix-permissions no-root | |
1169 | $ touch q |
|
1169 | $ touch q | |
1170 | $ chmod 0 q |
|
1170 | $ chmod 0 q | |
1171 | $ hg log --style ./q |
|
1171 | $ hg log --style ./q | |
1172 | abort: Permission denied: ./q |
|
1172 | abort: Permission denied: ./q | |
1173 | [255] |
|
1173 | [255] | |
1174 | #endif |
|
1174 | #endif | |
1175 |
|
1175 | |||
1176 | Error if no style: |
|
1176 | Error if no style: | |
1177 |
|
1177 | |||
1178 | $ hg log --style notexist |
|
1178 | $ hg log --style notexist | |
1179 | abort: style 'notexist' not found |
|
1179 | abort: style 'notexist' not found | |
1180 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
1180 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
1181 | [255] |
|
1181 | [255] | |
1182 |
|
1182 | |||
1183 | $ hg log -T list |
|
1183 | $ hg log -T list | |
1184 | available styles: bisect, changelog, compact, default, phases, show, status, xml |
|
1184 | available styles: bisect, changelog, compact, default, phases, show, status, xml | |
1185 | abort: specify a template |
|
1185 | abort: specify a template | |
1186 | [255] |
|
1186 | [255] | |
1187 |
|
1187 | |||
1188 | Error if style missing key: |
|
1188 | Error if style missing key: | |
1189 |
|
1189 | |||
1190 | $ echo 'q = q' > t |
|
1190 | $ echo 'q = q' > t | |
1191 | $ hg log --style ./t |
|
1191 | $ hg log --style ./t | |
1192 | abort: "changeset" not in template map |
|
1192 | abort: "changeset" not in template map | |
1193 | [255] |
|
1193 | [255] | |
1194 |
|
1194 | |||
1195 | Error if style missing value: |
|
1195 | Error if style missing value: | |
1196 |
|
1196 | |||
1197 | $ echo 'changeset =' > t |
|
1197 | $ echo 'changeset =' > t | |
1198 | $ hg log --style t |
|
1198 | $ hg log --style t | |
1199 | hg: parse error at t:1: missing value |
|
1199 | hg: parse error at t:1: missing value | |
1200 | [255] |
|
1200 | [255] | |
1201 |
|
1201 | |||
1202 | Error if include fails: |
|
1202 | Error if include fails: | |
1203 |
|
1203 | |||
1204 | $ echo 'changeset = q' >> t |
|
1204 | $ echo 'changeset = q' >> t | |
1205 | #if unix-permissions no-root |
|
1205 | #if unix-permissions no-root | |
1206 | $ hg log --style ./t |
|
1206 | $ hg log --style ./t | |
1207 | abort: template file ./q: Permission denied |
|
1207 | abort: template file ./q: Permission denied | |
1208 | [255] |
|
1208 | [255] | |
1209 | $ rm -f q |
|
1209 | $ rm -f q | |
1210 | #endif |
|
1210 | #endif | |
1211 |
|
1211 | |||
1212 | Include works: |
|
1212 | Include works: | |
1213 |
|
1213 | |||
1214 | $ echo '{rev}' > q |
|
1214 | $ echo '{rev}' > q | |
1215 | $ hg log --style ./t |
|
1215 | $ hg log --style ./t | |
1216 | 8 |
|
1216 | 8 | |
1217 | 7 |
|
1217 | 7 | |
1218 | 6 |
|
1218 | 6 | |
1219 | 5 |
|
1219 | 5 | |
1220 | 4 |
|
1220 | 4 | |
1221 | 3 |
|
1221 | 3 | |
1222 | 2 |
|
1222 | 2 | |
1223 | 1 |
|
1223 | 1 | |
1224 | 0 |
|
1224 | 0 | |
1225 |
|
1225 | |||
1226 | Check that recursive reference does not fall into RuntimeError (issue4758): |
|
1226 | Check that recursive reference does not fall into RuntimeError (issue4758): | |
1227 |
|
1227 | |||
1228 | common mistake: |
|
1228 | common mistake: | |
1229 |
|
1229 | |||
1230 | $ cat << EOF > issue4758 |
|
1230 | $ cat << EOF > issue4758 | |
1231 | > changeset = '{changeset}\n' |
|
1231 | > changeset = '{changeset}\n' | |
1232 | > EOF |
|
1232 | > EOF | |
1233 | $ hg log --style ./issue4758 |
|
1233 | $ hg log --style ./issue4758 | |
1234 | abort: recursive reference 'changeset' in template |
|
1234 | abort: recursive reference 'changeset' in template | |
1235 | [255] |
|
1235 | [255] | |
1236 |
|
1236 | |||
1237 | circular reference: |
|
1237 | circular reference: | |
1238 |
|
1238 | |||
1239 | $ cat << EOF > issue4758 |
|
1239 | $ cat << EOF > issue4758 | |
1240 | > changeset = '{foo}' |
|
1240 | > changeset = '{foo}' | |
1241 | > foo = '{changeset}' |
|
1241 | > foo = '{changeset}' | |
1242 | > EOF |
|
1242 | > EOF | |
1243 | $ hg log --style ./issue4758 |
|
1243 | $ hg log --style ./issue4758 | |
1244 | abort: recursive reference 'foo' in template |
|
1244 | abort: recursive reference 'foo' in template | |
1245 | [255] |
|
1245 | [255] | |
1246 |
|
1246 | |||
1247 | buildmap() -> gettemplate(), where no thunk was made: |
|
1247 | buildmap() -> gettemplate(), where no thunk was made: | |
1248 |
|
1248 | |||
1249 | $ cat << EOF > issue4758 |
|
1249 | $ cat << EOF > issue4758 | |
1250 | > changeset = '{files % changeset}\n' |
|
1250 | > changeset = '{files % changeset}\n' | |
1251 | > EOF |
|
1251 | > EOF | |
1252 | $ hg log --style ./issue4758 |
|
1252 | $ hg log --style ./issue4758 | |
1253 | abort: recursive reference 'changeset' in template |
|
1253 | abort: recursive reference 'changeset' in template | |
1254 | [255] |
|
1254 | [255] | |
1255 |
|
1255 | |||
1256 | not a recursion if a keyword of the same name exists: |
|
1256 | not a recursion if a keyword of the same name exists: | |
1257 |
|
1257 | |||
1258 | $ cat << EOF > issue4758 |
|
1258 | $ cat << EOF > issue4758 | |
1259 | > changeset = '{tags % rev}' |
|
1259 | > changeset = '{tags % rev}' | |
1260 | > rev = '{rev} {tag}\n' |
|
1260 | > rev = '{rev} {tag}\n' | |
1261 | > EOF |
|
1261 | > EOF | |
1262 | $ hg log --style ./issue4758 -r tip |
|
1262 | $ hg log --style ./issue4758 -r tip | |
1263 | 8 tip |
|
1263 | 8 tip | |
1264 |
|
1264 | |||
1265 | Check that {phase} works correctly on parents: |
|
1265 | Check that {phase} works correctly on parents: | |
1266 |
|
1266 | |||
1267 | $ cat << EOF > parentphase |
|
1267 | $ cat << EOF > parentphase | |
1268 | > changeset_debug = '{rev} ({phase}):{parents}\n' |
|
1268 | > changeset_debug = '{rev} ({phase}):{parents}\n' | |
1269 | > parent = ' {rev} ({phase})' |
|
1269 | > parent = ' {rev} ({phase})' | |
1270 | > EOF |
|
1270 | > EOF | |
1271 | $ hg phase -r 5 --public |
|
1271 | $ hg phase -r 5 --public | |
1272 | $ hg phase -r 7 --secret --force |
|
1272 | $ hg phase -r 7 --secret --force | |
1273 | $ hg log --debug -G --style ./parentphase |
|
1273 | $ hg log --debug -G --style ./parentphase | |
1274 | @ 8 (secret): 7 (secret) -1 (public) |
|
1274 | @ 8 (secret): 7 (secret) -1 (public) | |
1275 | | |
|
1275 | | | |
1276 | o 7 (secret): -1 (public) -1 (public) |
|
1276 | o 7 (secret): -1 (public) -1 (public) | |
1277 |
|
1277 | |||
1278 | o 6 (draft): 5 (public) 4 (draft) |
|
1278 | o 6 (draft): 5 (public) 4 (draft) | |
1279 | |\ |
|
1279 | |\ | |
1280 | | o 5 (public): 3 (public) -1 (public) |
|
1280 | | o 5 (public): 3 (public) -1 (public) | |
1281 | | | |
|
1281 | | | | |
1282 | o | 4 (draft): 3 (public) -1 (public) |
|
1282 | o | 4 (draft): 3 (public) -1 (public) | |
1283 | |/ |
|
1283 | |/ | |
1284 | o 3 (public): 2 (public) -1 (public) |
|
1284 | o 3 (public): 2 (public) -1 (public) | |
1285 | | |
|
1285 | | | |
1286 | o 2 (public): 1 (public) -1 (public) |
|
1286 | o 2 (public): 1 (public) -1 (public) | |
1287 | | |
|
1287 | | | |
1288 | o 1 (public): 0 (public) -1 (public) |
|
1288 | o 1 (public): 0 (public) -1 (public) | |
1289 | | |
|
1289 | | | |
1290 | o 0 (public): -1 (public) -1 (public) |
|
1290 | o 0 (public): -1 (public) -1 (public) | |
1291 |
|
1291 | |||
1292 |
|
1292 | |||
1293 | Missing non-standard names give no error (backward compatibility): |
|
1293 | Missing non-standard names give no error (backward compatibility): | |
1294 |
|
1294 | |||
1295 | $ echo "changeset = '{c}'" > t |
|
1295 | $ echo "changeset = '{c}'" > t | |
1296 | $ hg log --style ./t |
|
1296 | $ hg log --style ./t | |
1297 |
|
1297 | |||
1298 | Defining non-standard name works: |
|
1298 | Defining non-standard name works: | |
1299 |
|
1299 | |||
1300 | $ cat <<EOF > t |
|
1300 | $ cat <<EOF > t | |
1301 | > changeset = '{c}' |
|
1301 | > changeset = '{c}' | |
1302 | > c = q |
|
1302 | > c = q | |
1303 | > EOF |
|
1303 | > EOF | |
1304 | $ hg log --style ./t |
|
1304 | $ hg log --style ./t | |
1305 | 8 |
|
1305 | 8 | |
1306 | 7 |
|
1306 | 7 | |
1307 | 6 |
|
1307 | 6 | |
1308 | 5 |
|
1308 | 5 | |
1309 | 4 |
|
1309 | 4 | |
1310 | 3 |
|
1310 | 3 | |
1311 | 2 |
|
1311 | 2 | |
1312 | 1 |
|
1312 | 1 | |
1313 | 0 |
|
1313 | 0 | |
1314 |
|
1314 | |||
1315 | ui.style works: |
|
1315 | ui.style works: | |
1316 |
|
1316 | |||
1317 | $ echo '[ui]' > .hg/hgrc |
|
1317 | $ echo '[ui]' > .hg/hgrc | |
1318 | $ echo 'style = t' >> .hg/hgrc |
|
1318 | $ echo 'style = t' >> .hg/hgrc | |
1319 | $ hg log |
|
1319 | $ hg log | |
1320 | 8 |
|
1320 | 8 | |
1321 | 7 |
|
1321 | 7 | |
1322 | 6 |
|
1322 | 6 | |
1323 | 5 |
|
1323 | 5 | |
1324 | 4 |
|
1324 | 4 | |
1325 | 3 |
|
1325 | 3 | |
1326 | 2 |
|
1326 | 2 | |
1327 | 1 |
|
1327 | 1 | |
1328 | 0 |
|
1328 | 0 | |
1329 |
|
1329 | |||
1330 |
|
1330 | |||
1331 | Issue338: |
|
1331 | Issue338: | |
1332 |
|
1332 | |||
1333 | $ hg log --style=changelog > changelog |
|
1333 | $ hg log --style=changelog > changelog | |
1334 |
|
1334 | |||
1335 | $ cat changelog |
|
1335 | $ cat changelog | |
1336 | 2020-01-01 test <test> |
|
1336 | 2020-01-01 test <test> | |
1337 |
|
1337 | |||
1338 | * fourth, second, third: |
|
1338 | * fourth, second, third: | |
1339 | third |
|
1339 | third | |
1340 | [95c24699272e] [tip] |
|
1340 | [95c24699272e] [tip] | |
1341 |
|
1341 | |||
1342 | 1970-01-12 User Name <user@hostname> |
|
1342 | 1970-01-12 User Name <user@hostname> | |
1343 |
|
1343 | |||
1344 | * second: |
|
1344 | * second: | |
1345 | second |
|
1345 | second | |
1346 | [29114dbae42b] |
|
1346 | [29114dbae42b] | |
1347 |
|
1347 | |||
1348 | 1970-01-18 person <person> |
|
1348 | 1970-01-18 person <person> | |
1349 |
|
1349 | |||
1350 | * merge |
|
1350 | * merge | |
1351 | [d41e714fe50d] |
|
1351 | [d41e714fe50d] | |
1352 |
|
1352 | |||
1353 | * d: |
|
1353 | * d: | |
1354 | new head |
|
1354 | new head | |
1355 | [13207e5a10d9] |
|
1355 | [13207e5a10d9] | |
1356 |
|
1356 | |||
1357 | 1970-01-17 person <person> |
|
1357 | 1970-01-17 person <person> | |
1358 |
|
1358 | |||
1359 | * new branch |
|
1359 | * new branch | |
1360 | [bbe44766e73d] <foo> |
|
1360 | [bbe44766e73d] <foo> | |
1361 |
|
1361 | |||
1362 | 1970-01-16 person <person> |
|
1362 | 1970-01-16 person <person> | |
1363 |
|
1363 | |||
1364 | * c: |
|
1364 | * c: | |
1365 | no user, no domain |
|
1365 | no user, no domain | |
1366 | [10e46f2dcbf4] |
|
1366 | [10e46f2dcbf4] | |
1367 |
|
1367 | |||
1368 | 1970-01-14 other <other@place> |
|
1368 | 1970-01-14 other <other@place> | |
1369 |
|
1369 | |||
1370 | * c: |
|
1370 | * c: | |
1371 | no person |
|
1371 | no person | |
1372 | [97054abb4ab8] |
|
1372 | [97054abb4ab8] | |
1373 |
|
1373 | |||
1374 | 1970-01-13 A. N. Other <other@place> |
|
1374 | 1970-01-13 A. N. Other <other@place> | |
1375 |
|
1375 | |||
1376 | * b: |
|
1376 | * b: | |
1377 | other 1 other 2 |
|
1377 | other 1 other 2 | |
1378 |
|
1378 | |||
1379 | other 3 |
|
1379 | other 3 | |
1380 | [b608e9d1a3f0] |
|
1380 | [b608e9d1a3f0] | |
1381 |
|
1381 | |||
1382 | 1970-01-12 User Name <user@hostname> |
|
1382 | 1970-01-12 User Name <user@hostname> | |
1383 |
|
1383 | |||
1384 | * a: |
|
1384 | * a: | |
1385 | line 1 line 2 |
|
1385 | line 1 line 2 | |
1386 | [1e4e1b8f71e0] |
|
1386 | [1e4e1b8f71e0] | |
1387 |
|
1387 | |||
1388 |
|
1388 | |||
1389 | Issue2130: xml output for 'hg heads' is malformed |
|
1389 | Issue2130: xml output for 'hg heads' is malformed | |
1390 |
|
1390 | |||
1391 | $ hg heads --style changelog |
|
1391 | $ hg heads --style changelog | |
1392 | 2020-01-01 test <test> |
|
1392 | 2020-01-01 test <test> | |
1393 |
|
1393 | |||
1394 | * fourth, second, third: |
|
1394 | * fourth, second, third: | |
1395 | third |
|
1395 | third | |
1396 | [95c24699272e] [tip] |
|
1396 | [95c24699272e] [tip] | |
1397 |
|
1397 | |||
1398 | 1970-01-18 person <person> |
|
1398 | 1970-01-18 person <person> | |
1399 |
|
1399 | |||
1400 | * merge |
|
1400 | * merge | |
1401 | [d41e714fe50d] |
|
1401 | [d41e714fe50d] | |
1402 |
|
1402 | |||
1403 | 1970-01-17 person <person> |
|
1403 | 1970-01-17 person <person> | |
1404 |
|
1404 | |||
1405 | * new branch |
|
1405 | * new branch | |
1406 | [bbe44766e73d] <foo> |
|
1406 | [bbe44766e73d] <foo> | |
1407 |
|
1407 | |||
1408 |
|
1408 | |||
1409 | Keys work: |
|
1409 | Keys work: | |
1410 |
|
1410 | |||
1411 | $ for key in author branch branches date desc file_adds file_dels file_mods \ |
|
1411 | $ for key in author branch branches date desc file_adds file_dels file_mods \ | |
1412 | > file_copies file_copies_switch files \ |
|
1412 | > file_copies file_copies_switch files \ | |
1413 | > manifest node parents rev tags diffstat extras \ |
|
1413 | > manifest node parents rev tags diffstat extras \ | |
1414 | > p1rev p2rev p1node p2node; do |
|
1414 | > p1rev p2rev p1node p2node; do | |
1415 | > for mode in '' --verbose --debug; do |
|
1415 | > for mode in '' --verbose --debug; do | |
1416 | > hg log $mode --template "$key$mode: {$key}\n" |
|
1416 | > hg log $mode --template "$key$mode: {$key}\n" | |
1417 | > done |
|
1417 | > done | |
1418 | > done |
|
1418 | > done | |
1419 | author: test |
|
1419 | author: test | |
1420 | author: User Name <user@hostname> |
|
1420 | author: User Name <user@hostname> | |
1421 | author: person |
|
1421 | author: person | |
1422 | author: person |
|
1422 | author: person | |
1423 | author: person |
|
1423 | author: person | |
1424 | author: person |
|
1424 | author: person | |
1425 | author: other@place |
|
1425 | author: other@place | |
1426 | author: A. N. Other <other@place> |
|
1426 | author: A. N. Other <other@place> | |
1427 | author: User Name <user@hostname> |
|
1427 | author: User Name <user@hostname> | |
1428 | author--verbose: test |
|
1428 | author--verbose: test | |
1429 | author--verbose: User Name <user@hostname> |
|
1429 | author--verbose: User Name <user@hostname> | |
1430 | author--verbose: person |
|
1430 | author--verbose: person | |
1431 | author--verbose: person |
|
1431 | author--verbose: person | |
1432 | author--verbose: person |
|
1432 | author--verbose: person | |
1433 | author--verbose: person |
|
1433 | author--verbose: person | |
1434 | author--verbose: other@place |
|
1434 | author--verbose: other@place | |
1435 | author--verbose: A. N. Other <other@place> |
|
1435 | author--verbose: A. N. Other <other@place> | |
1436 | author--verbose: User Name <user@hostname> |
|
1436 | author--verbose: User Name <user@hostname> | |
1437 | author--debug: test |
|
1437 | author--debug: test | |
1438 | author--debug: User Name <user@hostname> |
|
1438 | author--debug: User Name <user@hostname> | |
1439 | author--debug: person |
|
1439 | author--debug: person | |
1440 | author--debug: person |
|
1440 | author--debug: person | |
1441 | author--debug: person |
|
1441 | author--debug: person | |
1442 | author--debug: person |
|
1442 | author--debug: person | |
1443 | author--debug: other@place |
|
1443 | author--debug: other@place | |
1444 | author--debug: A. N. Other <other@place> |
|
1444 | author--debug: A. N. Other <other@place> | |
1445 | author--debug: User Name <user@hostname> |
|
1445 | author--debug: User Name <user@hostname> | |
1446 | branch: default |
|
1446 | branch: default | |
1447 | branch: default |
|
1447 | branch: default | |
1448 | branch: default |
|
1448 | branch: default | |
1449 | branch: default |
|
1449 | branch: default | |
1450 | branch: foo |
|
1450 | branch: foo | |
1451 | branch: default |
|
1451 | branch: default | |
1452 | branch: default |
|
1452 | branch: default | |
1453 | branch: default |
|
1453 | branch: default | |
1454 | branch: default |
|
1454 | branch: default | |
1455 | branch--verbose: default |
|
1455 | branch--verbose: default | |
1456 | branch--verbose: default |
|
1456 | branch--verbose: default | |
1457 | branch--verbose: default |
|
1457 | branch--verbose: default | |
1458 | branch--verbose: default |
|
1458 | branch--verbose: default | |
1459 | branch--verbose: foo |
|
1459 | branch--verbose: foo | |
1460 | branch--verbose: default |
|
1460 | branch--verbose: default | |
1461 | branch--verbose: default |
|
1461 | branch--verbose: default | |
1462 | branch--verbose: default |
|
1462 | branch--verbose: default | |
1463 | branch--verbose: default |
|
1463 | branch--verbose: default | |
1464 | branch--debug: default |
|
1464 | branch--debug: default | |
1465 | branch--debug: default |
|
1465 | branch--debug: default | |
1466 | branch--debug: default |
|
1466 | branch--debug: default | |
1467 | branch--debug: default |
|
1467 | branch--debug: default | |
1468 | branch--debug: foo |
|
1468 | branch--debug: foo | |
1469 | branch--debug: default |
|
1469 | branch--debug: default | |
1470 | branch--debug: default |
|
1470 | branch--debug: default | |
1471 | branch--debug: default |
|
1471 | branch--debug: default | |
1472 | branch--debug: default |
|
1472 | branch--debug: default | |
1473 | branches: |
|
1473 | branches: | |
1474 | branches: |
|
1474 | branches: | |
1475 | branches: |
|
1475 | branches: | |
1476 | branches: |
|
1476 | branches: | |
1477 | branches: foo |
|
1477 | branches: foo | |
1478 | branches: |
|
1478 | branches: | |
1479 | branches: |
|
1479 | branches: | |
1480 | branches: |
|
1480 | branches: | |
1481 | branches: |
|
1481 | branches: | |
1482 | branches--verbose: |
|
1482 | branches--verbose: | |
1483 | branches--verbose: |
|
1483 | branches--verbose: | |
1484 | branches--verbose: |
|
1484 | branches--verbose: | |
1485 | branches--verbose: |
|
1485 | branches--verbose: | |
1486 | branches--verbose: foo |
|
1486 | branches--verbose: foo | |
1487 | branches--verbose: |
|
1487 | branches--verbose: | |
1488 | branches--verbose: |
|
1488 | branches--verbose: | |
1489 | branches--verbose: |
|
1489 | branches--verbose: | |
1490 | branches--verbose: |
|
1490 | branches--verbose: | |
1491 | branches--debug: |
|
1491 | branches--debug: | |
1492 | branches--debug: |
|
1492 | branches--debug: | |
1493 | branches--debug: |
|
1493 | branches--debug: | |
1494 | branches--debug: |
|
1494 | branches--debug: | |
1495 | branches--debug: foo |
|
1495 | branches--debug: foo | |
1496 | branches--debug: |
|
1496 | branches--debug: | |
1497 | branches--debug: |
|
1497 | branches--debug: | |
1498 | branches--debug: |
|
1498 | branches--debug: | |
1499 | branches--debug: |
|
1499 | branches--debug: | |
1500 | date: 1577872860.00 |
|
1500 | date: 1577872860.00 | |
1501 | date: 1000000.00 |
|
1501 | date: 1000000.00 | |
1502 | date: 1500001.00 |
|
1502 | date: 1500001.00 | |
1503 | date: 1500000.00 |
|
1503 | date: 1500000.00 | |
1504 | date: 1400000.00 |
|
1504 | date: 1400000.00 | |
1505 | date: 1300000.00 |
|
1505 | date: 1300000.00 | |
1506 | date: 1200000.00 |
|
1506 | date: 1200000.00 | |
1507 | date: 1100000.00 |
|
1507 | date: 1100000.00 | |
1508 | date: 1000000.00 |
|
1508 | date: 1000000.00 | |
1509 | date--verbose: 1577872860.00 |
|
1509 | date--verbose: 1577872860.00 | |
1510 | date--verbose: 1000000.00 |
|
1510 | date--verbose: 1000000.00 | |
1511 | date--verbose: 1500001.00 |
|
1511 | date--verbose: 1500001.00 | |
1512 | date--verbose: 1500000.00 |
|
1512 | date--verbose: 1500000.00 | |
1513 | date--verbose: 1400000.00 |
|
1513 | date--verbose: 1400000.00 | |
1514 | date--verbose: 1300000.00 |
|
1514 | date--verbose: 1300000.00 | |
1515 | date--verbose: 1200000.00 |
|
1515 | date--verbose: 1200000.00 | |
1516 | date--verbose: 1100000.00 |
|
1516 | date--verbose: 1100000.00 | |
1517 | date--verbose: 1000000.00 |
|
1517 | date--verbose: 1000000.00 | |
1518 | date--debug: 1577872860.00 |
|
1518 | date--debug: 1577872860.00 | |
1519 | date--debug: 1000000.00 |
|
1519 | date--debug: 1000000.00 | |
1520 | date--debug: 1500001.00 |
|
1520 | date--debug: 1500001.00 | |
1521 | date--debug: 1500000.00 |
|
1521 | date--debug: 1500000.00 | |
1522 | date--debug: 1400000.00 |
|
1522 | date--debug: 1400000.00 | |
1523 | date--debug: 1300000.00 |
|
1523 | date--debug: 1300000.00 | |
1524 | date--debug: 1200000.00 |
|
1524 | date--debug: 1200000.00 | |
1525 | date--debug: 1100000.00 |
|
1525 | date--debug: 1100000.00 | |
1526 | date--debug: 1000000.00 |
|
1526 | date--debug: 1000000.00 | |
1527 | desc: third |
|
1527 | desc: third | |
1528 | desc: second |
|
1528 | desc: second | |
1529 | desc: merge |
|
1529 | desc: merge | |
1530 | desc: new head |
|
1530 | desc: new head | |
1531 | desc: new branch |
|
1531 | desc: new branch | |
1532 | desc: no user, no domain |
|
1532 | desc: no user, no domain | |
1533 | desc: no person |
|
1533 | desc: no person | |
1534 | desc: other 1 |
|
1534 | desc: other 1 | |
1535 | other 2 |
|
1535 | other 2 | |
1536 |
|
1536 | |||
1537 | other 3 |
|
1537 | other 3 | |
1538 | desc: line 1 |
|
1538 | desc: line 1 | |
1539 | line 2 |
|
1539 | line 2 | |
1540 | desc--verbose: third |
|
1540 | desc--verbose: third | |
1541 | desc--verbose: second |
|
1541 | desc--verbose: second | |
1542 | desc--verbose: merge |
|
1542 | desc--verbose: merge | |
1543 | desc--verbose: new head |
|
1543 | desc--verbose: new head | |
1544 | desc--verbose: new branch |
|
1544 | desc--verbose: new branch | |
1545 | desc--verbose: no user, no domain |
|
1545 | desc--verbose: no user, no domain | |
1546 | desc--verbose: no person |
|
1546 | desc--verbose: no person | |
1547 | desc--verbose: other 1 |
|
1547 | desc--verbose: other 1 | |
1548 | other 2 |
|
1548 | other 2 | |
1549 |
|
1549 | |||
1550 | other 3 |
|
1550 | other 3 | |
1551 | desc--verbose: line 1 |
|
1551 | desc--verbose: line 1 | |
1552 | line 2 |
|
1552 | line 2 | |
1553 | desc--debug: third |
|
1553 | desc--debug: third | |
1554 | desc--debug: second |
|
1554 | desc--debug: second | |
1555 | desc--debug: merge |
|
1555 | desc--debug: merge | |
1556 | desc--debug: new head |
|
1556 | desc--debug: new head | |
1557 | desc--debug: new branch |
|
1557 | desc--debug: new branch | |
1558 | desc--debug: no user, no domain |
|
1558 | desc--debug: no user, no domain | |
1559 | desc--debug: no person |
|
1559 | desc--debug: no person | |
1560 | desc--debug: other 1 |
|
1560 | desc--debug: other 1 | |
1561 | other 2 |
|
1561 | other 2 | |
1562 |
|
1562 | |||
1563 | other 3 |
|
1563 | other 3 | |
1564 | desc--debug: line 1 |
|
1564 | desc--debug: line 1 | |
1565 | line 2 |
|
1565 | line 2 | |
1566 | file_adds: fourth third |
|
1566 | file_adds: fourth third | |
1567 | file_adds: second |
|
1567 | file_adds: second | |
1568 | file_adds: |
|
1568 | file_adds: | |
1569 | file_adds: d |
|
1569 | file_adds: d | |
1570 | file_adds: |
|
1570 | file_adds: | |
1571 | file_adds: |
|
1571 | file_adds: | |
1572 | file_adds: c |
|
1572 | file_adds: c | |
1573 | file_adds: b |
|
1573 | file_adds: b | |
1574 | file_adds: a |
|
1574 | file_adds: a | |
1575 | file_adds--verbose: fourth third |
|
1575 | file_adds--verbose: fourth third | |
1576 | file_adds--verbose: second |
|
1576 | file_adds--verbose: second | |
1577 | file_adds--verbose: |
|
1577 | file_adds--verbose: | |
1578 | file_adds--verbose: d |
|
1578 | file_adds--verbose: d | |
1579 | file_adds--verbose: |
|
1579 | file_adds--verbose: | |
1580 | file_adds--verbose: |
|
1580 | file_adds--verbose: | |
1581 | file_adds--verbose: c |
|
1581 | file_adds--verbose: c | |
1582 | file_adds--verbose: b |
|
1582 | file_adds--verbose: b | |
1583 | file_adds--verbose: a |
|
1583 | file_adds--verbose: a | |
1584 | file_adds--debug: fourth third |
|
1584 | file_adds--debug: fourth third | |
1585 | file_adds--debug: second |
|
1585 | file_adds--debug: second | |
1586 | file_adds--debug: |
|
1586 | file_adds--debug: | |
1587 | file_adds--debug: d |
|
1587 | file_adds--debug: d | |
1588 | file_adds--debug: |
|
1588 | file_adds--debug: | |
1589 | file_adds--debug: |
|
1589 | file_adds--debug: | |
1590 | file_adds--debug: c |
|
1590 | file_adds--debug: c | |
1591 | file_adds--debug: b |
|
1591 | file_adds--debug: b | |
1592 | file_adds--debug: a |
|
1592 | file_adds--debug: a | |
1593 | file_dels: second |
|
1593 | file_dels: second | |
1594 | file_dels: |
|
1594 | file_dels: | |
1595 | file_dels: |
|
1595 | file_dels: | |
1596 | file_dels: |
|
1596 | file_dels: | |
1597 | file_dels: |
|
1597 | file_dels: | |
1598 | file_dels: |
|
1598 | file_dels: | |
1599 | file_dels: |
|
1599 | file_dels: | |
1600 | file_dels: |
|
1600 | file_dels: | |
1601 | file_dels: |
|
1601 | file_dels: | |
1602 | file_dels--verbose: second |
|
1602 | file_dels--verbose: second | |
1603 | file_dels--verbose: |
|
1603 | file_dels--verbose: | |
1604 | file_dels--verbose: |
|
1604 | file_dels--verbose: | |
1605 | file_dels--verbose: |
|
1605 | file_dels--verbose: | |
1606 | file_dels--verbose: |
|
1606 | file_dels--verbose: | |
1607 | file_dels--verbose: |
|
1607 | file_dels--verbose: | |
1608 | file_dels--verbose: |
|
1608 | file_dels--verbose: | |
1609 | file_dels--verbose: |
|
1609 | file_dels--verbose: | |
1610 | file_dels--verbose: |
|
1610 | file_dels--verbose: | |
1611 | file_dels--debug: second |
|
1611 | file_dels--debug: second | |
1612 | file_dels--debug: |
|
1612 | file_dels--debug: | |
1613 | file_dels--debug: |
|
1613 | file_dels--debug: | |
1614 | file_dels--debug: |
|
1614 | file_dels--debug: | |
1615 | file_dels--debug: |
|
1615 | file_dels--debug: | |
1616 | file_dels--debug: |
|
1616 | file_dels--debug: | |
1617 | file_dels--debug: |
|
1617 | file_dels--debug: | |
1618 | file_dels--debug: |
|
1618 | file_dels--debug: | |
1619 | file_dels--debug: |
|
1619 | file_dels--debug: | |
1620 | file_mods: |
|
1620 | file_mods: | |
1621 | file_mods: |
|
1621 | file_mods: | |
1622 | file_mods: |
|
1622 | file_mods: | |
1623 | file_mods: |
|
1623 | file_mods: | |
1624 | file_mods: |
|
1624 | file_mods: | |
1625 | file_mods: c |
|
1625 | file_mods: c | |
1626 | file_mods: |
|
1626 | file_mods: | |
1627 | file_mods: |
|
1627 | file_mods: | |
1628 | file_mods: |
|
1628 | file_mods: | |
1629 | file_mods--verbose: |
|
1629 | file_mods--verbose: | |
1630 | file_mods--verbose: |
|
1630 | file_mods--verbose: | |
1631 | file_mods--verbose: |
|
1631 | file_mods--verbose: | |
1632 | file_mods--verbose: |
|
1632 | file_mods--verbose: | |
1633 | file_mods--verbose: |
|
1633 | file_mods--verbose: | |
1634 | file_mods--verbose: c |
|
1634 | file_mods--verbose: c | |
1635 | file_mods--verbose: |
|
1635 | file_mods--verbose: | |
1636 | file_mods--verbose: |
|
1636 | file_mods--verbose: | |
1637 | file_mods--verbose: |
|
1637 | file_mods--verbose: | |
1638 | file_mods--debug: |
|
1638 | file_mods--debug: | |
1639 | file_mods--debug: |
|
1639 | file_mods--debug: | |
1640 | file_mods--debug: |
|
1640 | file_mods--debug: | |
1641 | file_mods--debug: |
|
1641 | file_mods--debug: | |
1642 | file_mods--debug: |
|
1642 | file_mods--debug: | |
1643 | file_mods--debug: c |
|
1643 | file_mods--debug: c | |
1644 | file_mods--debug: |
|
1644 | file_mods--debug: | |
1645 | file_mods--debug: |
|
1645 | file_mods--debug: | |
1646 | file_mods--debug: |
|
1646 | file_mods--debug: | |
1647 | file_copies: fourth (second) |
|
1647 | file_copies: fourth (second) | |
1648 | file_copies: |
|
1648 | file_copies: | |
1649 | file_copies: |
|
1649 | file_copies: | |
1650 | file_copies: |
|
1650 | file_copies: | |
1651 | file_copies: |
|
1651 | file_copies: | |
1652 | file_copies: |
|
1652 | file_copies: | |
1653 | file_copies: |
|
1653 | file_copies: | |
1654 | file_copies: |
|
1654 | file_copies: | |
1655 | file_copies: |
|
1655 | file_copies: | |
1656 | file_copies--verbose: fourth (second) |
|
1656 | file_copies--verbose: fourth (second) | |
1657 | file_copies--verbose: |
|
1657 | file_copies--verbose: | |
1658 | file_copies--verbose: |
|
1658 | file_copies--verbose: | |
1659 | file_copies--verbose: |
|
1659 | file_copies--verbose: | |
1660 | file_copies--verbose: |
|
1660 | file_copies--verbose: | |
1661 | file_copies--verbose: |
|
1661 | file_copies--verbose: | |
1662 | file_copies--verbose: |
|
1662 | file_copies--verbose: | |
1663 | file_copies--verbose: |
|
1663 | file_copies--verbose: | |
1664 | file_copies--verbose: |
|
1664 | file_copies--verbose: | |
1665 | file_copies--debug: fourth (second) |
|
1665 | file_copies--debug: fourth (second) | |
1666 | file_copies--debug: |
|
1666 | file_copies--debug: | |
1667 | file_copies--debug: |
|
1667 | file_copies--debug: | |
1668 | file_copies--debug: |
|
1668 | file_copies--debug: | |
1669 | file_copies--debug: |
|
1669 | file_copies--debug: | |
1670 | file_copies--debug: |
|
1670 | file_copies--debug: | |
1671 | file_copies--debug: |
|
1671 | file_copies--debug: | |
1672 | file_copies--debug: |
|
1672 | file_copies--debug: | |
1673 | file_copies--debug: |
|
1673 | file_copies--debug: | |
1674 | file_copies_switch: |
|
1674 | file_copies_switch: | |
1675 | file_copies_switch: |
|
1675 | file_copies_switch: | |
1676 | file_copies_switch: |
|
1676 | file_copies_switch: | |
1677 | file_copies_switch: |
|
1677 | file_copies_switch: | |
1678 | file_copies_switch: |
|
1678 | file_copies_switch: | |
1679 | file_copies_switch: |
|
1679 | file_copies_switch: | |
1680 | file_copies_switch: |
|
1680 | file_copies_switch: | |
1681 | file_copies_switch: |
|
1681 | file_copies_switch: | |
1682 | file_copies_switch: |
|
1682 | file_copies_switch: | |
1683 | file_copies_switch--verbose: |
|
1683 | file_copies_switch--verbose: | |
1684 | file_copies_switch--verbose: |
|
1684 | file_copies_switch--verbose: | |
1685 | file_copies_switch--verbose: |
|
1685 | file_copies_switch--verbose: | |
1686 | file_copies_switch--verbose: |
|
1686 | file_copies_switch--verbose: | |
1687 | file_copies_switch--verbose: |
|
1687 | file_copies_switch--verbose: | |
1688 | file_copies_switch--verbose: |
|
1688 | file_copies_switch--verbose: | |
1689 | file_copies_switch--verbose: |
|
1689 | file_copies_switch--verbose: | |
1690 | file_copies_switch--verbose: |
|
1690 | file_copies_switch--verbose: | |
1691 | file_copies_switch--verbose: |
|
1691 | file_copies_switch--verbose: | |
1692 | file_copies_switch--debug: |
|
1692 | file_copies_switch--debug: | |
1693 | file_copies_switch--debug: |
|
1693 | file_copies_switch--debug: | |
1694 | file_copies_switch--debug: |
|
1694 | file_copies_switch--debug: | |
1695 | file_copies_switch--debug: |
|
1695 | file_copies_switch--debug: | |
1696 | file_copies_switch--debug: |
|
1696 | file_copies_switch--debug: | |
1697 | file_copies_switch--debug: |
|
1697 | file_copies_switch--debug: | |
1698 | file_copies_switch--debug: |
|
1698 | file_copies_switch--debug: | |
1699 | file_copies_switch--debug: |
|
1699 | file_copies_switch--debug: | |
1700 | file_copies_switch--debug: |
|
1700 | file_copies_switch--debug: | |
1701 | files: fourth second third |
|
1701 | files: fourth second third | |
1702 | files: second |
|
1702 | files: second | |
1703 | files: |
|
1703 | files: | |
1704 | files: d |
|
1704 | files: d | |
1705 | files: |
|
1705 | files: | |
1706 | files: c |
|
1706 | files: c | |
1707 | files: c |
|
1707 | files: c | |
1708 | files: b |
|
1708 | files: b | |
1709 | files: a |
|
1709 | files: a | |
1710 | files--verbose: fourth second third |
|
1710 | files--verbose: fourth second third | |
1711 | files--verbose: second |
|
1711 | files--verbose: second | |
1712 | files--verbose: |
|
1712 | files--verbose: | |
1713 | files--verbose: d |
|
1713 | files--verbose: d | |
1714 | files--verbose: |
|
1714 | files--verbose: | |
1715 | files--verbose: c |
|
1715 | files--verbose: c | |
1716 | files--verbose: c |
|
1716 | files--verbose: c | |
1717 | files--verbose: b |
|
1717 | files--verbose: b | |
1718 | files--verbose: a |
|
1718 | files--verbose: a | |
1719 | files--debug: fourth second third |
|
1719 | files--debug: fourth second third | |
1720 | files--debug: second |
|
1720 | files--debug: second | |
1721 | files--debug: |
|
1721 | files--debug: | |
1722 | files--debug: d |
|
1722 | files--debug: d | |
1723 | files--debug: |
|
1723 | files--debug: | |
1724 | files--debug: c |
|
1724 | files--debug: c | |
1725 | files--debug: c |
|
1725 | files--debug: c | |
1726 | files--debug: b |
|
1726 | files--debug: b | |
1727 | files--debug: a |
|
1727 | files--debug: a | |
1728 | manifest: 6:94961b75a2da |
|
1728 | manifest: 6:94961b75a2da | |
1729 | manifest: 5:f2dbc354b94e |
|
1729 | manifest: 5:f2dbc354b94e | |
1730 | manifest: 4:4dc3def4f9b4 |
|
1730 | manifest: 4:4dc3def4f9b4 | |
1731 | manifest: 4:4dc3def4f9b4 |
|
1731 | manifest: 4:4dc3def4f9b4 | |
1732 | manifest: 3:cb5a1327723b |
|
1732 | manifest: 3:cb5a1327723b | |
1733 | manifest: 3:cb5a1327723b |
|
1733 | manifest: 3:cb5a1327723b | |
1734 | manifest: 2:6e0e82995c35 |
|
1734 | manifest: 2:6e0e82995c35 | |
1735 | manifest: 1:4e8d705b1e53 |
|
1735 | manifest: 1:4e8d705b1e53 | |
1736 | manifest: 0:a0c8bcbbb45c |
|
1736 | manifest: 0:a0c8bcbbb45c | |
1737 | manifest--verbose: 6:94961b75a2da |
|
1737 | manifest--verbose: 6:94961b75a2da | |
1738 | manifest--verbose: 5:f2dbc354b94e |
|
1738 | manifest--verbose: 5:f2dbc354b94e | |
1739 | manifest--verbose: 4:4dc3def4f9b4 |
|
1739 | manifest--verbose: 4:4dc3def4f9b4 | |
1740 | manifest--verbose: 4:4dc3def4f9b4 |
|
1740 | manifest--verbose: 4:4dc3def4f9b4 | |
1741 | manifest--verbose: 3:cb5a1327723b |
|
1741 | manifest--verbose: 3:cb5a1327723b | |
1742 | manifest--verbose: 3:cb5a1327723b |
|
1742 | manifest--verbose: 3:cb5a1327723b | |
1743 | manifest--verbose: 2:6e0e82995c35 |
|
1743 | manifest--verbose: 2:6e0e82995c35 | |
1744 | manifest--verbose: 1:4e8d705b1e53 |
|
1744 | manifest--verbose: 1:4e8d705b1e53 | |
1745 | manifest--verbose: 0:a0c8bcbbb45c |
|
1745 | manifest--verbose: 0:a0c8bcbbb45c | |
1746 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 |
|
1746 | manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64 | |
1747 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf |
|
1747 | manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf | |
1748 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
1748 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1749 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 |
|
1749 | manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216 | |
1750 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1750 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1751 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
1751 | manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
1752 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
1752 | manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
1753 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
1753 | manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
1754 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
1754 | manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
1755 | node: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1755 | node: 95c24699272ef57d062b8bccc32c878bf841784a | |
1756 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1756 | node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1757 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1757 | node: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1758 | node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1758 | node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1759 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1759 | node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1760 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1760 | node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1761 | node: 97054abb4ab824450e9164180baf491ae0078465 |
|
1761 | node: 97054abb4ab824450e9164180baf491ae0078465 | |
1762 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1762 | node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1763 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1763 | node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1764 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1764 | node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a | |
1765 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1765 | node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1766 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1766 | node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1767 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1767 | node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1768 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1768 | node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1769 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1769 | node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1770 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
1770 | node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
1771 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1771 | node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1772 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1772 | node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1773 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a |
|
1773 | node--debug: 95c24699272ef57d062b8bccc32c878bf841784a | |
1774 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1774 | node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1775 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b |
|
1775 | node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b | |
1776 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1776 | node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1777 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1777 | node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1778 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1778 | node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1779 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
1779 | node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
1780 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1780 | node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1781 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1781 | node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1782 | parents: |
|
1782 | parents: | |
1783 | parents: -1:000000000000 |
|
1783 | parents: -1:000000000000 | |
1784 | parents: 5:13207e5a10d9 4:bbe44766e73d |
|
1784 | parents: 5:13207e5a10d9 4:bbe44766e73d | |
1785 | parents: 3:10e46f2dcbf4 |
|
1785 | parents: 3:10e46f2dcbf4 | |
1786 | parents: |
|
1786 | parents: | |
1787 | parents: |
|
1787 | parents: | |
1788 | parents: |
|
1788 | parents: | |
1789 | parents: |
|
1789 | parents: | |
1790 | parents: |
|
1790 | parents: | |
1791 | parents--verbose: |
|
1791 | parents--verbose: | |
1792 | parents--verbose: -1:000000000000 |
|
1792 | parents--verbose: -1:000000000000 | |
1793 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d |
|
1793 | parents--verbose: 5:13207e5a10d9 4:bbe44766e73d | |
1794 | parents--verbose: 3:10e46f2dcbf4 |
|
1794 | parents--verbose: 3:10e46f2dcbf4 | |
1795 | parents--verbose: |
|
1795 | parents--verbose: | |
1796 | parents--verbose: |
|
1796 | parents--verbose: | |
1797 | parents--verbose: |
|
1797 | parents--verbose: | |
1798 | parents--verbose: |
|
1798 | parents--verbose: | |
1799 | parents--verbose: |
|
1799 | parents--verbose: | |
1800 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 |
|
1800 | parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 | |
1801 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
1801 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1802 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
1802 | parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
1803 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
1803 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1804 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 |
|
1804 | parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 | |
1805 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 |
|
1805 | parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 | |
1806 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 |
|
1806 | parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 | |
1807 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 |
|
1807 | parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 | |
1808 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 |
|
1808 | parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 | |
1809 | rev: 8 |
|
1809 | rev: 8 | |
1810 | rev: 7 |
|
1810 | rev: 7 | |
1811 | rev: 6 |
|
1811 | rev: 6 | |
1812 | rev: 5 |
|
1812 | rev: 5 | |
1813 | rev: 4 |
|
1813 | rev: 4 | |
1814 | rev: 3 |
|
1814 | rev: 3 | |
1815 | rev: 2 |
|
1815 | rev: 2 | |
1816 | rev: 1 |
|
1816 | rev: 1 | |
1817 | rev: 0 |
|
1817 | rev: 0 | |
1818 | rev--verbose: 8 |
|
1818 | rev--verbose: 8 | |
1819 | rev--verbose: 7 |
|
1819 | rev--verbose: 7 | |
1820 | rev--verbose: 6 |
|
1820 | rev--verbose: 6 | |
1821 | rev--verbose: 5 |
|
1821 | rev--verbose: 5 | |
1822 | rev--verbose: 4 |
|
1822 | rev--verbose: 4 | |
1823 | rev--verbose: 3 |
|
1823 | rev--verbose: 3 | |
1824 | rev--verbose: 2 |
|
1824 | rev--verbose: 2 | |
1825 | rev--verbose: 1 |
|
1825 | rev--verbose: 1 | |
1826 | rev--verbose: 0 |
|
1826 | rev--verbose: 0 | |
1827 | rev--debug: 8 |
|
1827 | rev--debug: 8 | |
1828 | rev--debug: 7 |
|
1828 | rev--debug: 7 | |
1829 | rev--debug: 6 |
|
1829 | rev--debug: 6 | |
1830 | rev--debug: 5 |
|
1830 | rev--debug: 5 | |
1831 | rev--debug: 4 |
|
1831 | rev--debug: 4 | |
1832 | rev--debug: 3 |
|
1832 | rev--debug: 3 | |
1833 | rev--debug: 2 |
|
1833 | rev--debug: 2 | |
1834 | rev--debug: 1 |
|
1834 | rev--debug: 1 | |
1835 | rev--debug: 0 |
|
1835 | rev--debug: 0 | |
1836 | tags: tip |
|
1836 | tags: tip | |
1837 | tags: |
|
1837 | tags: | |
1838 | tags: |
|
1838 | tags: | |
1839 | tags: |
|
1839 | tags: | |
1840 | tags: |
|
1840 | tags: | |
1841 | tags: |
|
1841 | tags: | |
1842 | tags: |
|
1842 | tags: | |
1843 | tags: |
|
1843 | tags: | |
1844 | tags: |
|
1844 | tags: | |
1845 | tags--verbose: tip |
|
1845 | tags--verbose: tip | |
1846 | tags--verbose: |
|
1846 | tags--verbose: | |
1847 | tags--verbose: |
|
1847 | tags--verbose: | |
1848 | tags--verbose: |
|
1848 | tags--verbose: | |
1849 | tags--verbose: |
|
1849 | tags--verbose: | |
1850 | tags--verbose: |
|
1850 | tags--verbose: | |
1851 | tags--verbose: |
|
1851 | tags--verbose: | |
1852 | tags--verbose: |
|
1852 | tags--verbose: | |
1853 | tags--verbose: |
|
1853 | tags--verbose: | |
1854 | tags--debug: tip |
|
1854 | tags--debug: tip | |
1855 | tags--debug: |
|
1855 | tags--debug: | |
1856 | tags--debug: |
|
1856 | tags--debug: | |
1857 | tags--debug: |
|
1857 | tags--debug: | |
1858 | tags--debug: |
|
1858 | tags--debug: | |
1859 | tags--debug: |
|
1859 | tags--debug: | |
1860 | tags--debug: |
|
1860 | tags--debug: | |
1861 | tags--debug: |
|
1861 | tags--debug: | |
1862 | tags--debug: |
|
1862 | tags--debug: | |
1863 | diffstat: 3: +2/-1 |
|
1863 | diffstat: 3: +2/-1 | |
1864 | diffstat: 1: +1/-0 |
|
1864 | diffstat: 1: +1/-0 | |
1865 | diffstat: 0: +0/-0 |
|
1865 | diffstat: 0: +0/-0 | |
1866 | diffstat: 1: +1/-0 |
|
1866 | diffstat: 1: +1/-0 | |
1867 | diffstat: 0: +0/-0 |
|
1867 | diffstat: 0: +0/-0 | |
1868 | diffstat: 1: +1/-0 |
|
1868 | diffstat: 1: +1/-0 | |
1869 | diffstat: 1: +4/-0 |
|
1869 | diffstat: 1: +4/-0 | |
1870 | diffstat: 1: +2/-0 |
|
1870 | diffstat: 1: +2/-0 | |
1871 | diffstat: 1: +1/-0 |
|
1871 | diffstat: 1: +1/-0 | |
1872 | diffstat--verbose: 3: +2/-1 |
|
1872 | diffstat--verbose: 3: +2/-1 | |
1873 | diffstat--verbose: 1: +1/-0 |
|
1873 | diffstat--verbose: 1: +1/-0 | |
1874 | diffstat--verbose: 0: +0/-0 |
|
1874 | diffstat--verbose: 0: +0/-0 | |
1875 | diffstat--verbose: 1: +1/-0 |
|
1875 | diffstat--verbose: 1: +1/-0 | |
1876 | diffstat--verbose: 0: +0/-0 |
|
1876 | diffstat--verbose: 0: +0/-0 | |
1877 | diffstat--verbose: 1: +1/-0 |
|
1877 | diffstat--verbose: 1: +1/-0 | |
1878 | diffstat--verbose: 1: +4/-0 |
|
1878 | diffstat--verbose: 1: +4/-0 | |
1879 | diffstat--verbose: 1: +2/-0 |
|
1879 | diffstat--verbose: 1: +2/-0 | |
1880 | diffstat--verbose: 1: +1/-0 |
|
1880 | diffstat--verbose: 1: +1/-0 | |
1881 | diffstat--debug: 3: +2/-1 |
|
1881 | diffstat--debug: 3: +2/-1 | |
1882 | diffstat--debug: 1: +1/-0 |
|
1882 | diffstat--debug: 1: +1/-0 | |
1883 | diffstat--debug: 0: +0/-0 |
|
1883 | diffstat--debug: 0: +0/-0 | |
1884 | diffstat--debug: 1: +1/-0 |
|
1884 | diffstat--debug: 1: +1/-0 | |
1885 | diffstat--debug: 0: +0/-0 |
|
1885 | diffstat--debug: 0: +0/-0 | |
1886 | diffstat--debug: 1: +1/-0 |
|
1886 | diffstat--debug: 1: +1/-0 | |
1887 | diffstat--debug: 1: +4/-0 |
|
1887 | diffstat--debug: 1: +4/-0 | |
1888 | diffstat--debug: 1: +2/-0 |
|
1888 | diffstat--debug: 1: +2/-0 | |
1889 | diffstat--debug: 1: +1/-0 |
|
1889 | diffstat--debug: 1: +1/-0 | |
1890 | extras: branch=default |
|
1890 | extras: branch=default | |
1891 | extras: branch=default |
|
1891 | extras: branch=default | |
1892 | extras: branch=default |
|
1892 | extras: branch=default | |
1893 | extras: branch=default |
|
1893 | extras: branch=default | |
1894 | extras: branch=foo |
|
1894 | extras: branch=foo | |
1895 | extras: branch=default |
|
1895 | extras: branch=default | |
1896 | extras: branch=default |
|
1896 | extras: branch=default | |
1897 | extras: branch=default |
|
1897 | extras: branch=default | |
1898 | extras: branch=default |
|
1898 | extras: branch=default | |
1899 | extras--verbose: branch=default |
|
1899 | extras--verbose: branch=default | |
1900 | extras--verbose: branch=default |
|
1900 | extras--verbose: branch=default | |
1901 | extras--verbose: branch=default |
|
1901 | extras--verbose: branch=default | |
1902 | extras--verbose: branch=default |
|
1902 | extras--verbose: branch=default | |
1903 | extras--verbose: branch=foo |
|
1903 | extras--verbose: branch=foo | |
1904 | extras--verbose: branch=default |
|
1904 | extras--verbose: branch=default | |
1905 | extras--verbose: branch=default |
|
1905 | extras--verbose: branch=default | |
1906 | extras--verbose: branch=default |
|
1906 | extras--verbose: branch=default | |
1907 | extras--verbose: branch=default |
|
1907 | extras--verbose: branch=default | |
1908 | extras--debug: branch=default |
|
1908 | extras--debug: branch=default | |
1909 | extras--debug: branch=default |
|
1909 | extras--debug: branch=default | |
1910 | extras--debug: branch=default |
|
1910 | extras--debug: branch=default | |
1911 | extras--debug: branch=default |
|
1911 | extras--debug: branch=default | |
1912 | extras--debug: branch=foo |
|
1912 | extras--debug: branch=foo | |
1913 | extras--debug: branch=default |
|
1913 | extras--debug: branch=default | |
1914 | extras--debug: branch=default |
|
1914 | extras--debug: branch=default | |
1915 | extras--debug: branch=default |
|
1915 | extras--debug: branch=default | |
1916 | extras--debug: branch=default |
|
1916 | extras--debug: branch=default | |
1917 | p1rev: 7 |
|
1917 | p1rev: 7 | |
1918 | p1rev: -1 |
|
1918 | p1rev: -1 | |
1919 | p1rev: 5 |
|
1919 | p1rev: 5 | |
1920 | p1rev: 3 |
|
1920 | p1rev: 3 | |
1921 | p1rev: 3 |
|
1921 | p1rev: 3 | |
1922 | p1rev: 2 |
|
1922 | p1rev: 2 | |
1923 | p1rev: 1 |
|
1923 | p1rev: 1 | |
1924 | p1rev: 0 |
|
1924 | p1rev: 0 | |
1925 | p1rev: -1 |
|
1925 | p1rev: -1 | |
1926 | p1rev--verbose: 7 |
|
1926 | p1rev--verbose: 7 | |
1927 | p1rev--verbose: -1 |
|
1927 | p1rev--verbose: -1 | |
1928 | p1rev--verbose: 5 |
|
1928 | p1rev--verbose: 5 | |
1929 | p1rev--verbose: 3 |
|
1929 | p1rev--verbose: 3 | |
1930 | p1rev--verbose: 3 |
|
1930 | p1rev--verbose: 3 | |
1931 | p1rev--verbose: 2 |
|
1931 | p1rev--verbose: 2 | |
1932 | p1rev--verbose: 1 |
|
1932 | p1rev--verbose: 1 | |
1933 | p1rev--verbose: 0 |
|
1933 | p1rev--verbose: 0 | |
1934 | p1rev--verbose: -1 |
|
1934 | p1rev--verbose: -1 | |
1935 | p1rev--debug: 7 |
|
1935 | p1rev--debug: 7 | |
1936 | p1rev--debug: -1 |
|
1936 | p1rev--debug: -1 | |
1937 | p1rev--debug: 5 |
|
1937 | p1rev--debug: 5 | |
1938 | p1rev--debug: 3 |
|
1938 | p1rev--debug: 3 | |
1939 | p1rev--debug: 3 |
|
1939 | p1rev--debug: 3 | |
1940 | p1rev--debug: 2 |
|
1940 | p1rev--debug: 2 | |
1941 | p1rev--debug: 1 |
|
1941 | p1rev--debug: 1 | |
1942 | p1rev--debug: 0 |
|
1942 | p1rev--debug: 0 | |
1943 | p1rev--debug: -1 |
|
1943 | p1rev--debug: -1 | |
1944 | p2rev: -1 |
|
1944 | p2rev: -1 | |
1945 | p2rev: -1 |
|
1945 | p2rev: -1 | |
1946 | p2rev: 4 |
|
1946 | p2rev: 4 | |
1947 | p2rev: -1 |
|
1947 | p2rev: -1 | |
1948 | p2rev: -1 |
|
1948 | p2rev: -1 | |
1949 | p2rev: -1 |
|
1949 | p2rev: -1 | |
1950 | p2rev: -1 |
|
1950 | p2rev: -1 | |
1951 | p2rev: -1 |
|
1951 | p2rev: -1 | |
1952 | p2rev: -1 |
|
1952 | p2rev: -1 | |
1953 | p2rev--verbose: -1 |
|
1953 | p2rev--verbose: -1 | |
1954 | p2rev--verbose: -1 |
|
1954 | p2rev--verbose: -1 | |
1955 | p2rev--verbose: 4 |
|
1955 | p2rev--verbose: 4 | |
1956 | p2rev--verbose: -1 |
|
1956 | p2rev--verbose: -1 | |
1957 | p2rev--verbose: -1 |
|
1957 | p2rev--verbose: -1 | |
1958 | p2rev--verbose: -1 |
|
1958 | p2rev--verbose: -1 | |
1959 | p2rev--verbose: -1 |
|
1959 | p2rev--verbose: -1 | |
1960 | p2rev--verbose: -1 |
|
1960 | p2rev--verbose: -1 | |
1961 | p2rev--verbose: -1 |
|
1961 | p2rev--verbose: -1 | |
1962 | p2rev--debug: -1 |
|
1962 | p2rev--debug: -1 | |
1963 | p2rev--debug: -1 |
|
1963 | p2rev--debug: -1 | |
1964 | p2rev--debug: 4 |
|
1964 | p2rev--debug: 4 | |
1965 | p2rev--debug: -1 |
|
1965 | p2rev--debug: -1 | |
1966 | p2rev--debug: -1 |
|
1966 | p2rev--debug: -1 | |
1967 | p2rev--debug: -1 |
|
1967 | p2rev--debug: -1 | |
1968 | p2rev--debug: -1 |
|
1968 | p2rev--debug: -1 | |
1969 | p2rev--debug: -1 |
|
1969 | p2rev--debug: -1 | |
1970 | p2rev--debug: -1 |
|
1970 | p2rev--debug: -1 | |
1971 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1971 | p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1972 | p1node: 0000000000000000000000000000000000000000 |
|
1972 | p1node: 0000000000000000000000000000000000000000 | |
1973 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1973 | p1node: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1974 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1974 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1975 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1975 | p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1976 | p1node: 97054abb4ab824450e9164180baf491ae0078465 |
|
1976 | p1node: 97054abb4ab824450e9164180baf491ae0078465 | |
1977 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1977 | p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1978 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1978 | p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1979 | p1node: 0000000000000000000000000000000000000000 |
|
1979 | p1node: 0000000000000000000000000000000000000000 | |
1980 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1980 | p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1981 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
1981 | p1node--verbose: 0000000000000000000000000000000000000000 | |
1982 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1982 | p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1983 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1983 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1984 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1984 | p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1985 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 |
|
1985 | p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465 | |
1986 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1986 | p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1987 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1987 | p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1988 | p1node--verbose: 0000000000000000000000000000000000000000 |
|
1988 | p1node--verbose: 0000000000000000000000000000000000000000 | |
1989 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 |
|
1989 | p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453 | |
1990 | p1node--debug: 0000000000000000000000000000000000000000 |
|
1990 | p1node--debug: 0000000000000000000000000000000000000000 | |
1991 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f |
|
1991 | p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f | |
1992 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1992 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1993 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
1993 | p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
1994 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 |
|
1994 | p1node--debug: 97054abb4ab824450e9164180baf491ae0078465 | |
1995 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
1995 | p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
1996 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1996 | p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f | |
1997 | p1node--debug: 0000000000000000000000000000000000000000 |
|
1997 | p1node--debug: 0000000000000000000000000000000000000000 | |
1998 | p2node: 0000000000000000000000000000000000000000 |
|
1998 | p2node: 0000000000000000000000000000000000000000 | |
1999 | p2node: 0000000000000000000000000000000000000000 |
|
1999 | p2node: 0000000000000000000000000000000000000000 | |
2000 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2000 | p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2001 | p2node: 0000000000000000000000000000000000000000 |
|
2001 | p2node: 0000000000000000000000000000000000000000 | |
2002 | p2node: 0000000000000000000000000000000000000000 |
|
2002 | p2node: 0000000000000000000000000000000000000000 | |
2003 | p2node: 0000000000000000000000000000000000000000 |
|
2003 | p2node: 0000000000000000000000000000000000000000 | |
2004 | p2node: 0000000000000000000000000000000000000000 |
|
2004 | p2node: 0000000000000000000000000000000000000000 | |
2005 | p2node: 0000000000000000000000000000000000000000 |
|
2005 | p2node: 0000000000000000000000000000000000000000 | |
2006 | p2node: 0000000000000000000000000000000000000000 |
|
2006 | p2node: 0000000000000000000000000000000000000000 | |
2007 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2007 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2008 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2008 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2009 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2009 | p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2010 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2010 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2011 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2011 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2012 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2012 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2013 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2013 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2014 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2014 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2015 | p2node--verbose: 0000000000000000000000000000000000000000 |
|
2015 | p2node--verbose: 0000000000000000000000000000000000000000 | |
2016 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2016 | p2node--debug: 0000000000000000000000000000000000000000 | |
2017 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2017 | p2node--debug: 0000000000000000000000000000000000000000 | |
2018 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2018 | p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2019 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2019 | p2node--debug: 0000000000000000000000000000000000000000 | |
2020 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2020 | p2node--debug: 0000000000000000000000000000000000000000 | |
2021 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2021 | p2node--debug: 0000000000000000000000000000000000000000 | |
2022 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2022 | p2node--debug: 0000000000000000000000000000000000000000 | |
2023 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2023 | p2node--debug: 0000000000000000000000000000000000000000 | |
2024 | p2node--debug: 0000000000000000000000000000000000000000 |
|
2024 | p2node--debug: 0000000000000000000000000000000000000000 | |
2025 |
|
2025 | |||
2026 | Filters work: |
|
2026 | Filters work: | |
2027 |
|
2027 | |||
2028 | $ hg log --template '{author|domain}\n' |
|
2028 | $ hg log --template '{author|domain}\n' | |
2029 |
|
2029 | |||
2030 | hostname |
|
2030 | hostname | |
2031 |
|
2031 | |||
2032 |
|
2032 | |||
2033 |
|
2033 | |||
2034 |
|
2034 | |||
2035 | place |
|
2035 | place | |
2036 | place |
|
2036 | place | |
2037 | hostname |
|
2037 | hostname | |
2038 |
|
2038 | |||
2039 | $ hg log --template '{author|person}\n' |
|
2039 | $ hg log --template '{author|person}\n' | |
2040 | test |
|
2040 | test | |
2041 | User Name |
|
2041 | User Name | |
2042 | person |
|
2042 | person | |
2043 | person |
|
2043 | person | |
2044 | person |
|
2044 | person | |
2045 | person |
|
2045 | person | |
2046 | other |
|
2046 | other | |
2047 | A. N. Other |
|
2047 | A. N. Other | |
2048 | User Name |
|
2048 | User Name | |
2049 |
|
2049 | |||
2050 | $ hg log --template '{author|user}\n' |
|
2050 | $ hg log --template '{author|user}\n' | |
2051 | test |
|
2051 | test | |
2052 | user |
|
2052 | user | |
2053 | person |
|
2053 | person | |
2054 | person |
|
2054 | person | |
2055 | person |
|
2055 | person | |
2056 | person |
|
2056 | person | |
2057 | other |
|
2057 | other | |
2058 | other |
|
2058 | other | |
2059 | user |
|
2059 | user | |
2060 |
|
2060 | |||
2061 | $ hg log --template '{date|date}\n' |
|
2061 | $ hg log --template '{date|date}\n' | |
2062 | Wed Jan 01 10:01:00 2020 +0000 |
|
2062 | Wed Jan 01 10:01:00 2020 +0000 | |
2063 | Mon Jan 12 13:46:40 1970 +0000 |
|
2063 | Mon Jan 12 13:46:40 1970 +0000 | |
2064 | Sun Jan 18 08:40:01 1970 +0000 |
|
2064 | Sun Jan 18 08:40:01 1970 +0000 | |
2065 | Sun Jan 18 08:40:00 1970 +0000 |
|
2065 | Sun Jan 18 08:40:00 1970 +0000 | |
2066 | Sat Jan 17 04:53:20 1970 +0000 |
|
2066 | Sat Jan 17 04:53:20 1970 +0000 | |
2067 | Fri Jan 16 01:06:40 1970 +0000 |
|
2067 | Fri Jan 16 01:06:40 1970 +0000 | |
2068 | Wed Jan 14 21:20:00 1970 +0000 |
|
2068 | Wed Jan 14 21:20:00 1970 +0000 | |
2069 | Tue Jan 13 17:33:20 1970 +0000 |
|
2069 | Tue Jan 13 17:33:20 1970 +0000 | |
2070 | Mon Jan 12 13:46:40 1970 +0000 |
|
2070 | Mon Jan 12 13:46:40 1970 +0000 | |
2071 |
|
2071 | |||
2072 | $ hg log --template '{date|isodate}\n' |
|
2072 | $ hg log --template '{date|isodate}\n' | |
2073 | 2020-01-01 10:01 +0000 |
|
2073 | 2020-01-01 10:01 +0000 | |
2074 | 1970-01-12 13:46 +0000 |
|
2074 | 1970-01-12 13:46 +0000 | |
2075 | 1970-01-18 08:40 +0000 |
|
2075 | 1970-01-18 08:40 +0000 | |
2076 | 1970-01-18 08:40 +0000 |
|
2076 | 1970-01-18 08:40 +0000 | |
2077 | 1970-01-17 04:53 +0000 |
|
2077 | 1970-01-17 04:53 +0000 | |
2078 | 1970-01-16 01:06 +0000 |
|
2078 | 1970-01-16 01:06 +0000 | |
2079 | 1970-01-14 21:20 +0000 |
|
2079 | 1970-01-14 21:20 +0000 | |
2080 | 1970-01-13 17:33 +0000 |
|
2080 | 1970-01-13 17:33 +0000 | |
2081 | 1970-01-12 13:46 +0000 |
|
2081 | 1970-01-12 13:46 +0000 | |
2082 |
|
2082 | |||
2083 | $ hg log --template '{date|isodatesec}\n' |
|
2083 | $ hg log --template '{date|isodatesec}\n' | |
2084 | 2020-01-01 10:01:00 +0000 |
|
2084 | 2020-01-01 10:01:00 +0000 | |
2085 | 1970-01-12 13:46:40 +0000 |
|
2085 | 1970-01-12 13:46:40 +0000 | |
2086 | 1970-01-18 08:40:01 +0000 |
|
2086 | 1970-01-18 08:40:01 +0000 | |
2087 | 1970-01-18 08:40:00 +0000 |
|
2087 | 1970-01-18 08:40:00 +0000 | |
2088 | 1970-01-17 04:53:20 +0000 |
|
2088 | 1970-01-17 04:53:20 +0000 | |
2089 | 1970-01-16 01:06:40 +0000 |
|
2089 | 1970-01-16 01:06:40 +0000 | |
2090 | 1970-01-14 21:20:00 +0000 |
|
2090 | 1970-01-14 21:20:00 +0000 | |
2091 | 1970-01-13 17:33:20 +0000 |
|
2091 | 1970-01-13 17:33:20 +0000 | |
2092 | 1970-01-12 13:46:40 +0000 |
|
2092 | 1970-01-12 13:46:40 +0000 | |
2093 |
|
2093 | |||
2094 | $ hg log --template '{date|rfc822date}\n' |
|
2094 | $ hg log --template '{date|rfc822date}\n' | |
2095 | Wed, 01 Jan 2020 10:01:00 +0000 |
|
2095 | Wed, 01 Jan 2020 10:01:00 +0000 | |
2096 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
2096 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2097 | Sun, 18 Jan 1970 08:40:01 +0000 |
|
2097 | Sun, 18 Jan 1970 08:40:01 +0000 | |
2098 | Sun, 18 Jan 1970 08:40:00 +0000 |
|
2098 | Sun, 18 Jan 1970 08:40:00 +0000 | |
2099 | Sat, 17 Jan 1970 04:53:20 +0000 |
|
2099 | Sat, 17 Jan 1970 04:53:20 +0000 | |
2100 | Fri, 16 Jan 1970 01:06:40 +0000 |
|
2100 | Fri, 16 Jan 1970 01:06:40 +0000 | |
2101 | Wed, 14 Jan 1970 21:20:00 +0000 |
|
2101 | Wed, 14 Jan 1970 21:20:00 +0000 | |
2102 | Tue, 13 Jan 1970 17:33:20 +0000 |
|
2102 | Tue, 13 Jan 1970 17:33:20 +0000 | |
2103 | Mon, 12 Jan 1970 13:46:40 +0000 |
|
2103 | Mon, 12 Jan 1970 13:46:40 +0000 | |
2104 |
|
2104 | |||
2105 | $ hg log --template '{desc|firstline}\n' |
|
2105 | $ hg log --template '{desc|firstline}\n' | |
2106 | third |
|
2106 | third | |
2107 | second |
|
2107 | second | |
2108 | merge |
|
2108 | merge | |
2109 | new head |
|
2109 | new head | |
2110 | new branch |
|
2110 | new branch | |
2111 | no user, no domain |
|
2111 | no user, no domain | |
2112 | no person |
|
2112 | no person | |
2113 | other 1 |
|
2113 | other 1 | |
2114 | line 1 |
|
2114 | line 1 | |
2115 |
|
2115 | |||
2116 | $ hg log --template '{node|short}\n' |
|
2116 | $ hg log --template '{node|short}\n' | |
2117 | 95c24699272e |
|
2117 | 95c24699272e | |
2118 | 29114dbae42b |
|
2118 | 29114dbae42b | |
2119 | d41e714fe50d |
|
2119 | d41e714fe50d | |
2120 | 13207e5a10d9 |
|
2120 | 13207e5a10d9 | |
2121 | bbe44766e73d |
|
2121 | bbe44766e73d | |
2122 | 10e46f2dcbf4 |
|
2122 | 10e46f2dcbf4 | |
2123 | 97054abb4ab8 |
|
2123 | 97054abb4ab8 | |
2124 | b608e9d1a3f0 |
|
2124 | b608e9d1a3f0 | |
2125 | 1e4e1b8f71e0 |
|
2125 | 1e4e1b8f71e0 | |
2126 |
|
2126 | |||
2127 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' |
|
2127 | $ hg log --template '<changeset author="{author|xmlescape}"/>\n' | |
2128 | <changeset author="test"/> |
|
2128 | <changeset author="test"/> | |
2129 | <changeset author="User Name <user@hostname>"/> |
|
2129 | <changeset author="User Name <user@hostname>"/> | |
2130 | <changeset author="person"/> |
|
2130 | <changeset author="person"/> | |
2131 | <changeset author="person"/> |
|
2131 | <changeset author="person"/> | |
2132 | <changeset author="person"/> |
|
2132 | <changeset author="person"/> | |
2133 | <changeset author="person"/> |
|
2133 | <changeset author="person"/> | |
2134 | <changeset author="other@place"/> |
|
2134 | <changeset author="other@place"/> | |
2135 | <changeset author="A. N. Other <other@place>"/> |
|
2135 | <changeset author="A. N. Other <other@place>"/> | |
2136 | <changeset author="User Name <user@hostname>"/> |
|
2136 | <changeset author="User Name <user@hostname>"/> | |
2137 |
|
2137 | |||
2138 | $ hg log --template '{rev}: {children}\n' |
|
2138 | $ hg log --template '{rev}: {children}\n' | |
2139 | 8: |
|
2139 | 8: | |
2140 | 7: 8:95c24699272e |
|
2140 | 7: 8:95c24699272e | |
2141 | 6: |
|
2141 | 6: | |
2142 | 5: 6:d41e714fe50d |
|
2142 | 5: 6:d41e714fe50d | |
2143 | 4: 6:d41e714fe50d |
|
2143 | 4: 6:d41e714fe50d | |
2144 | 3: 4:bbe44766e73d 5:13207e5a10d9 |
|
2144 | 3: 4:bbe44766e73d 5:13207e5a10d9 | |
2145 | 2: 3:10e46f2dcbf4 |
|
2145 | 2: 3:10e46f2dcbf4 | |
2146 | 1: 2:97054abb4ab8 |
|
2146 | 1: 2:97054abb4ab8 | |
2147 | 0: 1:b608e9d1a3f0 |
|
2147 | 0: 1:b608e9d1a3f0 | |
2148 |
|
2148 | |||
2149 | Formatnode filter works: |
|
2149 | Formatnode filter works: | |
2150 |
|
2150 | |||
2151 | $ hg -q log -r 0 --template '{node|formatnode}\n' |
|
2151 | $ hg -q log -r 0 --template '{node|formatnode}\n' | |
2152 | 1e4e1b8f71e0 |
|
2152 | 1e4e1b8f71e0 | |
2153 |
|
2153 | |||
2154 | $ hg log -r 0 --template '{node|formatnode}\n' |
|
2154 | $ hg log -r 0 --template '{node|formatnode}\n' | |
2155 | 1e4e1b8f71e0 |
|
2155 | 1e4e1b8f71e0 | |
2156 |
|
2156 | |||
2157 | $ hg -v log -r 0 --template '{node|formatnode}\n' |
|
2157 | $ hg -v log -r 0 --template '{node|formatnode}\n' | |
2158 | 1e4e1b8f71e0 |
|
2158 | 1e4e1b8f71e0 | |
2159 |
|
2159 | |||
2160 | $ hg --debug log -r 0 --template '{node|formatnode}\n' |
|
2160 | $ hg --debug log -r 0 --template '{node|formatnode}\n' | |
2161 | 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2161 | 1e4e1b8f71e05681d422154f5421e385fec3454f | |
2162 |
|
2162 | |||
2163 | Age filter: |
|
2163 | Age filter: | |
2164 |
|
2164 | |||
2165 | $ hg init unstable-hash |
|
2165 | $ hg init unstable-hash | |
2166 | $ cd unstable-hash |
|
2166 | $ cd unstable-hash | |
2167 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 |
|
2167 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 | |
2168 |
|
2168 | |||
2169 | >>> from datetime import datetime, timedelta |
|
2169 | >>> from datetime import datetime, timedelta | |
2170 | >>> fp = open('a', 'w') |
|
2170 | >>> fp = open('a', 'w') | |
2171 | >>> n = datetime.now() + timedelta(366 * 7) |
|
2171 | >>> n = datetime.now() + timedelta(366 * 7) | |
2172 | >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day)) |
|
2172 | >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day)) | |
2173 | >>> fp.close() |
|
2173 | >>> fp.close() | |
2174 | $ hg add a |
|
2174 | $ hg add a | |
2175 | $ hg commit -m future -d "`cat a`" |
|
2175 | $ hg commit -m future -d "`cat a`" | |
2176 |
|
2176 | |||
2177 | $ hg log -l1 --template '{date|age}\n' |
|
2177 | $ hg log -l1 --template '{date|age}\n' | |
2178 | 7 years from now |
|
2178 | 7 years from now | |
2179 |
|
2179 | |||
2180 | $ cd .. |
|
2180 | $ cd .. | |
2181 | $ rm -rf unstable-hash |
|
2181 | $ rm -rf unstable-hash | |
2182 |
|
2182 | |||
2183 | Add a dummy commit to make up for the instability of the above: |
|
2183 | Add a dummy commit to make up for the instability of the above: | |
2184 |
|
2184 | |||
2185 | $ echo a > a |
|
2185 | $ echo a > a | |
2186 | $ hg add a |
|
2186 | $ hg add a | |
2187 | $ hg ci -m future |
|
2187 | $ hg ci -m future | |
2188 |
|
2188 | |||
2189 | Count filter: |
|
2189 | Count filter: | |
2190 |
|
2190 | |||
2191 | $ hg log -l1 --template '{node|count} {node|short|count}\n' |
|
2191 | $ hg log -l1 --template '{node|count} {node|short|count}\n' | |
2192 | 40 12 |
|
2192 | 40 12 | |
2193 |
|
2193 | |||
2194 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' |
|
2194 | $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n' | |
2195 | 0 1 4 |
|
2195 | 0 1 4 | |
2196 |
|
2196 | |||
2197 | $ hg log -G --template '{rev}: children: {children|count}, \ |
|
2197 | $ hg log -G --template '{rev}: children: {children|count}, \ | |
2198 | > tags: {tags|count}, file_adds: {file_adds|count}, \ |
|
2198 | > tags: {tags|count}, file_adds: {file_adds|count}, \ | |
2199 | > ancestors: {revset("ancestors(%s)", rev)|count}' |
|
2199 | > ancestors: {revset("ancestors(%s)", rev)|count}' | |
2200 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 |
|
2200 | @ 9: children: 0, tags: 1, file_adds: 1, ancestors: 3 | |
2201 | | |
|
2201 | | | |
2202 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 |
|
2202 | o 8: children: 1, tags: 0, file_adds: 2, ancestors: 2 | |
2203 | | |
|
2203 | | | |
2204 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
2204 | o 7: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2205 |
|
2205 | |||
2206 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 |
|
2206 | o 6: children: 0, tags: 0, file_adds: 0, ancestors: 7 | |
2207 | |\ |
|
2207 | |\ | |
2208 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 |
|
2208 | | o 5: children: 1, tags: 0, file_adds: 1, ancestors: 5 | |
2209 | | | |
|
2209 | | | | |
2210 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 |
|
2210 | o | 4: children: 1, tags: 0, file_adds: 0, ancestors: 5 | |
2211 | |/ |
|
2211 | |/ | |
2212 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 |
|
2212 | o 3: children: 2, tags: 0, file_adds: 0, ancestors: 4 | |
2213 | | |
|
2213 | | | |
2214 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 |
|
2214 | o 2: children: 1, tags: 0, file_adds: 1, ancestors: 3 | |
2215 | | |
|
2215 | | | |
2216 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 |
|
2216 | o 1: children: 1, tags: 0, file_adds: 1, ancestors: 2 | |
2217 | | |
|
2217 | | | |
2218 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 |
|
2218 | o 0: children: 1, tags: 0, file_adds: 1, ancestors: 1 | |
2219 |
|
2219 | |||
2220 |
|
2220 | |||
2221 | Upper/lower filters: |
|
2221 | Upper/lower filters: | |
2222 |
|
2222 | |||
2223 | $ hg log -r0 --template '{branch|upper}\n' |
|
2223 | $ hg log -r0 --template '{branch|upper}\n' | |
2224 | DEFAULT |
|
2224 | DEFAULT | |
2225 | $ hg log -r0 --template '{author|lower}\n' |
|
2225 | $ hg log -r0 --template '{author|lower}\n' | |
2226 | user name <user@hostname> |
|
2226 | user name <user@hostname> | |
2227 | $ hg log -r0 --template '{date|upper}\n' |
|
2227 | $ hg log -r0 --template '{date|upper}\n' | |
2228 | abort: template filter 'upper' is not compatible with keyword 'date' |
|
2228 | abort: template filter 'upper' is not compatible with keyword 'date' | |
2229 | [255] |
|
2229 | [255] | |
2230 |
|
2230 | |||
2231 | Add a commit that does all possible modifications at once |
|
2231 | Add a commit that does all possible modifications at once | |
2232 |
|
2232 | |||
2233 | $ echo modify >> third |
|
2233 | $ echo modify >> third | |
2234 | $ touch b |
|
2234 | $ touch b | |
2235 | $ hg add b |
|
2235 | $ hg add b | |
2236 | $ hg mv fourth fifth |
|
2236 | $ hg mv fourth fifth | |
2237 | $ hg rm a |
|
2237 | $ hg rm a | |
2238 | $ hg ci -m "Modify, add, remove, rename" |
|
2238 | $ hg ci -m "Modify, add, remove, rename" | |
2239 |
|
2239 | |||
2240 | Check the status template |
|
2240 | Check the status template | |
2241 |
|
2241 | |||
2242 | $ cat <<EOF >> $HGRCPATH |
|
2242 | $ cat <<EOF >> $HGRCPATH | |
2243 | > [extensions] |
|
2243 | > [extensions] | |
2244 | > color= |
|
2244 | > color= | |
2245 | > EOF |
|
2245 | > EOF | |
2246 |
|
2246 | |||
2247 | $ hg log -T status -r 10 |
|
2247 | $ hg log -T status -r 10 | |
2248 | changeset: 10:0f9759ec227a |
|
2248 | changeset: 10:0f9759ec227a | |
2249 | tag: tip |
|
2249 | tag: tip | |
2250 | user: test |
|
2250 | user: test | |
2251 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2251 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2252 | summary: Modify, add, remove, rename |
|
2252 | summary: Modify, add, remove, rename | |
2253 | files: |
|
2253 | files: | |
2254 | M third |
|
2254 | M third | |
2255 | A b |
|
2255 | A b | |
2256 | A fifth |
|
2256 | A fifth | |
2257 | R a |
|
2257 | R a | |
2258 | R fourth |
|
2258 | R fourth | |
2259 |
|
2259 | |||
2260 | $ hg log -T status -C -r 10 |
|
2260 | $ hg log -T status -C -r 10 | |
2261 | changeset: 10:0f9759ec227a |
|
2261 | changeset: 10:0f9759ec227a | |
2262 | tag: tip |
|
2262 | tag: tip | |
2263 | user: test |
|
2263 | user: test | |
2264 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2264 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2265 | summary: Modify, add, remove, rename |
|
2265 | summary: Modify, add, remove, rename | |
2266 | files: |
|
2266 | files: | |
2267 | M third |
|
2267 | M third | |
2268 | A b |
|
2268 | A b | |
2269 | A fifth |
|
2269 | A fifth | |
2270 | fourth |
|
2270 | fourth | |
2271 | R a |
|
2271 | R a | |
2272 | R fourth |
|
2272 | R fourth | |
2273 |
|
2273 | |||
2274 | $ hg log -T status -C -r 10 -v |
|
2274 | $ hg log -T status -C -r 10 -v | |
2275 | changeset: 10:0f9759ec227a |
|
2275 | changeset: 10:0f9759ec227a | |
2276 | tag: tip |
|
2276 | tag: tip | |
2277 | user: test |
|
2277 | user: test | |
2278 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2278 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2279 | description: |
|
2279 | description: | |
2280 | Modify, add, remove, rename |
|
2280 | Modify, add, remove, rename | |
2281 |
|
2281 | |||
2282 | files: |
|
2282 | files: | |
2283 | M third |
|
2283 | M third | |
2284 | A b |
|
2284 | A b | |
2285 | A fifth |
|
2285 | A fifth | |
2286 | fourth |
|
2286 | fourth | |
2287 | R a |
|
2287 | R a | |
2288 | R fourth |
|
2288 | R fourth | |
2289 |
|
2289 | |||
2290 | $ hg log -T status -C -r 10 --debug |
|
2290 | $ hg log -T status -C -r 10 --debug | |
2291 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c |
|
2291 | changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c | |
2292 | tag: tip |
|
2292 | tag: tip | |
2293 | phase: secret |
|
2293 | phase: secret | |
2294 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 |
|
2294 | parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066 | |
2295 | parent: -1:0000000000000000000000000000000000000000 |
|
2295 | parent: -1:0000000000000000000000000000000000000000 | |
2296 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 |
|
2296 | manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567 | |
2297 | user: test |
|
2297 | user: test | |
2298 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2298 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2299 | extra: branch=default |
|
2299 | extra: branch=default | |
2300 | description: |
|
2300 | description: | |
2301 | Modify, add, remove, rename |
|
2301 | Modify, add, remove, rename | |
2302 |
|
2302 | |||
2303 | files: |
|
2303 | files: | |
2304 | M third |
|
2304 | M third | |
2305 | A b |
|
2305 | A b | |
2306 | A fifth |
|
2306 | A fifth | |
2307 | fourth |
|
2307 | fourth | |
2308 | R a |
|
2308 | R a | |
2309 | R fourth |
|
2309 | R fourth | |
2310 |
|
2310 | |||
2311 | $ hg log -T status -C -r 10 --quiet |
|
2311 | $ hg log -T status -C -r 10 --quiet | |
2312 | 10:0f9759ec227a |
|
2312 | 10:0f9759ec227a | |
2313 | $ hg --color=debug log -T status -r 10 |
|
2313 | $ hg --color=debug log -T status -r 10 | |
2314 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2314 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2315 | [log.tag|tag: tip] |
|
2315 | [log.tag|tag: tip] | |
2316 | [log.user|user: test] |
|
2316 | [log.user|user: test] | |
2317 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2317 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2318 | [log.summary|summary: Modify, add, remove, rename] |
|
2318 | [log.summary|summary: Modify, add, remove, rename] | |
2319 | [ui.note log.files|files:] |
|
2319 | [ui.note log.files|files:] | |
2320 | [status.modified|M third] |
|
2320 | [status.modified|M third] | |
2321 | [status.added|A b] |
|
2321 | [status.added|A b] | |
2322 | [status.added|A fifth] |
|
2322 | [status.added|A fifth] | |
2323 | [status.removed|R a] |
|
2323 | [status.removed|R a] | |
2324 | [status.removed|R fourth] |
|
2324 | [status.removed|R fourth] | |
2325 |
|
2325 | |||
2326 | $ hg --color=debug log -T status -C -r 10 |
|
2326 | $ hg --color=debug log -T status -C -r 10 | |
2327 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2327 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2328 | [log.tag|tag: tip] |
|
2328 | [log.tag|tag: tip] | |
2329 | [log.user|user: test] |
|
2329 | [log.user|user: test] | |
2330 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2330 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2331 | [log.summary|summary: Modify, add, remove, rename] |
|
2331 | [log.summary|summary: Modify, add, remove, rename] | |
2332 | [ui.note log.files|files:] |
|
2332 | [ui.note log.files|files:] | |
2333 | [status.modified|M third] |
|
2333 | [status.modified|M third] | |
2334 | [status.added|A b] |
|
2334 | [status.added|A b] | |
2335 | [status.added|A fifth] |
|
2335 | [status.added|A fifth] | |
2336 | [status.copied| fourth] |
|
2336 | [status.copied| fourth] | |
2337 | [status.removed|R a] |
|
2337 | [status.removed|R a] | |
2338 | [status.removed|R fourth] |
|
2338 | [status.removed|R fourth] | |
2339 |
|
2339 | |||
2340 | $ hg --color=debug log -T status -C -r 10 -v |
|
2340 | $ hg --color=debug log -T status -C -r 10 -v | |
2341 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] |
|
2341 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a] | |
2342 | [log.tag|tag: tip] |
|
2342 | [log.tag|tag: tip] | |
2343 | [log.user|user: test] |
|
2343 | [log.user|user: test] | |
2344 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2344 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2345 | [ui.note log.description|description:] |
|
2345 | [ui.note log.description|description:] | |
2346 | [ui.note log.description|Modify, add, remove, rename] |
|
2346 | [ui.note log.description|Modify, add, remove, rename] | |
2347 |
|
2347 | |||
2348 | [ui.note log.files|files:] |
|
2348 | [ui.note log.files|files:] | |
2349 | [status.modified|M third] |
|
2349 | [status.modified|M third] | |
2350 | [status.added|A b] |
|
2350 | [status.added|A b] | |
2351 | [status.added|A fifth] |
|
2351 | [status.added|A fifth] | |
2352 | [status.copied| fourth] |
|
2352 | [status.copied| fourth] | |
2353 | [status.removed|R a] |
|
2353 | [status.removed|R a] | |
2354 | [status.removed|R fourth] |
|
2354 | [status.removed|R fourth] | |
2355 |
|
2355 | |||
2356 | $ hg --color=debug log -T status -C -r 10 --debug |
|
2356 | $ hg --color=debug log -T status -C -r 10 --debug | |
2357 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] |
|
2357 | [log.changeset changeset.secret|changeset: 10:0f9759ec227a4859c2014a345cd8a859022b7c6c] | |
2358 | [log.tag|tag: tip] |
|
2358 | [log.tag|tag: tip] | |
2359 | [log.phase|phase: secret] |
|
2359 | [log.phase|phase: secret] | |
2360 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] |
|
2360 | [log.parent changeset.secret|parent: 9:bf9dfba36635106d6a73ccc01e28b762da60e066] | |
2361 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2361 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2362 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] |
|
2362 | [ui.debug log.manifest|manifest: 8:89dd546f2de0a9d6d664f58d86097eb97baba567] | |
2363 | [log.user|user: test] |
|
2363 | [log.user|user: test] | |
2364 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
2364 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | |
2365 | [ui.debug log.extra|extra: branch=default] |
|
2365 | [ui.debug log.extra|extra: branch=default] | |
2366 | [ui.note log.description|description:] |
|
2366 | [ui.note log.description|description:] | |
2367 | [ui.note log.description|Modify, add, remove, rename] |
|
2367 | [ui.note log.description|Modify, add, remove, rename] | |
2368 |
|
2368 | |||
2369 | [ui.note log.files|files:] |
|
2369 | [ui.note log.files|files:] | |
2370 | [status.modified|M third] |
|
2370 | [status.modified|M third] | |
2371 | [status.added|A b] |
|
2371 | [status.added|A b] | |
2372 | [status.added|A fifth] |
|
2372 | [status.added|A fifth] | |
2373 | [status.copied| fourth] |
|
2373 | [status.copied| fourth] | |
2374 | [status.removed|R a] |
|
2374 | [status.removed|R a] | |
2375 | [status.removed|R fourth] |
|
2375 | [status.removed|R fourth] | |
2376 |
|
2376 | |||
2377 | $ hg --color=debug log -T status -C -r 10 --quiet |
|
2377 | $ hg --color=debug log -T status -C -r 10 --quiet | |
2378 | [log.node|10:0f9759ec227a] |
|
2378 | [log.node|10:0f9759ec227a] | |
2379 |
|
2379 | |||
2380 | Check the bisect template |
|
2380 | Check the bisect template | |
2381 |
|
2381 | |||
2382 | $ hg bisect -g 1 |
|
2382 | $ hg bisect -g 1 | |
2383 | $ hg bisect -b 3 --noupdate |
|
2383 | $ hg bisect -b 3 --noupdate | |
2384 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) |
|
2384 | Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests) | |
2385 | $ hg log -T bisect -r 0:4 |
|
2385 | $ hg log -T bisect -r 0:4 | |
2386 | changeset: 0:1e4e1b8f71e0 |
|
2386 | changeset: 0:1e4e1b8f71e0 | |
2387 | bisect: good (implicit) |
|
2387 | bisect: good (implicit) | |
2388 | user: User Name <user@hostname> |
|
2388 | user: User Name <user@hostname> | |
2389 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2389 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2390 | summary: line 1 |
|
2390 | summary: line 1 | |
2391 |
|
2391 | |||
2392 | changeset: 1:b608e9d1a3f0 |
|
2392 | changeset: 1:b608e9d1a3f0 | |
2393 | bisect: good |
|
2393 | bisect: good | |
2394 | user: A. N. Other <other@place> |
|
2394 | user: A. N. Other <other@place> | |
2395 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2395 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2396 | summary: other 1 |
|
2396 | summary: other 1 | |
2397 |
|
2397 | |||
2398 | changeset: 2:97054abb4ab8 |
|
2398 | changeset: 2:97054abb4ab8 | |
2399 | bisect: untested |
|
2399 | bisect: untested | |
2400 | user: other@place |
|
2400 | user: other@place | |
2401 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2401 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2402 | summary: no person |
|
2402 | summary: no person | |
2403 |
|
2403 | |||
2404 | changeset: 3:10e46f2dcbf4 |
|
2404 | changeset: 3:10e46f2dcbf4 | |
2405 | bisect: bad |
|
2405 | bisect: bad | |
2406 | user: person |
|
2406 | user: person | |
2407 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2407 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2408 | summary: no user, no domain |
|
2408 | summary: no user, no domain | |
2409 |
|
2409 | |||
2410 | changeset: 4:bbe44766e73d |
|
2410 | changeset: 4:bbe44766e73d | |
2411 | bisect: bad (implicit) |
|
2411 | bisect: bad (implicit) | |
2412 | branch: foo |
|
2412 | branch: foo | |
2413 | user: person |
|
2413 | user: person | |
2414 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2414 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2415 | summary: new branch |
|
2415 | summary: new branch | |
2416 |
|
2416 | |||
2417 | $ hg log --debug -T bisect -r 0:4 |
|
2417 | $ hg log --debug -T bisect -r 0:4 | |
2418 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2418 | changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2419 | bisect: good (implicit) |
|
2419 | bisect: good (implicit) | |
2420 | phase: public |
|
2420 | phase: public | |
2421 | parent: -1:0000000000000000000000000000000000000000 |
|
2421 | parent: -1:0000000000000000000000000000000000000000 | |
2422 | parent: -1:0000000000000000000000000000000000000000 |
|
2422 | parent: -1:0000000000000000000000000000000000000000 | |
2423 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
2423 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
2424 | user: User Name <user@hostname> |
|
2424 | user: User Name <user@hostname> | |
2425 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2425 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2426 | files+: a |
|
2426 | files+: a | |
2427 | extra: branch=default |
|
2427 | extra: branch=default | |
2428 | description: |
|
2428 | description: | |
2429 | line 1 |
|
2429 | line 1 | |
2430 | line 2 |
|
2430 | line 2 | |
2431 |
|
2431 | |||
2432 |
|
2432 | |||
2433 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2433 | changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2434 | bisect: good |
|
2434 | bisect: good | |
2435 | phase: public |
|
2435 | phase: public | |
2436 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f |
|
2436 | parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f | |
2437 | parent: -1:0000000000000000000000000000000000000000 |
|
2437 | parent: -1:0000000000000000000000000000000000000000 | |
2438 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 |
|
2438 | manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55 | |
2439 | user: A. N. Other <other@place> |
|
2439 | user: A. N. Other <other@place> | |
2440 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2440 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2441 | files+: b |
|
2441 | files+: b | |
2442 | extra: branch=default |
|
2442 | extra: branch=default | |
2443 | description: |
|
2443 | description: | |
2444 | other 1 |
|
2444 | other 1 | |
2445 | other 2 |
|
2445 | other 2 | |
2446 |
|
2446 | |||
2447 | other 3 |
|
2447 | other 3 | |
2448 |
|
2448 | |||
2449 |
|
2449 | |||
2450 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
2450 | changeset: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2451 | bisect: untested |
|
2451 | bisect: untested | |
2452 | phase: public |
|
2452 | phase: public | |
2453 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 |
|
2453 | parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 | |
2454 | parent: -1:0000000000000000000000000000000000000000 |
|
2454 | parent: -1:0000000000000000000000000000000000000000 | |
2455 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 |
|
2455 | manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1 | |
2456 | user: other@place |
|
2456 | user: other@place | |
2457 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2457 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2458 | files+: c |
|
2458 | files+: c | |
2459 | extra: branch=default |
|
2459 | extra: branch=default | |
2460 | description: |
|
2460 | description: | |
2461 | no person |
|
2461 | no person | |
2462 |
|
2462 | |||
2463 |
|
2463 | |||
2464 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2464 | changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2465 | bisect: bad |
|
2465 | bisect: bad | |
2466 | phase: public |
|
2466 | phase: public | |
2467 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 |
|
2467 | parent: 2:97054abb4ab824450e9164180baf491ae0078465 | |
2468 | parent: -1:0000000000000000000000000000000000000000 |
|
2468 | parent: -1:0000000000000000000000000000000000000000 | |
2469 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
2469 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2470 | user: person |
|
2470 | user: person | |
2471 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2471 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2472 | files: c |
|
2472 | files: c | |
2473 | extra: branch=default |
|
2473 | extra: branch=default | |
2474 | description: |
|
2474 | description: | |
2475 | no user, no domain |
|
2475 | no user, no domain | |
2476 |
|
2476 | |||
2477 |
|
2477 | |||
2478 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
2478 | changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
2479 | bisect: bad (implicit) |
|
2479 | bisect: bad (implicit) | |
2480 | branch: foo |
|
2480 | branch: foo | |
2481 | phase: draft |
|
2481 | phase: draft | |
2482 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 |
|
2482 | parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 | |
2483 | parent: -1:0000000000000000000000000000000000000000 |
|
2483 | parent: -1:0000000000000000000000000000000000000000 | |
2484 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc |
|
2484 | manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc | |
2485 | user: person |
|
2485 | user: person | |
2486 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2486 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2487 | extra: branch=foo |
|
2487 | extra: branch=foo | |
2488 | description: |
|
2488 | description: | |
2489 | new branch |
|
2489 | new branch | |
2490 |
|
2490 | |||
2491 |
|
2491 | |||
2492 | $ hg log -v -T bisect -r 0:4 |
|
2492 | $ hg log -v -T bisect -r 0:4 | |
2493 | changeset: 0:1e4e1b8f71e0 |
|
2493 | changeset: 0:1e4e1b8f71e0 | |
2494 | bisect: good (implicit) |
|
2494 | bisect: good (implicit) | |
2495 | user: User Name <user@hostname> |
|
2495 | user: User Name <user@hostname> | |
2496 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
2496 | date: Mon Jan 12 13:46:40 1970 +0000 | |
2497 | files: a |
|
2497 | files: a | |
2498 | description: |
|
2498 | description: | |
2499 | line 1 |
|
2499 | line 1 | |
2500 | line 2 |
|
2500 | line 2 | |
2501 |
|
2501 | |||
2502 |
|
2502 | |||
2503 | changeset: 1:b608e9d1a3f0 |
|
2503 | changeset: 1:b608e9d1a3f0 | |
2504 | bisect: good |
|
2504 | bisect: good | |
2505 | user: A. N. Other <other@place> |
|
2505 | user: A. N. Other <other@place> | |
2506 | date: Tue Jan 13 17:33:20 1970 +0000 |
|
2506 | date: Tue Jan 13 17:33:20 1970 +0000 | |
2507 | files: b |
|
2507 | files: b | |
2508 | description: |
|
2508 | description: | |
2509 | other 1 |
|
2509 | other 1 | |
2510 | other 2 |
|
2510 | other 2 | |
2511 |
|
2511 | |||
2512 | other 3 |
|
2512 | other 3 | |
2513 |
|
2513 | |||
2514 |
|
2514 | |||
2515 | changeset: 2:97054abb4ab8 |
|
2515 | changeset: 2:97054abb4ab8 | |
2516 | bisect: untested |
|
2516 | bisect: untested | |
2517 | user: other@place |
|
2517 | user: other@place | |
2518 | date: Wed Jan 14 21:20:00 1970 +0000 |
|
2518 | date: Wed Jan 14 21:20:00 1970 +0000 | |
2519 | files: c |
|
2519 | files: c | |
2520 | description: |
|
2520 | description: | |
2521 | no person |
|
2521 | no person | |
2522 |
|
2522 | |||
2523 |
|
2523 | |||
2524 | changeset: 3:10e46f2dcbf4 |
|
2524 | changeset: 3:10e46f2dcbf4 | |
2525 | bisect: bad |
|
2525 | bisect: bad | |
2526 | user: person |
|
2526 | user: person | |
2527 | date: Fri Jan 16 01:06:40 1970 +0000 |
|
2527 | date: Fri Jan 16 01:06:40 1970 +0000 | |
2528 | files: c |
|
2528 | files: c | |
2529 | description: |
|
2529 | description: | |
2530 | no user, no domain |
|
2530 | no user, no domain | |
2531 |
|
2531 | |||
2532 |
|
2532 | |||
2533 | changeset: 4:bbe44766e73d |
|
2533 | changeset: 4:bbe44766e73d | |
2534 | bisect: bad (implicit) |
|
2534 | bisect: bad (implicit) | |
2535 | branch: foo |
|
2535 | branch: foo | |
2536 | user: person |
|
2536 | user: person | |
2537 | date: Sat Jan 17 04:53:20 1970 +0000 |
|
2537 | date: Sat Jan 17 04:53:20 1970 +0000 | |
2538 | description: |
|
2538 | description: | |
2539 | new branch |
|
2539 | new branch | |
2540 |
|
2540 | |||
2541 |
|
2541 | |||
2542 | $ hg --color=debug log -T bisect -r 0:4 |
|
2542 | $ hg --color=debug log -T bisect -r 0:4 | |
2543 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
2543 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2544 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2544 | [log.bisect bisect.good|bisect: good (implicit)] | |
2545 | [log.user|user: User Name <user@hostname>] |
|
2545 | [log.user|user: User Name <user@hostname>] | |
2546 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2546 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2547 | [log.summary|summary: line 1] |
|
2547 | [log.summary|summary: line 1] | |
2548 |
|
2548 | |||
2549 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
2549 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2550 | [log.bisect bisect.good|bisect: good] |
|
2550 | [log.bisect bisect.good|bisect: good] | |
2551 | [log.user|user: A. N. Other <other@place>] |
|
2551 | [log.user|user: A. N. Other <other@place>] | |
2552 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2552 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2553 | [log.summary|summary: other 1] |
|
2553 | [log.summary|summary: other 1] | |
2554 |
|
2554 | |||
2555 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
2555 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2556 | [log.bisect bisect.untested|bisect: untested] |
|
2556 | [log.bisect bisect.untested|bisect: untested] | |
2557 | [log.user|user: other@place] |
|
2557 | [log.user|user: other@place] | |
2558 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2558 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2559 | [log.summary|summary: no person] |
|
2559 | [log.summary|summary: no person] | |
2560 |
|
2560 | |||
2561 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
2561 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2562 | [log.bisect bisect.bad|bisect: bad] |
|
2562 | [log.bisect bisect.bad|bisect: bad] | |
2563 | [log.user|user: person] |
|
2563 | [log.user|user: person] | |
2564 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2564 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2565 | [log.summary|summary: no user, no domain] |
|
2565 | [log.summary|summary: no user, no domain] | |
2566 |
|
2566 | |||
2567 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
2567 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2568 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2568 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2569 | [log.branch|branch: foo] |
|
2569 | [log.branch|branch: foo] | |
2570 | [log.user|user: person] |
|
2570 | [log.user|user: person] | |
2571 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2571 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2572 | [log.summary|summary: new branch] |
|
2572 | [log.summary|summary: new branch] | |
2573 |
|
2573 | |||
2574 | $ hg --color=debug log --debug -T bisect -r 0:4 |
|
2574 | $ hg --color=debug log --debug -T bisect -r 0:4 | |
2575 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
2575 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2576 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2576 | [log.bisect bisect.good|bisect: good (implicit)] | |
2577 | [log.phase|phase: public] |
|
2577 | [log.phase|phase: public] | |
2578 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2578 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2579 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2579 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2580 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] |
|
2580 | [ui.debug log.manifest|manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0] | |
2581 | [log.user|user: User Name <user@hostname>] |
|
2581 | [log.user|user: User Name <user@hostname>] | |
2582 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2582 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2583 | [ui.debug log.files|files+: a] |
|
2583 | [ui.debug log.files|files+: a] | |
2584 | [ui.debug log.extra|extra: branch=default] |
|
2584 | [ui.debug log.extra|extra: branch=default] | |
2585 | [ui.note log.description|description:] |
|
2585 | [ui.note log.description|description:] | |
2586 | [ui.note log.description|line 1 |
|
2586 | [ui.note log.description|line 1 | |
2587 | line 2] |
|
2587 | line 2] | |
2588 |
|
2588 | |||
2589 |
|
2589 | |||
2590 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
2590 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2591 | [log.bisect bisect.good|bisect: good] |
|
2591 | [log.bisect bisect.good|bisect: good] | |
2592 | [log.phase|phase: public] |
|
2592 | [log.phase|phase: public] | |
2593 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] |
|
2593 | [log.parent changeset.public|parent: 0:1e4e1b8f71e05681d422154f5421e385fec3454f] | |
2594 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2594 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2595 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] |
|
2595 | [ui.debug log.manifest|manifest: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55] | |
2596 | [log.user|user: A. N. Other <other@place>] |
|
2596 | [log.user|user: A. N. Other <other@place>] | |
2597 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2597 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2598 | [ui.debug log.files|files+: b] |
|
2598 | [ui.debug log.files|files+: b] | |
2599 | [ui.debug log.extra|extra: branch=default] |
|
2599 | [ui.debug log.extra|extra: branch=default] | |
2600 | [ui.note log.description|description:] |
|
2600 | [ui.note log.description|description:] | |
2601 | [ui.note log.description|other 1 |
|
2601 | [ui.note log.description|other 1 | |
2602 | other 2 |
|
2602 | other 2 | |
2603 |
|
2603 | |||
2604 | other 3] |
|
2604 | other 3] | |
2605 |
|
2605 | |||
2606 |
|
2606 | |||
2607 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
2607 | [log.changeset changeset.public|changeset: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2608 | [log.bisect bisect.untested|bisect: untested] |
|
2608 | [log.bisect bisect.untested|bisect: untested] | |
2609 | [log.phase|phase: public] |
|
2609 | [log.phase|phase: public] | |
2610 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] |
|
2610 | [log.parent changeset.public|parent: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965] | |
2611 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2611 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2612 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] |
|
2612 | [ui.debug log.manifest|manifest: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1] | |
2613 | [log.user|user: other@place] |
|
2613 | [log.user|user: other@place] | |
2614 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2614 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2615 | [ui.debug log.files|files+: c] |
|
2615 | [ui.debug log.files|files+: c] | |
2616 | [ui.debug log.extra|extra: branch=default] |
|
2616 | [ui.debug log.extra|extra: branch=default] | |
2617 | [ui.note log.description|description:] |
|
2617 | [ui.note log.description|description:] | |
2618 | [ui.note log.description|no person] |
|
2618 | [ui.note log.description|no person] | |
2619 |
|
2619 | |||
2620 |
|
2620 | |||
2621 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
2621 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2622 | [log.bisect bisect.bad|bisect: bad] |
|
2622 | [log.bisect bisect.bad|bisect: bad] | |
2623 | [log.phase|phase: public] |
|
2623 | [log.phase|phase: public] | |
2624 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] |
|
2624 | [log.parent changeset.public|parent: 2:97054abb4ab824450e9164180baf491ae0078465] | |
2625 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2625 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2626 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
2626 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2627 | [log.user|user: person] |
|
2627 | [log.user|user: person] | |
2628 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2628 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2629 | [ui.debug log.files|files: c] |
|
2629 | [ui.debug log.files|files: c] | |
2630 | [ui.debug log.extra|extra: branch=default] |
|
2630 | [ui.debug log.extra|extra: branch=default] | |
2631 | [ui.note log.description|description:] |
|
2631 | [ui.note log.description|description:] | |
2632 | [ui.note log.description|no user, no domain] |
|
2632 | [ui.note log.description|no user, no domain] | |
2633 |
|
2633 | |||
2634 |
|
2634 | |||
2635 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] |
|
2635 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74] | |
2636 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2636 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2637 | [log.branch|branch: foo] |
|
2637 | [log.branch|branch: foo] | |
2638 | [log.phase|phase: draft] |
|
2638 | [log.phase|phase: draft] | |
2639 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] |
|
2639 | [log.parent changeset.public|parent: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47] | |
2640 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] |
|
2640 | [log.parent changeset.public|parent: -1:0000000000000000000000000000000000000000] | |
2641 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] |
|
2641 | [ui.debug log.manifest|manifest: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc] | |
2642 | [log.user|user: person] |
|
2642 | [log.user|user: person] | |
2643 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2643 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2644 | [ui.debug log.extra|extra: branch=foo] |
|
2644 | [ui.debug log.extra|extra: branch=foo] | |
2645 | [ui.note log.description|description:] |
|
2645 | [ui.note log.description|description:] | |
2646 | [ui.note log.description|new branch] |
|
2646 | [ui.note log.description|new branch] | |
2647 |
|
2647 | |||
2648 |
|
2648 | |||
2649 | $ hg --color=debug log -v -T bisect -r 0:4 |
|
2649 | $ hg --color=debug log -v -T bisect -r 0:4 | |
2650 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] |
|
2650 | [log.changeset changeset.public|changeset: 0:1e4e1b8f71e0] | |
2651 | [log.bisect bisect.good|bisect: good (implicit)] |
|
2651 | [log.bisect bisect.good|bisect: good (implicit)] | |
2652 | [log.user|user: User Name <user@hostname>] |
|
2652 | [log.user|user: User Name <user@hostname>] | |
2653 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] |
|
2653 | [log.date|date: Mon Jan 12 13:46:40 1970 +0000] | |
2654 | [ui.note log.files|files: a] |
|
2654 | [ui.note log.files|files: a] | |
2655 | [ui.note log.description|description:] |
|
2655 | [ui.note log.description|description:] | |
2656 | [ui.note log.description|line 1 |
|
2656 | [ui.note log.description|line 1 | |
2657 | line 2] |
|
2657 | line 2] | |
2658 |
|
2658 | |||
2659 |
|
2659 | |||
2660 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] |
|
2660 | [log.changeset changeset.public|changeset: 1:b608e9d1a3f0] | |
2661 | [log.bisect bisect.good|bisect: good] |
|
2661 | [log.bisect bisect.good|bisect: good] | |
2662 | [log.user|user: A. N. Other <other@place>] |
|
2662 | [log.user|user: A. N. Other <other@place>] | |
2663 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] |
|
2663 | [log.date|date: Tue Jan 13 17:33:20 1970 +0000] | |
2664 | [ui.note log.files|files: b] |
|
2664 | [ui.note log.files|files: b] | |
2665 | [ui.note log.description|description:] |
|
2665 | [ui.note log.description|description:] | |
2666 | [ui.note log.description|other 1 |
|
2666 | [ui.note log.description|other 1 | |
2667 | other 2 |
|
2667 | other 2 | |
2668 |
|
2668 | |||
2669 | other 3] |
|
2669 | other 3] | |
2670 |
|
2670 | |||
2671 |
|
2671 | |||
2672 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] |
|
2672 | [log.changeset changeset.public|changeset: 2:97054abb4ab8] | |
2673 | [log.bisect bisect.untested|bisect: untested] |
|
2673 | [log.bisect bisect.untested|bisect: untested] | |
2674 | [log.user|user: other@place] |
|
2674 | [log.user|user: other@place] | |
2675 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] |
|
2675 | [log.date|date: Wed Jan 14 21:20:00 1970 +0000] | |
2676 | [ui.note log.files|files: c] |
|
2676 | [ui.note log.files|files: c] | |
2677 | [ui.note log.description|description:] |
|
2677 | [ui.note log.description|description:] | |
2678 | [ui.note log.description|no person] |
|
2678 | [ui.note log.description|no person] | |
2679 |
|
2679 | |||
2680 |
|
2680 | |||
2681 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] |
|
2681 | [log.changeset changeset.public|changeset: 3:10e46f2dcbf4] | |
2682 | [log.bisect bisect.bad|bisect: bad] |
|
2682 | [log.bisect bisect.bad|bisect: bad] | |
2683 | [log.user|user: person] |
|
2683 | [log.user|user: person] | |
2684 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] |
|
2684 | [log.date|date: Fri Jan 16 01:06:40 1970 +0000] | |
2685 | [ui.note log.files|files: c] |
|
2685 | [ui.note log.files|files: c] | |
2686 | [ui.note log.description|description:] |
|
2686 | [ui.note log.description|description:] | |
2687 | [ui.note log.description|no user, no domain] |
|
2687 | [ui.note log.description|no user, no domain] | |
2688 |
|
2688 | |||
2689 |
|
2689 | |||
2690 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] |
|
2690 | [log.changeset changeset.draft|changeset: 4:bbe44766e73d] | |
2691 | [log.bisect bisect.bad|bisect: bad (implicit)] |
|
2691 | [log.bisect bisect.bad|bisect: bad (implicit)] | |
2692 | [log.branch|branch: foo] |
|
2692 | [log.branch|branch: foo] | |
2693 | [log.user|user: person] |
|
2693 | [log.user|user: person] | |
2694 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] |
|
2694 | [log.date|date: Sat Jan 17 04:53:20 1970 +0000] | |
2695 | [ui.note log.description|description:] |
|
2695 | [ui.note log.description|description:] | |
2696 | [ui.note log.description|new branch] |
|
2696 | [ui.note log.description|new branch] | |
2697 |
|
2697 | |||
2698 |
|
2698 | |||
2699 | $ hg bisect --reset |
|
2699 | $ hg bisect --reset | |
2700 |
|
2700 | |||
2701 | Error on syntax: |
|
2701 | Error on syntax: | |
2702 |
|
2702 | |||
2703 | $ echo 'x = "f' >> t |
|
2703 | $ echo 'x = "f' >> t | |
2704 | $ hg log |
|
2704 | $ hg log | |
2705 | hg: parse error at t:3: unmatched quotes |
|
2705 | hg: parse error at t:3: unmatched quotes | |
2706 | [255] |
|
2706 | [255] | |
2707 |
|
2707 | |||
2708 | $ hg log -T '{date' |
|
2708 | $ hg log -T '{date' | |
2709 | hg: parse error at 1: unterminated template expansion |
|
2709 | hg: parse error at 1: unterminated template expansion | |
2710 | [255] |
|
2710 | [255] | |
2711 |
|
2711 | |||
2712 | Behind the scenes, this will throw TypeError |
|
2712 | Behind the scenes, this will throw TypeError | |
2713 |
|
2713 | |||
2714 | $ hg log -l 3 --template '{date|obfuscate}\n' |
|
2714 | $ hg log -l 3 --template '{date|obfuscate}\n' | |
2715 | abort: template filter 'obfuscate' is not compatible with keyword 'date' |
|
2715 | abort: template filter 'obfuscate' is not compatible with keyword 'date' | |
2716 | [255] |
|
2716 | [255] | |
2717 |
|
2717 | |||
2718 | Behind the scenes, this will throw a ValueError |
|
2718 | Behind the scenes, this will throw a ValueError | |
2719 |
|
2719 | |||
2720 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' |
|
2720 | $ hg log -l 3 --template 'line: {desc|shortdate}\n' | |
2721 | abort: template filter 'shortdate' is not compatible with keyword 'desc' |
|
2721 | abort: template filter 'shortdate' is not compatible with keyword 'desc' | |
2722 | [255] |
|
2722 | [255] | |
2723 |
|
2723 | |||
2724 | Behind the scenes, this will throw AttributeError |
|
2724 | Behind the scenes, this will throw AttributeError | |
2725 |
|
2725 | |||
2726 | $ hg log -l 3 --template 'line: {date|escape}\n' |
|
2726 | $ hg log -l 3 --template 'line: {date|escape}\n' | |
2727 | abort: template filter 'escape' is not compatible with keyword 'date' |
|
2727 | abort: template filter 'escape' is not compatible with keyword 'date' | |
2728 | [255] |
|
2728 | [255] | |
2729 |
|
2729 | |||
2730 | $ hg log -l 3 --template 'line: {extras|localdate}\n' |
|
2730 | $ hg log -l 3 --template 'line: {extras|localdate}\n' | |
2731 | hg: parse error: localdate expects a date information |
|
2731 | hg: parse error: localdate expects a date information | |
2732 | [255] |
|
2732 | [255] | |
2733 |
|
2733 | |||
2734 | Behind the scenes, this will throw ValueError |
|
2734 | Behind the scenes, this will throw ValueError | |
2735 |
|
2735 | |||
2736 | $ hg tip --template '{author|email|date}\n' |
|
2736 | $ hg tip --template '{author|email|date}\n' | |
2737 | hg: parse error: date expects a date information |
|
2737 | hg: parse error: date expects a date information | |
2738 | [255] |
|
2738 | [255] | |
2739 |
|
2739 | |||
2740 | $ hg tip -T '{author|email|shortdate}\n' |
|
2740 | $ hg tip -T '{author|email|shortdate}\n' | |
2741 | abort: template filter 'shortdate' is not compatible with keyword 'author' |
|
2741 | abort: template filter 'shortdate' is not compatible with keyword 'author' | |
2742 | [255] |
|
2742 | [255] | |
2743 |
|
2743 | |||
2744 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' |
|
2744 | $ hg tip -T '{get(extras, "branch")|shortdate}\n' | |
2745 | abort: incompatible use of template filter 'shortdate' |
|
2745 | abort: incompatible use of template filter 'shortdate' | |
2746 | [255] |
|
2746 | [255] | |
2747 |
|
2747 | |||
2748 | Error in nested template: |
|
2748 | Error in nested template: | |
2749 |
|
2749 | |||
2750 | $ hg log -T '{"date' |
|
2750 | $ hg log -T '{"date' | |
2751 | hg: parse error at 2: unterminated string |
|
2751 | hg: parse error at 2: unterminated string | |
2752 | [255] |
|
2752 | [255] | |
2753 |
|
2753 | |||
2754 | $ hg log -T '{"foo{date|?}"}' |
|
2754 | $ hg log -T '{"foo{date|?}"}' | |
2755 | hg: parse error at 11: syntax error |
|
2755 | hg: parse error at 11: syntax error | |
2756 | [255] |
|
2756 | [255] | |
2757 |
|
2757 | |||
2758 | Thrown an error if a template function doesn't exist |
|
2758 | Thrown an error if a template function doesn't exist | |
2759 |
|
2759 | |||
2760 | $ hg tip --template '{foo()}\n' |
|
2760 | $ hg tip --template '{foo()}\n' | |
2761 | hg: parse error: unknown function 'foo' |
|
2761 | hg: parse error: unknown function 'foo' | |
2762 | [255] |
|
2762 | [255] | |
2763 |
|
2763 | |||
2764 | Pass generator object created by template function to filter |
|
2764 | Pass generator object created by template function to filter | |
2765 |
|
2765 | |||
2766 | $ hg log -l 1 --template '{if(author, author)|user}\n' |
|
2766 | $ hg log -l 1 --template '{if(author, author)|user}\n' | |
2767 | test |
|
2767 | test | |
2768 |
|
2768 | |||
2769 | Test index keyword: |
|
2769 | Test index keyword: | |
2770 |
|
2770 | |||
2771 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' |
|
2771 | $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' | |
2772 | 10 0:a 1:b 2:fifth 3:fourth 4:third |
|
2772 | 10 0:a 1:b 2:fifth 3:fourth 4:third | |
2773 | 11 0:a |
|
2773 | 11 0:a | |
2774 |
|
2774 | |||
2775 | $ hg branches -T '{index} {branch}\n' |
|
2775 | $ hg branches -T '{index} {branch}\n' | |
2776 | 0 default |
|
2776 | 0 default | |
2777 | 1 foo |
|
2777 | 1 foo | |
2778 |
|
2778 | |||
2779 | Test diff function: |
|
2779 | Test diff function: | |
2780 |
|
2780 | |||
2781 | $ hg diff -c 8 |
|
2781 | $ hg diff -c 8 | |
2782 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2782 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2783 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2783 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2784 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2784 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2785 | @@ -0,0 +1,1 @@ |
|
2785 | @@ -0,0 +1,1 @@ | |
2786 | +second |
|
2786 | +second | |
2787 | diff -r 29114dbae42b -r 95c24699272e second |
|
2787 | diff -r 29114dbae42b -r 95c24699272e second | |
2788 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2788 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2789 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2789 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2790 | @@ -1,1 +0,0 @@ |
|
2790 | @@ -1,1 +0,0 @@ | |
2791 | -second |
|
2791 | -second | |
2792 | diff -r 29114dbae42b -r 95c24699272e third |
|
2792 | diff -r 29114dbae42b -r 95c24699272e third | |
2793 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2793 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2794 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2794 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2795 | @@ -0,0 +1,1 @@ |
|
2795 | @@ -0,0 +1,1 @@ | |
2796 | +third |
|
2796 | +third | |
2797 |
|
2797 | |||
2798 | $ hg log -r 8 -T "{diff()}" |
|
2798 | $ hg log -r 8 -T "{diff()}" | |
2799 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2799 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2800 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2800 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2801 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2801 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2802 | @@ -0,0 +1,1 @@ |
|
2802 | @@ -0,0 +1,1 @@ | |
2803 | +second |
|
2803 | +second | |
2804 | diff -r 29114dbae42b -r 95c24699272e second |
|
2804 | diff -r 29114dbae42b -r 95c24699272e second | |
2805 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2805 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2806 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2806 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2807 | @@ -1,1 +0,0 @@ |
|
2807 | @@ -1,1 +0,0 @@ | |
2808 | -second |
|
2808 | -second | |
2809 | diff -r 29114dbae42b -r 95c24699272e third |
|
2809 | diff -r 29114dbae42b -r 95c24699272e third | |
2810 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2810 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2811 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2811 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2812 | @@ -0,0 +1,1 @@ |
|
2812 | @@ -0,0 +1,1 @@ | |
2813 | +third |
|
2813 | +third | |
2814 |
|
2814 | |||
2815 | $ hg log -r 8 -T "{diff('glob:f*')}" |
|
2815 | $ hg log -r 8 -T "{diff('glob:f*')}" | |
2816 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2816 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2817 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2817 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2818 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2818 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2819 | @@ -0,0 +1,1 @@ |
|
2819 | @@ -0,0 +1,1 @@ | |
2820 | +second |
|
2820 | +second | |
2821 |
|
2821 | |||
2822 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" |
|
2822 | $ hg log -r 8 -T "{diff('', 'glob:f*')}" | |
2823 | diff -r 29114dbae42b -r 95c24699272e second |
|
2823 | diff -r 29114dbae42b -r 95c24699272e second | |
2824 | --- a/second Mon Jan 12 13:46:40 1970 +0000 |
|
2824 | --- a/second Mon Jan 12 13:46:40 1970 +0000 | |
2825 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2825 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2826 | @@ -1,1 +0,0 @@ |
|
2826 | @@ -1,1 +0,0 @@ | |
2827 | -second |
|
2827 | -second | |
2828 | diff -r 29114dbae42b -r 95c24699272e third |
|
2828 | diff -r 29114dbae42b -r 95c24699272e third | |
2829 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2829 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2830 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 |
|
2830 | +++ b/third Wed Jan 01 10:01:00 2020 +0000 | |
2831 | @@ -0,0 +1,1 @@ |
|
2831 | @@ -0,0 +1,1 @@ | |
2832 | +third |
|
2832 | +third | |
2833 |
|
2833 | |||
2834 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" |
|
2834 | $ hg log -r 8 -T "{diff('FOURTH'|lower)}" | |
2835 | diff -r 29114dbae42b -r 95c24699272e fourth |
|
2835 | diff -r 29114dbae42b -r 95c24699272e fourth | |
2836 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2836 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2837 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 |
|
2837 | +++ b/fourth Wed Jan 01 10:01:00 2020 +0000 | |
2838 | @@ -0,0 +1,1 @@ |
|
2838 | @@ -0,0 +1,1 @@ | |
2839 | +second |
|
2839 | +second | |
2840 |
|
2840 | |||
2841 | $ cd .. |
|
2841 | $ cd .. | |
2842 |
|
2842 | |||
2843 |
|
2843 | |||
2844 | latesttag: |
|
2844 | latesttag: | |
2845 |
|
2845 | |||
2846 | $ hg init latesttag |
|
2846 | $ hg init latesttag | |
2847 | $ cd latesttag |
|
2847 | $ cd latesttag | |
2848 |
|
2848 | |||
2849 | $ echo a > file |
|
2849 | $ echo a > file | |
2850 | $ hg ci -Am a -d '0 0' |
|
2850 | $ hg ci -Am a -d '0 0' | |
2851 | adding file |
|
2851 | adding file | |
2852 |
|
2852 | |||
2853 | $ echo b >> file |
|
2853 | $ echo b >> file | |
2854 | $ hg ci -m b -d '1 0' |
|
2854 | $ hg ci -m b -d '1 0' | |
2855 |
|
2855 | |||
2856 | $ echo c >> head1 |
|
2856 | $ echo c >> head1 | |
2857 | $ hg ci -Am h1c -d '2 0' |
|
2857 | $ hg ci -Am h1c -d '2 0' | |
2858 | adding head1 |
|
2858 | adding head1 | |
2859 |
|
2859 | |||
2860 | $ hg update -q 1 |
|
2860 | $ hg update -q 1 | |
2861 | $ echo d >> head2 |
|
2861 | $ echo d >> head2 | |
2862 | $ hg ci -Am h2d -d '3 0' |
|
2862 | $ hg ci -Am h2d -d '3 0' | |
2863 | adding head2 |
|
2863 | adding head2 | |
2864 | created new head |
|
2864 | created new head | |
2865 |
|
2865 | |||
2866 | $ echo e >> head2 |
|
2866 | $ echo e >> head2 | |
2867 | $ hg ci -m h2e -d '4 0' |
|
2867 | $ hg ci -m h2e -d '4 0' | |
2868 |
|
2868 | |||
2869 | $ hg merge -q |
|
2869 | $ hg merge -q | |
2870 | $ hg ci -m merge -d '5 -3600' |
|
2870 | $ hg ci -m merge -d '5 -3600' | |
2871 |
|
2871 | |||
2872 | No tag set: |
|
2872 | No tag set: | |
2873 |
|
2873 | |||
2874 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2874 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2875 | @ 5: null+5 |
|
2875 | @ 5: null+5 | |
2876 | |\ |
|
2876 | |\ | |
2877 | | o 4: null+4 |
|
2877 | | o 4: null+4 | |
2878 | | | |
|
2878 | | | | |
2879 | | o 3: null+3 |
|
2879 | | o 3: null+3 | |
2880 | | | |
|
2880 | | | | |
2881 | o | 2: null+3 |
|
2881 | o | 2: null+3 | |
2882 | |/ |
|
2882 | |/ | |
2883 | o 1: null+2 |
|
2883 | o 1: null+2 | |
2884 | | |
|
2884 | | | |
2885 | o 0: null+1 |
|
2885 | o 0: null+1 | |
2886 |
|
2886 | |||
2887 |
|
2887 | |||
2888 | One common tag: longest path wins: |
|
2888 | One common tag: longest path wins for {latesttagdistance}: | |
2889 |
|
2889 | |||
2890 | $ hg tag -r 1 -m t1 -d '6 0' t1 |
|
2890 | $ hg tag -r 1 -m t1 -d '6 0' t1 | |
2891 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2891 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2892 | @ 6: t1+4 |
|
2892 | @ 6: t1+4 | |
2893 | | |
|
2893 | | | |
2894 | o 5: t1+3 |
|
2894 | o 5: t1+3 | |
2895 | |\ |
|
2895 | |\ | |
2896 | | o 4: t1+2 |
|
2896 | | o 4: t1+2 | |
2897 | | | |
|
2897 | | | | |
2898 | | o 3: t1+1 |
|
2898 | | o 3: t1+1 | |
2899 | | | |
|
2899 | | | | |
2900 | o | 2: t1+1 |
|
2900 | o | 2: t1+1 | |
2901 | |/ |
|
2901 | |/ | |
2902 | o 1: t1+0 |
|
2902 | o 1: t1+0 | |
2903 | | |
|
2903 | | | |
2904 | o 0: null+1 |
|
2904 | o 0: null+1 | |
2905 |
|
2905 | |||
2906 |
|
2906 | |||
2907 |
One ancestor tag: |
|
2907 | One ancestor tag: closest wins: | |
2908 |
|
2908 | |||
2909 | $ hg tag -r 2 -m t2 -d '7 0' t2 |
|
2909 | $ hg tag -r 2 -m t2 -d '7 0' t2 | |
2910 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2910 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2911 | @ 7: t2+3 |
|
2911 | @ 7: t2+3 | |
2912 | | |
|
2912 | | | |
2913 | o 6: t2+2 |
|
2913 | o 6: t2+2 | |
2914 | | |
|
2914 | | | |
2915 | o 5: t2+1 |
|
2915 | o 5: t2+1 | |
2916 | |\ |
|
2916 | |\ | |
2917 | | o 4: t1+2 |
|
2917 | | o 4: t1+2 | |
2918 | | | |
|
2918 | | | | |
2919 | | o 3: t1+1 |
|
2919 | | o 3: t1+1 | |
2920 | | | |
|
2920 | | | | |
2921 | o | 2: t2+0 |
|
2921 | o | 2: t2+0 | |
2922 | |/ |
|
2922 | |/ | |
2923 | o 1: t1+0 |
|
2923 | o 1: t1+0 | |
2924 | | |
|
2924 | | | |
2925 | o 0: null+1 |
|
2925 | o 0: null+1 | |
2926 |
|
2926 | |||
2927 |
|
2927 | |||
2928 | Two branch tags: more recent wins: |
|
2928 | Two branch tags: more recent wins if same number of changes: | |
2929 |
|
2929 | |||
2930 | $ hg tag -r 3 -m t3 -d '8 0' t3 |
|
2930 | $ hg tag -r 3 -m t3 -d '8 0' t3 | |
2931 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2931 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2932 | @ 8: t3+5 |
|
2932 | @ 8: t3+5 | |
2933 | | |
|
2933 | | | |
2934 | o 7: t3+4 |
|
2934 | o 7: t3+4 | |
2935 | | |
|
2935 | | | |
2936 | o 6: t3+3 |
|
2936 | o 6: t3+3 | |
2937 | | |
|
2937 | | | |
2938 | o 5: t3+2 |
|
2938 | o 5: t3+2 | |
2939 | |\ |
|
2939 | |\ | |
2940 | | o 4: t3+1 |
|
2940 | | o 4: t3+1 | |
2941 | | | |
|
2941 | | | | |
2942 | | o 3: t3+0 |
|
2942 | | o 3: t3+0 | |
2943 | | | |
|
2943 | | | | |
2944 | o | 2: t2+0 |
|
2944 | o | 2: t2+0 | |
2945 | |/ |
|
2945 | |/ | |
2946 | o 1: t1+0 |
|
2946 | o 1: t1+0 | |
2947 | | |
|
2947 | | | |
2948 | o 0: null+1 |
|
2948 | o 0: null+1 | |
2949 |
|
2949 | |||
2950 |
|
2950 | |||
|
2951 | Two branch tags: fewest changes wins: | |||
|
2952 | ||||
|
2953 | $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter | |||
|
2954 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" | |||
|
2955 | @ 9: t4+5,6 | |||
|
2956 | | | |||
|
2957 | o 8: t4+4,5 | |||
|
2958 | | | |||
|
2959 | o 7: t4+3,4 | |||
|
2960 | | | |||
|
2961 | o 6: t4+2,3 | |||
|
2962 | | | |||
|
2963 | o 5: t4+1,2 | |||
|
2964 | |\ | |||
|
2965 | | o 4: t4+0,0 | |||
|
2966 | | | | |||
|
2967 | | o 3: t3+0,0 | |||
|
2968 | | | | |||
|
2969 | o | 2: t2+0,0 | |||
|
2970 | |/ | |||
|
2971 | o 1: t1+0,0 | |||
|
2972 | | | |||
|
2973 | o 0: null+1,1 | |||
|
2974 | ||||
|
2975 | ||||
2951 | Merged tag overrides: |
|
2976 | Merged tag overrides: | |
2952 |
|
2977 | |||
2953 | $ hg tag -r 5 -m t5 -d '9 0' t5 |
|
2978 | $ hg tag -r 5 -m t5 -d '9 0' t5 | |
2954 | $ hg tag -r 3 -m at3 -d '10 0' at3 |
|
2979 | $ hg tag -r 3 -m at3 -d '10 0' at3 | |
2955 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' |
|
2980 | $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n' | |
2956 |
@ 1 |
|
2981 | @ 11: t5+6 | |
|
2982 | | | |||
|
2983 | o 10: t5+5 | |||
2957 | | |
|
2984 | | | |
2958 | o 9: t5+4 |
|
2985 | o 9: t5+4 | |
2959 | | |
|
2986 | | | |
2960 | o 8: t5+3 |
|
2987 | o 8: t5+3 | |
2961 | | |
|
2988 | | | |
2962 | o 7: t5+2 |
|
2989 | o 7: t5+2 | |
2963 | | |
|
2990 | | | |
2964 | o 6: t5+1 |
|
2991 | o 6: t5+1 | |
2965 | | |
|
2992 | | | |
2966 | o 5: t5+0 |
|
2993 | o 5: t5+0 | |
2967 | |\ |
|
2994 | |\ | |
2968 |
| o 4: |
|
2995 | | o 4: t4+0 | |
2969 | | | |
|
2996 | | | | |
2970 | | o 3: at3:t3+0 |
|
2997 | | o 3: at3:t3+0 | |
2971 | | | |
|
2998 | | | | |
2972 | o | 2: t2+0 |
|
2999 | o | 2: t2+0 | |
2973 | |/ |
|
3000 | |/ | |
2974 | o 1: t1+0 |
|
3001 | o 1: t1+0 | |
2975 | | |
|
3002 | | | |
2976 | o 0: null+1 |
|
3003 | o 0: null+1 | |
2977 |
|
3004 | |||
2978 |
|
3005 | |||
2979 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" |
|
3006 | $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n" | |
2980 |
@ 1 |
|
3007 | @ 11: t5+6,6 | |
|
3008 | | | |||
|
3009 | o 10: t5+5,5 | |||
2981 | | |
|
3010 | | | |
2982 | o 9: t5+4,4 |
|
3011 | o 9: t5+4,4 | |
2983 | | |
|
3012 | | | |
2984 | o 8: t5+3,3 |
|
3013 | o 8: t5+3,3 | |
2985 | | |
|
3014 | | | |
2986 | o 7: t5+2,2 |
|
3015 | o 7: t5+2,2 | |
2987 | | |
|
3016 | | | |
2988 | o 6: t5+1,1 |
|
3017 | o 6: t5+1,1 | |
2989 | | |
|
3018 | | | |
2990 | o 5: t5+0,0 |
|
3019 | o 5: t5+0,0 | |
2991 | |\ |
|
3020 | |\ | |
2992 |
| o 4: |
|
3021 | | o 4: t4+0,0 | |
2993 | | | |
|
3022 | | | | |
2994 | | o 3: at3+0,0 t3+0,0 |
|
3023 | | o 3: at3+0,0 t3+0,0 | |
2995 | | | |
|
3024 | | | | |
2996 | o | 2: t2+0,0 |
|
3025 | o | 2: t2+0,0 | |
2997 | |/ |
|
3026 | |/ | |
2998 | o 1: t1+0,0 |
|
3027 | o 1: t1+0,0 | |
2999 | | |
|
3028 | | | |
3000 | o 0: null+1,1 |
|
3029 | o 0: null+1,1 | |
3001 |
|
3030 | |||
3002 |
|
3031 | |||
3003 | $ hg log -G --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" |
|
3032 | $ hg log -G --template "{rev}: {latesttag('re:^t[13]$') % '{tag}, C: {changes}, D: {distance}'}\n" | |
3004 |
@ 1 |
|
3033 | @ 11: t3, C: 9, D: 8 | |
|
3034 | | | |||
|
3035 | o 10: t3, C: 8, D: 7 | |||
3005 | | |
|
3036 | | | |
3006 | o 9: t3, C: 7, D: 6 |
|
3037 | o 9: t3, C: 7, D: 6 | |
3007 | | |
|
3038 | | | |
3008 | o 8: t3, C: 6, D: 5 |
|
3039 | o 8: t3, C: 6, D: 5 | |
3009 | | |
|
3040 | | | |
3010 | o 7: t3, C: 5, D: 4 |
|
3041 | o 7: t3, C: 5, D: 4 | |
3011 | | |
|
3042 | | | |
3012 | o 6: t3, C: 4, D: 3 |
|
3043 | o 6: t3, C: 4, D: 3 | |
3013 | | |
|
3044 | | | |
3014 | o 5: t3, C: 3, D: 2 |
|
3045 | o 5: t3, C: 3, D: 2 | |
3015 | |\ |
|
3046 | |\ | |
3016 | | o 4: t3, C: 1, D: 1 |
|
3047 | | o 4: t3, C: 1, D: 1 | |
3017 | | | |
|
3048 | | | | |
3018 | | o 3: t3, C: 0, D: 0 |
|
3049 | | o 3: t3, C: 0, D: 0 | |
3019 | | | |
|
3050 | | | | |
3020 | o | 2: t1, C: 1, D: 1 |
|
3051 | o | 2: t1, C: 1, D: 1 | |
3021 | |/ |
|
3052 | |/ | |
3022 | o 1: t1, C: 0, D: 0 |
|
3053 | o 1: t1, C: 0, D: 0 | |
3023 | | |
|
3054 | | | |
3024 | o 0: null, C: 1, D: 1 |
|
3055 | o 0: null, C: 1, D: 1 | |
3025 |
|
3056 | |||
3026 |
|
3057 | |||
3027 | $ cd .. |
|
3058 | $ cd .. | |
3028 |
|
3059 | |||
3029 |
|
3060 | |||
3030 | Style path expansion: issue1948 - ui.style option doesn't work on OSX |
|
3061 | Style path expansion: issue1948 - ui.style option doesn't work on OSX | |
3031 | if it is a relative path |
|
3062 | if it is a relative path | |
3032 |
|
3063 | |||
3033 | $ mkdir -p home/styles |
|
3064 | $ mkdir -p home/styles | |
3034 |
|
3065 | |||
3035 | $ cat > home/styles/teststyle <<EOF |
|
3066 | $ cat > home/styles/teststyle <<EOF | |
3036 | > changeset = 'test {rev}:{node|short}\n' |
|
3067 | > changeset = 'test {rev}:{node|short}\n' | |
3037 | > EOF |
|
3068 | > EOF | |
3038 |
|
3069 | |||
3039 | $ HOME=`pwd`/home; export HOME |
|
3070 | $ HOME=`pwd`/home; export HOME | |
3040 |
|
3071 | |||
3041 | $ cat > latesttag/.hg/hgrc <<EOF |
|
3072 | $ cat > latesttag/.hg/hgrc <<EOF | |
3042 | > [ui] |
|
3073 | > [ui] | |
3043 | > style = ~/styles/teststyle |
|
3074 | > style = ~/styles/teststyle | |
3044 | > EOF |
|
3075 | > EOF | |
3045 |
|
3076 | |||
3046 | $ hg -R latesttag tip |
|
3077 | $ hg -R latesttag tip | |
3047 | test 10:9b4a630e5f5f |
|
3078 | test 11:97e5943b523a | |
3048 |
|
3079 | |||
3049 | Test recursive showlist template (issue1989): |
|
3080 | Test recursive showlist template (issue1989): | |
3050 |
|
3081 | |||
3051 | $ cat > style1989 <<EOF |
|
3082 | $ cat > style1989 <<EOF | |
3052 | > changeset = '{file_mods}{manifest}{extras}' |
|
3083 | > changeset = '{file_mods}{manifest}{extras}' | |
3053 | > file_mod = 'M|{author|person}\n' |
|
3084 | > file_mod = 'M|{author|person}\n' | |
3054 | > manifest = '{rev},{author}\n' |
|
3085 | > manifest = '{rev},{author}\n' | |
3055 | > extra = '{key}: {author}\n' |
|
3086 | > extra = '{key}: {author}\n' | |
3056 | > EOF |
|
3087 | > EOF | |
3057 |
|
3088 | |||
3058 | $ hg -R latesttag log -r tip --style=style1989 |
|
3089 | $ hg -R latesttag log -r tip --style=style1989 | |
3059 | M|test |
|
3090 | M|test | |
3060 |
1 |
|
3091 | 11,test | |
3061 | branch: test |
|
3092 | branch: test | |
3062 |
|
3093 | |||
3063 | Test new-style inline templating: |
|
3094 | Test new-style inline templating: | |
3064 |
|
3095 | |||
3065 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' |
|
3096 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' | |
3066 | modified files: .hgtags |
|
3097 | modified files: .hgtags | |
3067 |
|
3098 | |||
3068 |
|
3099 | |||
3069 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' |
|
3100 | $ hg log -R latesttag -r tip -T '{rev % "a"}\n' | |
3070 | hg: parse error: keyword 'rev' is not iterable |
|
3101 | hg: parse error: keyword 'rev' is not iterable | |
3071 | [255] |
|
3102 | [255] | |
3072 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' |
|
3103 | $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n' | |
3073 | hg: parse error: None is not iterable |
|
3104 | hg: parse error: None is not iterable | |
3074 | [255] |
|
3105 | [255] | |
3075 |
|
3106 | |||
3076 | Test the sub function of templating for expansion: |
|
3107 | Test the sub function of templating for expansion: | |
3077 |
|
3108 | |||
3078 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' |
|
3109 | $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' | |
3079 | xx |
|
3110 | xx | |
3080 |
|
3111 | |||
3081 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' |
|
3112 | $ hg log -R latesttag -r 10 -T '{sub("[", "x", rev)}\n' | |
3082 | hg: parse error: sub got an invalid pattern: [ |
|
3113 | hg: parse error: sub got an invalid pattern: [ | |
3083 | [255] |
|
3114 | [255] | |
3084 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' |
|
3115 | $ hg log -R latesttag -r 10 -T '{sub("[0-9]", r"\1", rev)}\n' | |
3085 | hg: parse error: sub got an invalid replacement: \1 |
|
3116 | hg: parse error: sub got an invalid replacement: \1 | |
3086 | [255] |
|
3117 | [255] | |
3087 |
|
3118 | |||
3088 | Test the strip function with chars specified: |
|
3119 | Test the strip function with chars specified: | |
3089 |
|
3120 | |||
3090 | $ hg log -R latesttag --template '{desc}\n' |
|
3121 | $ hg log -R latesttag --template '{desc}\n' | |
3091 | at3 |
|
3122 | at3 | |
3092 | t5 |
|
3123 | t5 | |
|
3124 | t4 | |||
3093 | t3 |
|
3125 | t3 | |
3094 | t2 |
|
3126 | t2 | |
3095 | t1 |
|
3127 | t1 | |
3096 | merge |
|
3128 | merge | |
3097 | h2e |
|
3129 | h2e | |
3098 | h2d |
|
3130 | h2d | |
3099 | h1c |
|
3131 | h1c | |
3100 | b |
|
3132 | b | |
3101 | a |
|
3133 | a | |
3102 |
|
3134 | |||
3103 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' |
|
3135 | $ hg log -R latesttag --template '{strip(desc, "te")}\n' | |
3104 | at3 |
|
3136 | at3 | |
3105 | 5 |
|
3137 | 5 | |
|
3138 | 4 | |||
3106 | 3 |
|
3139 | 3 | |
3107 | 2 |
|
3140 | 2 | |
3108 | 1 |
|
3141 | 1 | |
3109 | merg |
|
3142 | merg | |
3110 | h2 |
|
3143 | h2 | |
3111 | h2d |
|
3144 | h2d | |
3112 | h1c |
|
3145 | h1c | |
3113 | b |
|
3146 | b | |
3114 | a |
|
3147 | a | |
3115 |
|
3148 | |||
3116 | Test date format: |
|
3149 | Test date format: | |
3117 |
|
3150 | |||
3118 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' |
|
3151 | $ hg log -R latesttag --template 'date: {date(date, "%y %m %d %S %z")}\n' | |
3119 | date: 70 01 01 10 +0000 |
|
3152 | date: 70 01 01 10 +0000 | |
3120 | date: 70 01 01 09 +0000 |
|
3153 | date: 70 01 01 09 +0000 | |
|
3154 | date: 70 01 01 04 +0000 | |||
3121 | date: 70 01 01 08 +0000 |
|
3155 | date: 70 01 01 08 +0000 | |
3122 | date: 70 01 01 07 +0000 |
|
3156 | date: 70 01 01 07 +0000 | |
3123 | date: 70 01 01 06 +0000 |
|
3157 | date: 70 01 01 06 +0000 | |
3124 | date: 70 01 01 05 +0100 |
|
3158 | date: 70 01 01 05 +0100 | |
3125 | date: 70 01 01 04 +0000 |
|
3159 | date: 70 01 01 04 +0000 | |
3126 | date: 70 01 01 03 +0000 |
|
3160 | date: 70 01 01 03 +0000 | |
3127 | date: 70 01 01 02 +0000 |
|
3161 | date: 70 01 01 02 +0000 | |
3128 | date: 70 01 01 01 +0000 |
|
3162 | date: 70 01 01 01 +0000 | |
3129 | date: 70 01 01 00 +0000 |
|
3163 | date: 70 01 01 00 +0000 | |
3130 |
|
3164 | |||
3131 | Test invalid date: |
|
3165 | Test invalid date: | |
3132 |
|
3166 | |||
3133 | $ hg log -R latesttag -T '{date(rev)}\n' |
|
3167 | $ hg log -R latesttag -T '{date(rev)}\n' | |
3134 | hg: parse error: date expects a date information |
|
3168 | hg: parse error: date expects a date information | |
3135 | [255] |
|
3169 | [255] | |
3136 |
|
3170 | |||
3137 | Test integer literal: |
|
3171 | Test integer literal: | |
3138 |
|
3172 | |||
3139 | $ hg debugtemplate -v '{(0)}\n' |
|
3173 | $ hg debugtemplate -v '{(0)}\n' | |
3140 | (template |
|
3174 | (template | |
3141 | (group |
|
3175 | (group | |
3142 | ('integer', '0')) |
|
3176 | ('integer', '0')) | |
3143 | ('string', '\n')) |
|
3177 | ('string', '\n')) | |
3144 | 0 |
|
3178 | 0 | |
3145 | $ hg debugtemplate -v '{(123)}\n' |
|
3179 | $ hg debugtemplate -v '{(123)}\n' | |
3146 | (template |
|
3180 | (template | |
3147 | (group |
|
3181 | (group | |
3148 | ('integer', '123')) |
|
3182 | ('integer', '123')) | |
3149 | ('string', '\n')) |
|
3183 | ('string', '\n')) | |
3150 | 123 |
|
3184 | 123 | |
3151 | $ hg debugtemplate -v '{(-4)}\n' |
|
3185 | $ hg debugtemplate -v '{(-4)}\n' | |
3152 | (template |
|
3186 | (template | |
3153 | (group |
|
3187 | (group | |
3154 | (negate |
|
3188 | (negate | |
3155 | ('integer', '4'))) |
|
3189 | ('integer', '4'))) | |
3156 | ('string', '\n')) |
|
3190 | ('string', '\n')) | |
3157 | -4 |
|
3191 | -4 | |
3158 | $ hg debugtemplate '{(-)}\n' |
|
3192 | $ hg debugtemplate '{(-)}\n' | |
3159 | hg: parse error at 3: not a prefix: ) |
|
3193 | hg: parse error at 3: not a prefix: ) | |
3160 | [255] |
|
3194 | [255] | |
3161 | $ hg debugtemplate '{(-a)}\n' |
|
3195 | $ hg debugtemplate '{(-a)}\n' | |
3162 | hg: parse error: negation needs an integer argument |
|
3196 | hg: parse error: negation needs an integer argument | |
3163 | [255] |
|
3197 | [255] | |
3164 |
|
3198 | |||
3165 | top-level integer literal is interpreted as symbol (i.e. variable name): |
|
3199 | top-level integer literal is interpreted as symbol (i.e. variable name): | |
3166 |
|
3200 | |||
3167 | $ hg debugtemplate -D 1=one -v '{1}\n' |
|
3201 | $ hg debugtemplate -D 1=one -v '{1}\n' | |
3168 | (template |
|
3202 | (template | |
3169 | ('integer', '1') |
|
3203 | ('integer', '1') | |
3170 | ('string', '\n')) |
|
3204 | ('string', '\n')) | |
3171 | one |
|
3205 | one | |
3172 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' |
|
3206 | $ hg debugtemplate -D 1=one -v '{if("t", "{1}")}\n' | |
3173 | (template |
|
3207 | (template | |
3174 | (func |
|
3208 | (func | |
3175 | ('symbol', 'if') |
|
3209 | ('symbol', 'if') | |
3176 | (list |
|
3210 | (list | |
3177 | ('string', 't') |
|
3211 | ('string', 't') | |
3178 | (template |
|
3212 | (template | |
3179 | ('integer', '1')))) |
|
3213 | ('integer', '1')))) | |
3180 | ('string', '\n')) |
|
3214 | ('string', '\n')) | |
3181 | one |
|
3215 | one | |
3182 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' |
|
3216 | $ hg debugtemplate -D 1=one -v '{1|stringify}\n' | |
3183 | (template |
|
3217 | (template | |
3184 | (| |
|
3218 | (| | |
3185 | ('integer', '1') |
|
3219 | ('integer', '1') | |
3186 | ('symbol', 'stringify')) |
|
3220 | ('symbol', 'stringify')) | |
3187 | ('string', '\n')) |
|
3221 | ('string', '\n')) | |
3188 | one |
|
3222 | one | |
3189 |
|
3223 | |||
3190 | unless explicit symbol is expected: |
|
3224 | unless explicit symbol is expected: | |
3191 |
|
3225 | |||
3192 | $ hg log -Ra -r0 -T '{desc|1}\n' |
|
3226 | $ hg log -Ra -r0 -T '{desc|1}\n' | |
3193 | hg: parse error: expected a symbol, got 'integer' |
|
3227 | hg: parse error: expected a symbol, got 'integer' | |
3194 | [255] |
|
3228 | [255] | |
3195 | $ hg log -Ra -r0 -T '{1()}\n' |
|
3229 | $ hg log -Ra -r0 -T '{1()}\n' | |
3196 | hg: parse error: expected a symbol, got 'integer' |
|
3230 | hg: parse error: expected a symbol, got 'integer' | |
3197 | [255] |
|
3231 | [255] | |
3198 |
|
3232 | |||
3199 | Test string literal: |
|
3233 | Test string literal: | |
3200 |
|
3234 | |||
3201 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' |
|
3235 | $ hg debugtemplate -Ra -r0 -v '{"string with no template fragment"}\n' | |
3202 | (template |
|
3236 | (template | |
3203 | ('string', 'string with no template fragment') |
|
3237 | ('string', 'string with no template fragment') | |
3204 | ('string', '\n')) |
|
3238 | ('string', '\n')) | |
3205 | string with no template fragment |
|
3239 | string with no template fragment | |
3206 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' |
|
3240 | $ hg debugtemplate -Ra -r0 -v '{"template: {rev}"}\n' | |
3207 | (template |
|
3241 | (template | |
3208 | (template |
|
3242 | (template | |
3209 | ('string', 'template: ') |
|
3243 | ('string', 'template: ') | |
3210 | ('symbol', 'rev')) |
|
3244 | ('symbol', 'rev')) | |
3211 | ('string', '\n')) |
|
3245 | ('string', '\n')) | |
3212 | template: 0 |
|
3246 | template: 0 | |
3213 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' |
|
3247 | $ hg debugtemplate -Ra -r0 -v '{r"rawstring: {rev}"}\n' | |
3214 | (template |
|
3248 | (template | |
3215 | ('string', 'rawstring: {rev}') |
|
3249 | ('string', 'rawstring: {rev}') | |
3216 | ('string', '\n')) |
|
3250 | ('string', '\n')) | |
3217 | rawstring: {rev} |
|
3251 | rawstring: {rev} | |
3218 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' |
|
3252 | $ hg debugtemplate -Ra -r0 -v '{files % r"rawstring: {file}"}\n' | |
3219 | (template |
|
3253 | (template | |
3220 | (% |
|
3254 | (% | |
3221 | ('symbol', 'files') |
|
3255 | ('symbol', 'files') | |
3222 | ('string', 'rawstring: {file}')) |
|
3256 | ('string', 'rawstring: {file}')) | |
3223 | ('string', '\n')) |
|
3257 | ('string', '\n')) | |
3224 | rawstring: {file} |
|
3258 | rawstring: {file} | |
3225 |
|
3259 | |||
3226 | Test string escaping: |
|
3260 | Test string escaping: | |
3227 |
|
3261 | |||
3228 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3262 | $ hg log -R latesttag -r 0 --template '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3229 | > |
|
3263 | > | |
3230 | <>\n<[> |
|
3264 | <>\n<[> | |
3231 | <>\n<]> |
|
3265 | <>\n<]> | |
3232 | <>\n< |
|
3266 | <>\n< | |
3233 |
|
3267 | |||
3234 | $ hg log -R latesttag -r 0 \ |
|
3268 | $ hg log -R latesttag -r 0 \ | |
3235 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3269 | > --config ui.logtemplate='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3236 | > |
|
3270 | > | |
3237 | <>\n<[> |
|
3271 | <>\n<[> | |
3238 | <>\n<]> |
|
3272 | <>\n<]> | |
3239 | <>\n< |
|
3273 | <>\n< | |
3240 |
|
3274 | |||
3241 | $ hg log -R latesttag -r 0 -T esc \ |
|
3275 | $ hg log -R latesttag -r 0 -T esc \ | |
3242 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3276 | > --config templates.esc='>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3243 | > |
|
3277 | > | |
3244 | <>\n<[> |
|
3278 | <>\n<[> | |
3245 | <>\n<]> |
|
3279 | <>\n<]> | |
3246 | <>\n< |
|
3280 | <>\n< | |
3247 |
|
3281 | |||
3248 | $ cat <<'EOF' > esctmpl |
|
3282 | $ cat <<'EOF' > esctmpl | |
3249 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' |
|
3283 | > changeset = '>\n<>\\n<{if(rev, "[>\n<>\\n<]")}>\n<>\\n<\n' | |
3250 | > EOF |
|
3284 | > EOF | |
3251 | $ hg log -R latesttag -r 0 --style ./esctmpl |
|
3285 | $ hg log -R latesttag -r 0 --style ./esctmpl | |
3252 | > |
|
3286 | > | |
3253 | <>\n<[> |
|
3287 | <>\n<[> | |
3254 | <>\n<]> |
|
3288 | <>\n<]> | |
3255 | <>\n< |
|
3289 | <>\n< | |
3256 |
|
3290 | |||
3257 | Test string escaping of quotes: |
|
3291 | Test string escaping of quotes: | |
3258 |
|
3292 | |||
3259 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
3293 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3260 | " |
|
3294 | " | |
3261 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
3295 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3262 | \" |
|
3296 | \" | |
3263 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
3297 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3264 | \" |
|
3298 | \" | |
3265 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
3299 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3266 | \\\" |
|
3300 | \\\" | |
3267 |
|
3301 | |||
3268 |
|
3302 | |||
3269 | $ hg log -Ra -r0 -T '{"\""}\n' |
|
3303 | $ hg log -Ra -r0 -T '{"\""}\n' | |
3270 | " |
|
3304 | " | |
3271 | $ hg log -Ra -r0 -T '{"\\\""}\n' |
|
3305 | $ hg log -Ra -r0 -T '{"\\\""}\n' | |
3272 | \" |
|
3306 | \" | |
3273 | $ hg log -Ra -r0 -T '{r"\""}\n' |
|
3307 | $ hg log -Ra -r0 -T '{r"\""}\n' | |
3274 | \" |
|
3308 | \" | |
3275 | $ hg log -Ra -r0 -T '{r"\\\""}\n' |
|
3309 | $ hg log -Ra -r0 -T '{r"\\\""}\n' | |
3276 | \\\" |
|
3310 | \\\" | |
3277 |
|
3311 | |||
3278 | Test exception in quoted template. single backslash before quotation mark is |
|
3312 | Test exception in quoted template. single backslash before quotation mark is | |
3279 | stripped before parsing: |
|
3313 | stripped before parsing: | |
3280 |
|
3314 | |||
3281 | $ cat <<'EOF' > escquotetmpl |
|
3315 | $ cat <<'EOF' > escquotetmpl | |
3282 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" |
|
3316 | > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n" | |
3283 | > EOF |
|
3317 | > EOF | |
3284 | $ cd latesttag |
|
3318 | $ cd latesttag | |
3285 | $ hg log -r 2 --style ../escquotetmpl |
|
3319 | $ hg log -r 2 --style ../escquotetmpl | |
3286 | " \" \" \\" head1 |
|
3320 | " \" \" \\" head1 | |
3287 |
|
3321 | |||
3288 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' |
|
3322 | $ hg log -r 2 -T esc --config templates.esc='"{\"valid\"}\n"' | |
3289 | valid |
|
3323 | valid | |
3290 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" |
|
3324 | $ hg log -r 2 -T esc --config templates.esc="'"'{\'"'"'valid\'"'"'}\n'"'" | |
3291 | valid |
|
3325 | valid | |
3292 |
|
3326 | |||
3293 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested |
|
3327 | Test compatibility with 2.9.2-3.4 of escaped quoted strings in nested | |
3294 | _evalifliteral() templates (issue4733): |
|
3328 | _evalifliteral() templates (issue4733): | |
3295 |
|
3329 | |||
3296 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' |
|
3330 | $ hg log -r 2 -T '{if(rev, "\"{rev}")}\n' | |
3297 | "2 |
|
3331 | "2 | |
3298 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' |
|
3332 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\"{rev}\")}")}\n' | |
3299 | "2 |
|
3333 | "2 | |
3300 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' |
|
3334 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\"{rev}\\\")}\")}")}\n' | |
3301 | "2 |
|
3335 | "2 | |
3302 |
|
3336 | |||
3303 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' |
|
3337 | $ hg log -r 2 -T '{if(rev, "\\\"")}\n' | |
3304 | \" |
|
3338 | \" | |
3305 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' |
|
3339 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"\\\\\\\"\")}")}\n' | |
3306 | \" |
|
3340 | \" | |
3307 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
3341 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, \\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3308 | \" |
|
3342 | \" | |
3309 |
|
3343 | |||
3310 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' |
|
3344 | $ hg log -r 2 -T '{if(rev, r"\\\"")}\n' | |
3311 | \\\" |
|
3345 | \\\" | |
3312 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' |
|
3346 | $ hg log -r 2 -T '{if(rev, "{if(rev, r\"\\\\\\\"\")}")}\n' | |
3313 | \\\" |
|
3347 | \\\" | |
3314 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' |
|
3348 | $ hg log -r 2 -T '{if(rev, "{if(rev, \"{if(rev, r\\\"\\\\\\\\\\\\\\\"\\\")}\")}")}\n' | |
3315 | \\\" |
|
3349 | \\\" | |
3316 |
|
3350 | |||
3317 | escaped single quotes and errors: |
|
3351 | escaped single quotes and errors: | |
3318 |
|
3352 | |||
3319 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' |
|
3353 | $ hg log -r 2 -T "{if(rev, '{if(rev, \'foo\')}')}"'\n' | |
3320 | foo |
|
3354 | foo | |
3321 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' |
|
3355 | $ hg log -r 2 -T "{if(rev, '{if(rev, r\'foo\')}')}"'\n' | |
3322 | foo |
|
3356 | foo | |
3323 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' |
|
3357 | $ hg log -r 2 -T '{if(rev, "{if(rev, \")}")}\n' | |
3324 | hg: parse error at 21: unterminated string |
|
3358 | hg: parse error at 21: unterminated string | |
3325 | [255] |
|
3359 | [255] | |
3326 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' |
|
3360 | $ hg log -r 2 -T '{if(rev, \"\\"")}\n' | |
3327 | hg: parse error: trailing \ in string |
|
3361 | hg: parse error: trailing \ in string | |
3328 | [255] |
|
3362 | [255] | |
3329 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' |
|
3363 | $ hg log -r 2 -T '{if(rev, r\"\\"")}\n' | |
3330 | hg: parse error: trailing \ in string |
|
3364 | hg: parse error: trailing \ in string | |
3331 | [255] |
|
3365 | [255] | |
3332 |
|
3366 | |||
3333 | $ cd .. |
|
3367 | $ cd .. | |
3334 |
|
3368 | |||
3335 | Test leading backslashes: |
|
3369 | Test leading backslashes: | |
3336 |
|
3370 | |||
3337 | $ cd latesttag |
|
3371 | $ cd latesttag | |
3338 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' |
|
3372 | $ hg log -r 2 -T '\{rev} {files % "\{file}"}\n' | |
3339 | {rev} {file} |
|
3373 | {rev} {file} | |
3340 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' |
|
3374 | $ hg log -r 2 -T '\\{rev} {files % "\\{file}"}\n' | |
3341 | \2 \head1 |
|
3375 | \2 \head1 | |
3342 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' |
|
3376 | $ hg log -r 2 -T '\\\{rev} {files % "\\\{file}"}\n' | |
3343 | \{rev} \{file} |
|
3377 | \{rev} \{file} | |
3344 | $ cd .. |
|
3378 | $ cd .. | |
3345 |
|
3379 | |||
3346 | Test leading backslashes in "if" expression (issue4714): |
|
3380 | Test leading backslashes in "if" expression (issue4714): | |
3347 |
|
3381 | |||
3348 | $ cd latesttag |
|
3382 | $ cd latesttag | |
3349 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' |
|
3383 | $ hg log -r 2 -T '{if("1", "\{rev}")} {if("1", r"\{rev}")}\n' | |
3350 | {rev} \{rev} |
|
3384 | {rev} \{rev} | |
3351 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' |
|
3385 | $ hg log -r 2 -T '{if("1", "\\{rev}")} {if("1", r"\\{rev}")}\n' | |
3352 | \2 \\{rev} |
|
3386 | \2 \\{rev} | |
3353 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' |
|
3387 | $ hg log -r 2 -T '{if("1", "\\\{rev}")} {if("1", r"\\\{rev}")}\n' | |
3354 | \{rev} \\\{rev} |
|
3388 | \{rev} \\\{rev} | |
3355 | $ cd .. |
|
3389 | $ cd .. | |
3356 |
|
3390 | |||
3357 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) |
|
3391 | "string-escape"-ed "\x5c\x786e" becomes r"\x6e" (once) or r"n" (twice) | |
3358 |
|
3392 | |||
3359 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' |
|
3393 | $ hg log -R a -r 0 --template '{if("1", "\x5c\x786e", "NG")}\n' | |
3360 | \x6e |
|
3394 | \x6e | |
3361 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' |
|
3395 | $ hg log -R a -r 0 --template '{if("1", r"\x5c\x786e", "NG")}\n' | |
3362 | \x5c\x786e |
|
3396 | \x5c\x786e | |
3363 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' |
|
3397 | $ hg log -R a -r 0 --template '{if("", "NG", "\x5c\x786e")}\n' | |
3364 | \x6e |
|
3398 | \x6e | |
3365 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' |
|
3399 | $ hg log -R a -r 0 --template '{if("", "NG", r"\x5c\x786e")}\n' | |
3366 | \x5c\x786e |
|
3400 | \x5c\x786e | |
3367 |
|
3401 | |||
3368 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' |
|
3402 | $ hg log -R a -r 2 --template '{ifeq("no perso\x6e", desc, "\x5c\x786e", "NG")}\n' | |
3369 | \x6e |
|
3403 | \x6e | |
3370 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' |
|
3404 | $ hg log -R a -r 2 --template '{ifeq(r"no perso\x6e", desc, "NG", r"\x5c\x786e")}\n' | |
3371 | \x5c\x786e |
|
3405 | \x5c\x786e | |
3372 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' |
|
3406 | $ hg log -R a -r 2 --template '{ifeq(desc, "no perso\x6e", "\x5c\x786e", "NG")}\n' | |
3373 | \x6e |
|
3407 | \x6e | |
3374 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' |
|
3408 | $ hg log -R a -r 2 --template '{ifeq(desc, r"no perso\x6e", "NG", r"\x5c\x786e")}\n' | |
3375 | \x5c\x786e |
|
3409 | \x5c\x786e | |
3376 |
|
3410 | |||
3377 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' |
|
3411 | $ hg log -R a -r 8 --template '{join(files, "\n")}\n' | |
3378 | fourth |
|
3412 | fourth | |
3379 | second |
|
3413 | second | |
3380 | third |
|
3414 | third | |
3381 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' |
|
3415 | $ hg log -R a -r 8 --template '{join(files, r"\n")}\n' | |
3382 | fourth\nsecond\nthird |
|
3416 | fourth\nsecond\nthird | |
3383 |
|
3417 | |||
3384 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' |
|
3418 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", "htm\x6c")}' | |
3385 | <p> |
|
3419 | <p> | |
3386 | 1st |
|
3420 | 1st | |
3387 | </p> |
|
3421 | </p> | |
3388 | <p> |
|
3422 | <p> | |
3389 | 2nd |
|
3423 | 2nd | |
3390 | </p> |
|
3424 | </p> | |
3391 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' |
|
3425 | $ hg log -R a -r 2 --template '{rstdoc(r"1st\n\n2nd", "html")}' | |
3392 | <p> |
|
3426 | <p> | |
3393 | 1st\n\n2nd |
|
3427 | 1st\n\n2nd | |
3394 | </p> |
|
3428 | </p> | |
3395 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' |
|
3429 | $ hg log -R a -r 2 --template '{rstdoc("1st\n\n2nd", r"htm\x6c")}' | |
3396 | 1st |
|
3430 | 1st | |
3397 |
|
3431 | |||
3398 | 2nd |
|
3432 | 2nd | |
3399 |
|
3433 | |||
3400 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' |
|
3434 | $ hg log -R a -r 2 --template '{strip(desc, "\x6e")}\n' | |
3401 | o perso |
|
3435 | o perso | |
3402 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' |
|
3436 | $ hg log -R a -r 2 --template '{strip(desc, r"\x6e")}\n' | |
3403 | no person |
|
3437 | no person | |
3404 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' |
|
3438 | $ hg log -R a -r 2 --template '{strip("no perso\x6e", "\x6e")}\n' | |
3405 | o perso |
|
3439 | o perso | |
3406 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' |
|
3440 | $ hg log -R a -r 2 --template '{strip(r"no perso\x6e", r"\x6e")}\n' | |
3407 | no perso |
|
3441 | no perso | |
3408 |
|
3442 | |||
3409 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' |
|
3443 | $ hg log -R a -r 2 --template '{sub("\\x6e", "\x2d", desc)}\n' | |
3410 | -o perso- |
|
3444 | -o perso- | |
3411 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' |
|
3445 | $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n' | |
3412 | no person |
|
3446 | no person | |
3413 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' |
|
3447 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n' | |
3414 | \x2do perso\x2d |
|
3448 | \x2do perso\x2d | |
3415 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' |
|
3449 | $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n' | |
3416 | -o perso- |
|
3450 | -o perso- | |
3417 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' |
|
3451 | $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n' | |
3418 | \x2do perso\x6e |
|
3452 | \x2do perso\x6e | |
3419 |
|
3453 | |||
3420 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' |
|
3454 | $ hg log -R a -r 8 --template '{files % "{file}\n"}' | |
3421 | fourth |
|
3455 | fourth | |
3422 | second |
|
3456 | second | |
3423 | third |
|
3457 | third | |
3424 |
|
3458 | |||
3425 | Test string escaping in nested expression: |
|
3459 | Test string escaping in nested expression: | |
3426 |
|
3460 | |||
3427 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' |
|
3461 | $ hg log -R a -r 8 --template '{ifeq(r"\x6e", if("1", "\x5c\x786e"), join(files, "\x5c\x786e"))}\n' | |
3428 | fourth\x6esecond\x6ethird |
|
3462 | fourth\x6esecond\x6ethird | |
3429 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' |
|
3463 | $ hg log -R a -r 8 --template '{ifeq(if("1", r"\x6e"), "\x5c\x786e", join(files, "\x5c\x786e"))}\n' | |
3430 | fourth\x6esecond\x6ethird |
|
3464 | fourth\x6esecond\x6ethird | |
3431 |
|
3465 | |||
3432 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' |
|
3466 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' | |
3433 | fourth\x6esecond\x6ethird |
|
3467 | fourth\x6esecond\x6ethird | |
3434 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' |
|
3468 | $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' | |
3435 | fourth\x5c\x786esecond\x5c\x786ethird |
|
3469 | fourth\x5c\x786esecond\x5c\x786ethird | |
3436 |
|
3470 | |||
3437 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' |
|
3471 | $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' | |
3438 | 3:\x6eo user, \x6eo domai\x6e |
|
3472 | 3:\x6eo user, \x6eo domai\x6e | |
3439 | 4:\x5c\x786eew bra\x5c\x786ech |
|
3473 | 4:\x5c\x786eew bra\x5c\x786ech | |
3440 |
|
3474 | |||
3441 | Test quotes in nested expression are evaluated just like a $(command) |
|
3475 | Test quotes in nested expression are evaluated just like a $(command) | |
3442 | substitution in POSIX shells: |
|
3476 | substitution in POSIX shells: | |
3443 |
|
3477 | |||
3444 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' |
|
3478 | $ hg log -R a -r 8 -T '{"{"{rev}:{node|short}"}"}\n' | |
3445 | 8:95c24699272e |
|
3479 | 8:95c24699272e | |
3446 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' |
|
3480 | $ hg log -R a -r 8 -T '{"{"\{{rev}} \"{node|short}\""}"}\n' | |
3447 | {8} "95c24699272e" |
|
3481 | {8} "95c24699272e" | |
3448 |
|
3482 | |||
3449 | Test recursive evaluation: |
|
3483 | Test recursive evaluation: | |
3450 |
|
3484 | |||
3451 | $ hg init r |
|
3485 | $ hg init r | |
3452 | $ cd r |
|
3486 | $ cd r | |
3453 | $ echo a > a |
|
3487 | $ echo a > a | |
3454 | $ hg ci -Am '{rev}' |
|
3488 | $ hg ci -Am '{rev}' | |
3455 | adding a |
|
3489 | adding a | |
3456 | $ hg log -r 0 --template '{if(rev, desc)}\n' |
|
3490 | $ hg log -r 0 --template '{if(rev, desc)}\n' | |
3457 | {rev} |
|
3491 | {rev} | |
3458 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' |
|
3492 | $ hg log -r 0 --template '{if(rev, "{author} {rev}")}\n' | |
3459 | test 0 |
|
3493 | test 0 | |
3460 |
|
3494 | |||
3461 | $ hg branch -q 'text.{rev}' |
|
3495 | $ hg branch -q 'text.{rev}' | |
3462 | $ echo aa >> aa |
|
3496 | $ echo aa >> aa | |
3463 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' |
|
3497 | $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped' | |
3464 |
|
3498 | |||
3465 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' |
|
3499 | $ hg log -l1 --template '{fill(desc, "20", author, branch)}' | |
3466 | {node|short}desc to |
|
3500 | {node|short}desc to | |
3467 | text.{rev}be wrapped |
|
3501 | text.{rev}be wrapped | |
3468 | text.{rev}desc to be |
|
3502 | text.{rev}desc to be | |
3469 | text.{rev}wrapped (no-eol) |
|
3503 | text.{rev}wrapped (no-eol) | |
3470 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' |
|
3504 | $ hg log -l1 --template '{fill(desc, "20", "{node|short}:", "text.{rev}:")}' | |
3471 | bcc7ff960b8e:desc to |
|
3505 | bcc7ff960b8e:desc to | |
3472 | text.1:be wrapped |
|
3506 | text.1:be wrapped | |
3473 | text.1:desc to be |
|
3507 | text.1:desc to be | |
3474 | text.1:wrapped (no-eol) |
|
3508 | text.1:wrapped (no-eol) | |
3475 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' |
|
3509 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' | |
3476 | hg: parse error: fill expects an integer width |
|
3510 | hg: parse error: fill expects an integer width | |
3477 | [255] |
|
3511 | [255] | |
3478 |
|
3512 | |||
3479 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' |
|
3513 | $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}' | |
3480 | bcc7ff960b8e:desc to be |
|
3514 | bcc7ff960b8e:desc to be | |
3481 | termwidth.1:wrapped desc |
|
3515 | termwidth.1:wrapped desc | |
3482 | termwidth.1:to be wrapped (no-eol) |
|
3516 | termwidth.1:to be wrapped (no-eol) | |
3483 |
|
3517 | |||
3484 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' |
|
3518 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' | |
3485 | {node|short} (no-eol) |
|
3519 | {node|short} (no-eol) | |
3486 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' |
|
3520 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", "{node|short}")}' | |
3487 | bcc-ff---b-e (no-eol) |
|
3521 | bcc-ff---b-e (no-eol) | |
3488 |
|
3522 | |||
3489 | $ cat >> .hg/hgrc <<EOF |
|
3523 | $ cat >> .hg/hgrc <<EOF | |
3490 | > [extensions] |
|
3524 | > [extensions] | |
3491 | > color= |
|
3525 | > color= | |
3492 | > [color] |
|
3526 | > [color] | |
3493 | > mode=ansi |
|
3527 | > mode=ansi | |
3494 | > text.{rev} = red |
|
3528 | > text.{rev} = red | |
3495 | > text.1 = green |
|
3529 | > text.1 = green | |
3496 | > EOF |
|
3530 | > EOF | |
3497 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' |
|
3531 | $ hg log --color=always -l 1 --template '{label(branch, "text\n")}' | |
3498 | \x1b[0;31mtext\x1b[0m (esc) |
|
3532 | \x1b[0;31mtext\x1b[0m (esc) | |
3499 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' |
|
3533 | $ hg log --color=always -l 1 --template '{label("text.{rev}", "text\n")}' | |
3500 | \x1b[0;32mtext\x1b[0m (esc) |
|
3534 | \x1b[0;32mtext\x1b[0m (esc) | |
3501 |
|
3535 | |||
3502 | color effect can be specified without quoting: |
|
3536 | color effect can be specified without quoting: | |
3503 |
|
3537 | |||
3504 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' |
|
3538 | $ hg log --color=always -l 1 --template '{label(red, "text\n")}' | |
3505 | \x1b[0;31mtext\x1b[0m (esc) |
|
3539 | \x1b[0;31mtext\x1b[0m (esc) | |
3506 |
|
3540 | |||
3507 | color effects can be nested (issue5413) |
|
3541 | color effects can be nested (issue5413) | |
3508 |
|
3542 | |||
3509 | $ hg debugtemplate --color=always \ |
|
3543 | $ hg debugtemplate --color=always \ | |
3510 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' |
|
3544 | > '{label(red, "red{label(magenta, "ma{label(cyan, "cyan")}{label(yellow, "yellow")}genta")}")}\n' | |
3511 | \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc) |
|
3545 | \x1b[0;31mred\x1b[0;35mma\x1b[0;36mcyan\x1b[0m\x1b[0;31m\x1b[0;35m\x1b[0;33myellow\x1b[0m\x1b[0;31m\x1b[0;35mgenta\x1b[0m (esc) | |
3512 |
|
3546 | |||
3513 | pad() should interact well with color codes (issue5416) |
|
3547 | pad() should interact well with color codes (issue5416) | |
3514 |
|
3548 | |||
3515 | $ hg debugtemplate --color=always \ |
|
3549 | $ hg debugtemplate --color=always \ | |
3516 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' |
|
3550 | > '{pad(label(red, "red"), 5, label(cyan, "-"))}\n' | |
3517 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) |
|
3551 | \x1b[0;31mred\x1b[0m\x1b[0;36m-\x1b[0m\x1b[0;36m-\x1b[0m (esc) | |
3518 |
|
3552 | |||
3519 | label should be no-op if color is disabled: |
|
3553 | label should be no-op if color is disabled: | |
3520 |
|
3554 | |||
3521 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' |
|
3555 | $ hg log --color=never -l 1 --template '{label(red, "text\n")}' | |
3522 | text |
|
3556 | text | |
3523 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' |
|
3557 | $ hg log --config extensions.color=! -l 1 --template '{label(red, "text\n")}' | |
3524 | text |
|
3558 | text | |
3525 |
|
3559 | |||
3526 | Test branches inside if statement: |
|
3560 | Test branches inside if statement: | |
3527 |
|
3561 | |||
3528 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' |
|
3562 | $ hg log -r 0 --template '{if(branches, "yes", "no")}\n' | |
3529 | no |
|
3563 | no | |
3530 |
|
3564 | |||
3531 | Test dict constructor: |
|
3565 | Test dict constructor: | |
3532 |
|
3566 | |||
3533 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' |
|
3567 | $ hg log -r 0 -T '{dict(y=node|short, x=rev)}\n' | |
3534 | y=f7769ec2ab97 x=0 |
|
3568 | y=f7769ec2ab97 x=0 | |
3535 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' |
|
3569 | $ hg log -r 0 -T '{dict(x=rev, y=node|short) % "{key}={value}\n"}' | |
3536 | x=0 |
|
3570 | x=0 | |
3537 | y=f7769ec2ab97 |
|
3571 | y=f7769ec2ab97 | |
3538 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' |
|
3572 | $ hg log -r 0 -T '{dict(x=rev, y=node|short)|json}\n' | |
3539 | {"x": 0, "y": "f7769ec2ab97"} |
|
3573 | {"x": 0, "y": "f7769ec2ab97"} | |
3540 | $ hg log -r 0 -T '{dict()|json}\n' |
|
3574 | $ hg log -r 0 -T '{dict()|json}\n' | |
3541 | {} |
|
3575 | {} | |
3542 |
|
3576 | |||
3543 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' |
|
3577 | $ hg log -r 0 -T '{dict(rev, node=node|short)}\n' | |
3544 | rev=0 node=f7769ec2ab97 |
|
3578 | rev=0 node=f7769ec2ab97 | |
3545 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' |
|
3579 | $ hg log -r 0 -T '{dict(rev, node|short)}\n' | |
3546 | rev=0 node=f7769ec2ab97 |
|
3580 | rev=0 node=f7769ec2ab97 | |
3547 |
|
3581 | |||
3548 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' |
|
3582 | $ hg log -r 0 -T '{dict(rev, rev=rev)}\n' | |
3549 | hg: parse error: duplicated dict key 'rev' inferred |
|
3583 | hg: parse error: duplicated dict key 'rev' inferred | |
3550 | [255] |
|
3584 | [255] | |
3551 | $ hg log -r 0 -T '{dict(node, node|short)}\n' |
|
3585 | $ hg log -r 0 -T '{dict(node, node|short)}\n' | |
3552 | hg: parse error: duplicated dict key 'node' inferred |
|
3586 | hg: parse error: duplicated dict key 'node' inferred | |
3553 | [255] |
|
3587 | [255] | |
3554 | $ hg log -r 0 -T '{dict(1 + 2)}' |
|
3588 | $ hg log -r 0 -T '{dict(1 + 2)}' | |
3555 | hg: parse error: dict key cannot be inferred |
|
3589 | hg: parse error: dict key cannot be inferred | |
3556 | [255] |
|
3590 | [255] | |
3557 |
|
3591 | |||
3558 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' |
|
3592 | $ hg log -r 0 -T '{dict(x=rev, x=node)}' | |
3559 | hg: parse error: dict got multiple values for keyword argument 'x' |
|
3593 | hg: parse error: dict got multiple values for keyword argument 'x' | |
3560 | [255] |
|
3594 | [255] | |
3561 |
|
3595 | |||
3562 | Test get function: |
|
3596 | Test get function: | |
3563 |
|
3597 | |||
3564 | $ hg log -r 0 --template '{get(extras, "branch")}\n' |
|
3598 | $ hg log -r 0 --template '{get(extras, "branch")}\n' | |
3565 | default |
|
3599 | default | |
3566 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' |
|
3600 | $ hg log -r 0 --template '{get(extras, "br{"anch"}")}\n' | |
3567 | default |
|
3601 | default | |
3568 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' |
|
3602 | $ hg log -r 0 --template '{get(files, "should_fail")}\n' | |
3569 | hg: parse error: get() expects a dict as first argument |
|
3603 | hg: parse error: get() expects a dict as first argument | |
3570 | [255] |
|
3604 | [255] | |
3571 |
|
3605 | |||
3572 | Test json filter applied to hybrid object: |
|
3606 | Test json filter applied to hybrid object: | |
3573 |
|
3607 | |||
3574 | $ hg log -r0 -T '{files|json}\n' |
|
3608 | $ hg log -r0 -T '{files|json}\n' | |
3575 | ["a"] |
|
3609 | ["a"] | |
3576 | $ hg log -r0 -T '{extras|json}\n' |
|
3610 | $ hg log -r0 -T '{extras|json}\n' | |
3577 | {"branch": "default"} |
|
3611 | {"branch": "default"} | |
3578 |
|
3612 | |||
3579 | Test localdate(date, tz) function: |
|
3613 | Test localdate(date, tz) function: | |
3580 |
|
3614 | |||
3581 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' |
|
3615 | $ TZ=JST-09 hg log -r0 -T '{date|localdate|isodate}\n' | |
3582 | 1970-01-01 09:00 +0900 |
|
3616 | 1970-01-01 09:00 +0900 | |
3583 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' |
|
3617 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' | |
3584 | 1970-01-01 00:00 +0000 |
|
3618 | 1970-01-01 00:00 +0000 | |
3585 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' |
|
3619 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' | |
3586 | hg: parse error: localdate expects a timezone |
|
3620 | hg: parse error: localdate expects a timezone | |
3587 | [255] |
|
3621 | [255] | |
3588 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' |
|
3622 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' | |
3589 | 1970-01-01 02:00 +0200 |
|
3623 | 1970-01-01 02:00 +0200 | |
3590 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' |
|
3624 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n' | |
3591 | 1970-01-01 00:00 +0000 |
|
3625 | 1970-01-01 00:00 +0000 | |
3592 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' |
|
3626 | $ TZ=JST-09 hg log -r0 -T '{localdate(date, 0)|isodate}\n' | |
3593 | 1970-01-01 00:00 +0000 |
|
3627 | 1970-01-01 00:00 +0000 | |
3594 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' |
|
3628 | $ hg log -r0 -T '{localdate(date, "invalid")|isodate}\n' | |
3595 | hg: parse error: localdate expects a timezone |
|
3629 | hg: parse error: localdate expects a timezone | |
3596 | [255] |
|
3630 | [255] | |
3597 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' |
|
3631 | $ hg log -r0 -T '{localdate(date, date)|isodate}\n' | |
3598 | hg: parse error: localdate expects a timezone |
|
3632 | hg: parse error: localdate expects a timezone | |
3599 | [255] |
|
3633 | [255] | |
3600 |
|
3634 | |||
3601 | Test shortest(node) function: |
|
3635 | Test shortest(node) function: | |
3602 |
|
3636 | |||
3603 | $ echo b > b |
|
3637 | $ echo b > b | |
3604 | $ hg ci -qAm b |
|
3638 | $ hg ci -qAm b | |
3605 | $ hg log --template '{shortest(node)}\n' |
|
3639 | $ hg log --template '{shortest(node)}\n' | |
3606 | e777 |
|
3640 | e777 | |
3607 | bcc7 |
|
3641 | bcc7 | |
3608 | f776 |
|
3642 | f776 | |
3609 | $ hg log --template '{shortest(node, 10)}\n' |
|
3643 | $ hg log --template '{shortest(node, 10)}\n' | |
3610 | e777603221 |
|
3644 | e777603221 | |
3611 | bcc7ff960b |
|
3645 | bcc7ff960b | |
3612 | f7769ec2ab |
|
3646 | f7769ec2ab | |
3613 | $ hg log --template '{node|shortest}\n' -l1 |
|
3647 | $ hg log --template '{node|shortest}\n' -l1 | |
3614 | e777 |
|
3648 | e777 | |
3615 |
|
3649 | |||
3616 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' |
|
3650 | $ hg log -r 0 -T '{shortest(node, "1{"0"}")}\n' | |
3617 | f7769ec2ab |
|
3651 | f7769ec2ab | |
3618 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' |
|
3652 | $ hg log -r 0 -T '{shortest(node, "not an int")}\n' | |
3619 | hg: parse error: shortest() expects an integer minlength |
|
3653 | hg: parse error: shortest() expects an integer minlength | |
3620 | [255] |
|
3654 | [255] | |
3621 |
|
3655 | |||
3622 | $ hg log -r 'wdir()' -T '{node|shortest}\n' |
|
3656 | $ hg log -r 'wdir()' -T '{node|shortest}\n' | |
3623 | ffff |
|
3657 | ffff | |
3624 |
|
3658 | |||
3625 | $ cd .. |
|
3659 | $ cd .. | |
3626 |
|
3660 | |||
3627 | Test shortest(node) with the repo having short hash collision: |
|
3661 | Test shortest(node) with the repo having short hash collision: | |
3628 |
|
3662 | |||
3629 | $ hg init hashcollision |
|
3663 | $ hg init hashcollision | |
3630 | $ cd hashcollision |
|
3664 | $ cd hashcollision | |
3631 | $ cat <<EOF >> .hg/hgrc |
|
3665 | $ cat <<EOF >> .hg/hgrc | |
3632 | > [experimental] |
|
3666 | > [experimental] | |
3633 | > evolution = createmarkers |
|
3667 | > evolution = createmarkers | |
3634 | > EOF |
|
3668 | > EOF | |
3635 | $ echo 0 > a |
|
3669 | $ echo 0 > a | |
3636 | $ hg ci -qAm 0 |
|
3670 | $ hg ci -qAm 0 | |
3637 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do |
|
3671 | $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do | |
3638 | > hg up -q 0 |
|
3672 | > hg up -q 0 | |
3639 | > echo $i > a |
|
3673 | > echo $i > a | |
3640 | > hg ci -qm $i |
|
3674 | > hg ci -qm $i | |
3641 | > done |
|
3675 | > done | |
3642 | $ hg up -q null |
|
3676 | $ hg up -q null | |
3643 | $ hg log -r0: -T '{rev}:{node}\n' |
|
3677 | $ hg log -r0: -T '{rev}:{node}\n' | |
3644 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a |
|
3678 | 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a | |
3645 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc |
|
3679 | 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc | |
3646 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 |
|
3680 | 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 | |
3647 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 |
|
3681 | 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 | |
3648 | 4:10776689e627b465361ad5c296a20a487e153ca4 |
|
3682 | 4:10776689e627b465361ad5c296a20a487e153ca4 | |
3649 | 5:a00be79088084cb3aff086ab799f8790e01a976b |
|
3683 | 5:a00be79088084cb3aff086ab799f8790e01a976b | |
3650 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 |
|
3684 | 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 | |
3651 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d |
|
3685 | 7:a0457b3450b8e1b778f1163b31a435802987fe5d | |
3652 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a |
|
3686 | 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a | |
3653 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
3687 | 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
3654 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
3688 | 10:c562ddd9c94164376c20b86b0b4991636a3bf84f | |
3655 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b |
|
3689 | $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b | |
3656 | obsoleted 1 changesets |
|
3690 | obsoleted 1 changesets | |
3657 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 |
|
3691 | $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 | |
3658 | obsoleted 1 changesets |
|
3692 | obsoleted 1 changesets | |
3659 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f |
|
3693 | $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f | |
3660 | obsoleted 1 changesets |
|
3694 | obsoleted 1 changesets | |
3661 |
|
3695 | |||
3662 | nodes starting with '11' (we don't have the revision number '11' though) |
|
3696 | nodes starting with '11' (we don't have the revision number '11' though) | |
3663 |
|
3697 | |||
3664 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' |
|
3698 | $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' | |
3665 | 1:1142 |
|
3699 | 1:1142 | |
3666 | 2:1140 |
|
3700 | 2:1140 | |
3667 | 3:11d |
|
3701 | 3:11d | |
3668 |
|
3702 | |||
3669 | '5:a00' is hidden, but still we have two nodes starting with 'a0' |
|
3703 | '5:a00' is hidden, but still we have two nodes starting with 'a0' | |
3670 |
|
3704 | |||
3671 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' |
|
3705 | $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' | |
3672 | 6:a0b |
|
3706 | 6:a0b | |
3673 | 7:a04 |
|
3707 | 7:a04 | |
3674 |
|
3708 | |||
3675 | node '10' conflicts with the revision number '10' even if it is hidden |
|
3709 | node '10' conflicts with the revision number '10' even if it is hidden | |
3676 | (we could exclude hidden revision numbers, but currently we don't) |
|
3710 | (we could exclude hidden revision numbers, but currently we don't) | |
3677 |
|
3711 | |||
3678 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' |
|
3712 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' | |
3679 | 4:107 |
|
3713 | 4:107 | |
3680 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden |
|
3714 | $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden | |
3681 | 4:107 |
|
3715 | 4:107 | |
3682 |
|
3716 | |||
3683 | node 'c562' should be unique if the other 'c562' nodes are hidden |
|
3717 | node 'c562' should be unique if the other 'c562' nodes are hidden | |
3684 | (but we don't try the slow path to filter out hidden nodes for now) |
|
3718 | (but we don't try the slow path to filter out hidden nodes for now) | |
3685 |
|
3719 | |||
3686 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' |
|
3720 | $ hg log -r 8 -T '{rev}:{node|shortest}\n' | |
3687 | 8:c5625 |
|
3721 | 8:c5625 | |
3688 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden |
|
3722 | $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden | |
3689 | 8:c5625 |
|
3723 | 8:c5625 | |
3690 | 9:c5623 |
|
3724 | 9:c5623 | |
3691 | 10:c562d |
|
3725 | 10:c562d | |
3692 |
|
3726 | |||
3693 | $ cd .. |
|
3727 | $ cd .. | |
3694 |
|
3728 | |||
3695 | Test pad function |
|
3729 | Test pad function | |
3696 |
|
3730 | |||
3697 | $ cd r |
|
3731 | $ cd r | |
3698 |
|
3732 | |||
3699 | $ hg log --template '{pad(rev, 20)} {author|user}\n' |
|
3733 | $ hg log --template '{pad(rev, 20)} {author|user}\n' | |
3700 | 2 test |
|
3734 | 2 test | |
3701 | 1 {node|short} |
|
3735 | 1 {node|short} | |
3702 | 0 test |
|
3736 | 0 test | |
3703 |
|
3737 | |||
3704 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' |
|
3738 | $ hg log --template '{pad(rev, 20, " ", True)} {author|user}\n' | |
3705 | 2 test |
|
3739 | 2 test | |
3706 | 1 {node|short} |
|
3740 | 1 {node|short} | |
3707 | 0 test |
|
3741 | 0 test | |
3708 |
|
3742 | |||
3709 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' |
|
3743 | $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n' | |
3710 | 2------------------- test |
|
3744 | 2------------------- test | |
3711 | 1------------------- {node|short} |
|
3745 | 1------------------- {node|short} | |
3712 | 0------------------- test |
|
3746 | 0------------------- test | |
3713 |
|
3747 | |||
3714 | Test template string in pad function |
|
3748 | Test template string in pad function | |
3715 |
|
3749 | |||
3716 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' |
|
3750 | $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n' | |
3717 | {0} test |
|
3751 | {0} test | |
3718 |
|
3752 | |||
3719 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' |
|
3753 | $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n' | |
3720 | \{rev} test |
|
3754 | \{rev} test | |
3721 |
|
3755 | |||
3722 | Test width argument passed to pad function |
|
3756 | Test width argument passed to pad function | |
3723 |
|
3757 | |||
3724 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' |
|
3758 | $ hg log -r 0 -T '{pad(rev, "1{"0"}")} {author|user}\n' | |
3725 | 0 test |
|
3759 | 0 test | |
3726 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' |
|
3760 | $ hg log -r 0 -T '{pad(rev, "not an int")}\n' | |
3727 | hg: parse error: pad() expects an integer width |
|
3761 | hg: parse error: pad() expects an integer width | |
3728 | [255] |
|
3762 | [255] | |
3729 |
|
3763 | |||
3730 | Test invalid fillchar passed to pad function |
|
3764 | Test invalid fillchar passed to pad function | |
3731 |
|
3765 | |||
3732 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' |
|
3766 | $ hg log -r 0 -T '{pad(rev, 10, "")}\n' | |
3733 | hg: parse error: pad() expects a single fill character |
|
3767 | hg: parse error: pad() expects a single fill character | |
3734 | [255] |
|
3768 | [255] | |
3735 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' |
|
3769 | $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' | |
3736 | hg: parse error: pad() expects a single fill character |
|
3770 | hg: parse error: pad() expects a single fill character | |
3737 | [255] |
|
3771 | [255] | |
3738 |
|
3772 | |||
3739 | Test boolean argument passed to pad function |
|
3773 | Test boolean argument passed to pad function | |
3740 |
|
3774 | |||
3741 | no crash |
|
3775 | no crash | |
3742 |
|
3776 | |||
3743 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' |
|
3777 | $ hg log -r 0 -T '{pad(rev, 10, "-", "f{"oo"}")}\n' | |
3744 | ---------0 |
|
3778 | ---------0 | |
3745 |
|
3779 | |||
3746 | string/literal |
|
3780 | string/literal | |
3747 |
|
3781 | |||
3748 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' |
|
3782 | $ hg log -r 0 -T '{pad(rev, 10, "-", "false")}\n' | |
3749 | ---------0 |
|
3783 | ---------0 | |
3750 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' |
|
3784 | $ hg log -r 0 -T '{pad(rev, 10, "-", false)}\n' | |
3751 | 0--------- |
|
3785 | 0--------- | |
3752 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' |
|
3786 | $ hg log -r 0 -T '{pad(rev, 10, "-", "")}\n' | |
3753 | 0--------- |
|
3787 | 0--------- | |
3754 |
|
3788 | |||
3755 | unknown keyword is evaluated to '' |
|
3789 | unknown keyword is evaluated to '' | |
3756 |
|
3790 | |||
3757 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' |
|
3791 | $ hg log -r 0 -T '{pad(rev, 10, "-", unknownkeyword)}\n' | |
3758 | 0--------- |
|
3792 | 0--------- | |
3759 |
|
3793 | |||
3760 | Test separate function |
|
3794 | Test separate function | |
3761 |
|
3795 | |||
3762 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' |
|
3796 | $ hg log -r 0 -T '{separate("-", "", "a", "b", "", "", "c", "")}\n' | |
3763 | a-b-c |
|
3797 | a-b-c | |
3764 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' |
|
3798 | $ hg log -r 0 -T '{separate(" ", "{rev}:{node|short}", author|user, branch)}\n' | |
3765 | 0:f7769ec2ab97 test default |
|
3799 | 0:f7769ec2ab97 test default | |
3766 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' |
|
3800 | $ hg log -r 0 --color=always -T '{separate(" ", "a", label(red, "b"), "c", label(red, ""), "d")}\n' | |
3767 | a \x1b[0;31mb\x1b[0m c d (esc) |
|
3801 | a \x1b[0;31mb\x1b[0m c d (esc) | |
3768 |
|
3802 | |||
3769 | Test boolean expression/literal passed to if function |
|
3803 | Test boolean expression/literal passed to if function | |
3770 |
|
3804 | |||
3771 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' |
|
3805 | $ hg log -r 0 -T '{if(rev, "rev 0 is True")}\n' | |
3772 | rev 0 is True |
|
3806 | rev 0 is True | |
3773 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' |
|
3807 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' | |
3774 | literal 0 is True as well |
|
3808 | literal 0 is True as well | |
3775 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' |
|
3809 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' | |
3776 | empty string is False |
|
3810 | empty string is False | |
3777 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' |
|
3811 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' | |
3778 | empty list is False |
|
3812 | empty list is False | |
3779 | $ hg log -r 0 -T '{if(true, "true is True")}\n' |
|
3813 | $ hg log -r 0 -T '{if(true, "true is True")}\n' | |
3780 | true is True |
|
3814 | true is True | |
3781 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' |
|
3815 | $ hg log -r 0 -T '{if(false, "", "false is False")}\n' | |
3782 | false is False |
|
3816 | false is False | |
3783 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' |
|
3817 | $ hg log -r 0 -T '{if("false", "non-empty string is True")}\n' | |
3784 | non-empty string is True |
|
3818 | non-empty string is True | |
3785 |
|
3819 | |||
3786 | Test ifcontains function |
|
3820 | Test ifcontains function | |
3787 |
|
3821 | |||
3788 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' |
|
3822 | $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n' | |
3789 | 2 is in the string |
|
3823 | 2 is in the string | |
3790 | 1 is not |
|
3824 | 1 is not | |
3791 | 0 is in the string |
|
3825 | 0 is in the string | |
3792 |
|
3826 | |||
3793 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' |
|
3827 | $ hg log -T '{rev} {ifcontains(rev, "2 two{" 0"}", "is in the string", "is not")}\n' | |
3794 | 2 is in the string |
|
3828 | 2 is in the string | |
3795 | 1 is not |
|
3829 | 1 is not | |
3796 | 0 is in the string |
|
3830 | 0 is in the string | |
3797 |
|
3831 | |||
3798 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' |
|
3832 | $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n' | |
3799 | 2 did not add a |
|
3833 | 2 did not add a | |
3800 | 1 did not add a |
|
3834 | 1 did not add a | |
3801 | 0 added a |
|
3835 | 0 added a | |
3802 |
|
3836 | |||
3803 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' |
|
3837 | $ hg log --debug -T '{rev}{ifcontains(1, parents, " is parent of 1")}\n' | |
3804 | 2 is parent of 1 |
|
3838 | 2 is parent of 1 | |
3805 | 1 |
|
3839 | 1 | |
3806 | 0 |
|
3840 | 0 | |
3807 |
|
3841 | |||
3808 | Test revset function |
|
3842 | Test revset function | |
3809 |
|
3843 | |||
3810 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' |
|
3844 | $ hg log --template '{rev} {ifcontains(rev, revset("."), "current rev", "not current rev")}\n' | |
3811 | 2 current rev |
|
3845 | 2 current rev | |
3812 | 1 not current rev |
|
3846 | 1 not current rev | |
3813 | 0 not current rev |
|
3847 | 0 not current rev | |
3814 |
|
3848 | |||
3815 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' |
|
3849 | $ hg log --template '{rev} {ifcontains(rev, revset(". + .^"), "match rev", "not match rev")}\n' | |
3816 | 2 match rev |
|
3850 | 2 match rev | |
3817 | 1 match rev |
|
3851 | 1 match rev | |
3818 | 0 not match rev |
|
3852 | 0 not match rev | |
3819 |
|
3853 | |||
3820 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' |
|
3854 | $ hg log --template '{rev} Parents: {revset("parents(%s)", rev)}\n' | |
3821 | 2 Parents: 1 |
|
3855 | 2 Parents: 1 | |
3822 | 1 Parents: 0 |
|
3856 | 1 Parents: 0 | |
3823 | 0 Parents: |
|
3857 | 0 Parents: | |
3824 |
|
3858 | |||
3825 | $ cat >> .hg/hgrc <<EOF |
|
3859 | $ cat >> .hg/hgrc <<EOF | |
3826 | > [revsetalias] |
|
3860 | > [revsetalias] | |
3827 | > myparents(\$1) = parents(\$1) |
|
3861 | > myparents(\$1) = parents(\$1) | |
3828 | > EOF |
|
3862 | > EOF | |
3829 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' |
|
3863 | $ hg log --template '{rev} Parents: {revset("myparents(%s)", rev)}\n' | |
3830 | 2 Parents: 1 |
|
3864 | 2 Parents: 1 | |
3831 | 1 Parents: 0 |
|
3865 | 1 Parents: 0 | |
3832 | 0 Parents: |
|
3866 | 0 Parents: | |
3833 |
|
3867 | |||
3834 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' |
|
3868 | $ hg log --template 'Rev: {rev}\n{revset("::%s", rev) % "Ancestor: {revision}\n"}\n' | |
3835 | Rev: 2 |
|
3869 | Rev: 2 | |
3836 | Ancestor: 0 |
|
3870 | Ancestor: 0 | |
3837 | Ancestor: 1 |
|
3871 | Ancestor: 1 | |
3838 | Ancestor: 2 |
|
3872 | Ancestor: 2 | |
3839 |
|
3873 | |||
3840 | Rev: 1 |
|
3874 | Rev: 1 | |
3841 | Ancestor: 0 |
|
3875 | Ancestor: 0 | |
3842 | Ancestor: 1 |
|
3876 | Ancestor: 1 | |
3843 |
|
3877 | |||
3844 | Rev: 0 |
|
3878 | Rev: 0 | |
3845 | Ancestor: 0 |
|
3879 | Ancestor: 0 | |
3846 |
|
3880 | |||
3847 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 |
|
3881 | $ hg log --template '{revset("TIP"|lower)}\n' -l1 | |
3848 | 2 |
|
3882 | 2 | |
3849 |
|
3883 | |||
3850 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 |
|
3884 | $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1 | |
3851 | 2 |
|
3885 | 2 | |
3852 |
|
3886 | |||
3853 | a list template is evaluated for each item of revset/parents |
|
3887 | a list template is evaluated for each item of revset/parents | |
3854 |
|
3888 | |||
3855 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' |
|
3889 | $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' | |
3856 | 2 p: 1:bcc7ff960b8e |
|
3890 | 2 p: 1:bcc7ff960b8e | |
3857 | 1 p: 0:f7769ec2ab97 |
|
3891 | 1 p: 0:f7769ec2ab97 | |
3858 | 0 p: |
|
3892 | 0 p: | |
3859 |
|
3893 | |||
3860 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' |
|
3894 | $ hg log --debug -T '{rev} p:{parents % " {rev}:{node|short}"}\n' | |
3861 | 2 p: 1:bcc7ff960b8e -1:000000000000 |
|
3895 | 2 p: 1:bcc7ff960b8e -1:000000000000 | |
3862 | 1 p: 0:f7769ec2ab97 -1:000000000000 |
|
3896 | 1 p: 0:f7769ec2ab97 -1:000000000000 | |
3863 | 0 p: -1:000000000000 -1:000000000000 |
|
3897 | 0 p: -1:000000000000 -1:000000000000 | |
3864 |
|
3898 | |||
3865 | therefore, 'revcache' should be recreated for each rev |
|
3899 | therefore, 'revcache' should be recreated for each rev | |
3866 |
|
3900 | |||
3867 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' |
|
3901 | $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' | |
3868 | 2 aa b |
|
3902 | 2 aa b | |
3869 | p |
|
3903 | p | |
3870 | 1 |
|
3904 | 1 | |
3871 | p a |
|
3905 | p a | |
3872 | 0 a |
|
3906 | 0 a | |
3873 | p |
|
3907 | p | |
3874 |
|
3908 | |||
3875 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' |
|
3909 | $ hg log --debug -T '{rev} {file_adds}\np {parents % "{file_adds}"}\n' | |
3876 | 2 aa b |
|
3910 | 2 aa b | |
3877 | p |
|
3911 | p | |
3878 | 1 |
|
3912 | 1 | |
3879 | p a |
|
3913 | p a | |
3880 | 0 a |
|
3914 | 0 a | |
3881 | p |
|
3915 | p | |
3882 |
|
3916 | |||
3883 | a revset item must be evaluated as an integer revision, not an offset from tip |
|
3917 | a revset item must be evaluated as an integer revision, not an offset from tip | |
3884 |
|
3918 | |||
3885 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' |
|
3919 | $ hg log -l 1 -T '{revset("null") % "{rev}:{node|short}"}\n' | |
3886 | -1:000000000000 |
|
3920 | -1:000000000000 | |
3887 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' |
|
3921 | $ hg log -l 1 -T '{revset("%s", "null") % "{rev}:{node|short}"}\n' | |
3888 | -1:000000000000 |
|
3922 | -1:000000000000 | |
3889 |
|
3923 | |||
3890 | join() should pick '{rev}' from revset items: |
|
3924 | join() should pick '{rev}' from revset items: | |
3891 |
|
3925 | |||
3892 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 |
|
3926 | $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6 | |
3893 | 4, 5 |
|
3927 | 4, 5 | |
3894 |
|
3928 | |||
3895 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by |
|
3929 | on the other hand, parents are formatted as '{rev}:{node|formatnode}' by | |
3896 | default. join() should agree with the default formatting: |
|
3930 | default. join() should agree with the default formatting: | |
3897 |
|
3931 | |||
3898 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 |
|
3932 | $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6 | |
3899 | 5:13207e5a10d9, 4:bbe44766e73d |
|
3933 | 5:13207e5a10d9, 4:bbe44766e73d | |
3900 |
|
3934 | |||
3901 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug |
|
3935 | $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug | |
3902 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, |
|
3936 | 5:13207e5a10d9fd28ec424934298e176197f2c67f, | |
3903 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 |
|
3937 | 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74 | |
3904 |
|
3938 | |||
3905 | Test files function |
|
3939 | Test files function | |
3906 |
|
3940 | |||
3907 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" |
|
3941 | $ hg log -T "{rev}\n{join(files('*'), '\n')}\n" | |
3908 | 2 |
|
3942 | 2 | |
3909 | a |
|
3943 | a | |
3910 | aa |
|
3944 | aa | |
3911 | b |
|
3945 | b | |
3912 | 1 |
|
3946 | 1 | |
3913 | a |
|
3947 | a | |
3914 | 0 |
|
3948 | 0 | |
3915 | a |
|
3949 | a | |
3916 |
|
3950 | |||
3917 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" |
|
3951 | $ hg log -T "{rev}\n{join(files('aa'), '\n')}\n" | |
3918 | 2 |
|
3952 | 2 | |
3919 | aa |
|
3953 | aa | |
3920 | 1 |
|
3954 | 1 | |
3921 |
|
3955 | |||
3922 | 0 |
|
3956 | 0 | |
3923 |
|
3957 | |||
3924 |
|
3958 | |||
3925 | Test relpath function |
|
3959 | Test relpath function | |
3926 |
|
3960 | |||
3927 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' |
|
3961 | $ hg log -r0 -T '{files % "{file|relpath}\n"}' | |
3928 | a |
|
3962 | a | |
3929 | $ cd .. |
|
3963 | $ cd .. | |
3930 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' |
|
3964 | $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' | |
3931 | r/a |
|
3965 | r/a | |
3932 | $ cd r |
|
3966 | $ cd r | |
3933 |
|
3967 | |||
3934 | Test active bookmark templating |
|
3968 | Test active bookmark templating | |
3935 |
|
3969 | |||
3936 | $ hg book foo |
|
3970 | $ hg book foo | |
3937 | $ hg book bar |
|
3971 | $ hg book bar | |
3938 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" |
|
3972 | $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n" | |
3939 | 2 bar* foo |
|
3973 | 2 bar* foo | |
3940 | 1 |
|
3974 | 1 | |
3941 | 0 |
|
3975 | 0 | |
3942 | $ hg log --template "{rev} {activebookmark}\n" |
|
3976 | $ hg log --template "{rev} {activebookmark}\n" | |
3943 | 2 bar |
|
3977 | 2 bar | |
3944 | 1 |
|
3978 | 1 | |
3945 | 0 |
|
3979 | 0 | |
3946 | $ hg bookmarks --inactive bar |
|
3980 | $ hg bookmarks --inactive bar | |
3947 | $ hg log --template "{rev} {activebookmark}\n" |
|
3981 | $ hg log --template "{rev} {activebookmark}\n" | |
3948 | 2 |
|
3982 | 2 | |
3949 | 1 |
|
3983 | 1 | |
3950 | 0 |
|
3984 | 0 | |
3951 | $ hg book -r1 baz |
|
3985 | $ hg book -r1 baz | |
3952 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" |
|
3986 | $ hg log --template "{rev} {join(bookmarks, ' ')}\n" | |
3953 | 2 bar foo |
|
3987 | 2 bar foo | |
3954 | 1 baz |
|
3988 | 1 baz | |
3955 | 0 |
|
3989 | 0 | |
3956 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" |
|
3990 | $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n" | |
3957 | 2 t |
|
3991 | 2 t | |
3958 | 1 f |
|
3992 | 1 f | |
3959 | 0 f |
|
3993 | 0 f | |
3960 |
|
3994 | |||
3961 | Test namespaces dict |
|
3995 | Test namespaces dict | |
3962 |
|
3996 | |||
3963 | $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n' |
|
3997 | $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n' | |
3964 | 2 |
|
3998 | 2 | |
3965 | bookmarks color=bookmark builtin=True |
|
3999 | bookmarks color=bookmark builtin=True | |
3966 | bar,foo |
|
4000 | bar,foo | |
3967 | tags color=tag builtin=True |
|
4001 | tags color=tag builtin=True | |
3968 | tip |
|
4002 | tip | |
3969 | branches color=branch builtin=True |
|
4003 | branches color=branch builtin=True | |
3970 | text.{rev} |
|
4004 | text.{rev} | |
3971 | revnames color=revname builtin=False |
|
4005 | revnames color=revname builtin=False | |
3972 | r2 |
|
4006 | r2 | |
3973 |
|
4007 | |||
3974 | 1 |
|
4008 | 1 | |
3975 | bookmarks color=bookmark builtin=True |
|
4009 | bookmarks color=bookmark builtin=True | |
3976 | baz |
|
4010 | baz | |
3977 | tags color=tag builtin=True |
|
4011 | tags color=tag builtin=True | |
3978 |
|
4012 | |||
3979 | branches color=branch builtin=True |
|
4013 | branches color=branch builtin=True | |
3980 | text.{rev} |
|
4014 | text.{rev} | |
3981 | revnames color=revname builtin=False |
|
4015 | revnames color=revname builtin=False | |
3982 | r1 |
|
4016 | r1 | |
3983 |
|
4017 | |||
3984 | 0 |
|
4018 | 0 | |
3985 | bookmarks color=bookmark builtin=True |
|
4019 | bookmarks color=bookmark builtin=True | |
3986 |
|
4020 | |||
3987 | tags color=tag builtin=True |
|
4021 | tags color=tag builtin=True | |
3988 |
|
4022 | |||
3989 | branches color=branch builtin=True |
|
4023 | branches color=branch builtin=True | |
3990 | default |
|
4024 | default | |
3991 | revnames color=revname builtin=False |
|
4025 | revnames color=revname builtin=False | |
3992 | r0 |
|
4026 | r0 | |
3993 |
|
4027 | |||
3994 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' |
|
4028 | $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}' | |
3995 | bookmarks: bar foo |
|
4029 | bookmarks: bar foo | |
3996 | tags: tip |
|
4030 | tags: tip | |
3997 | branches: text.{rev} |
|
4031 | branches: text.{rev} | |
3998 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' |
|
4032 | $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}' | |
3999 | bookmarks: |
|
4033 | bookmarks: | |
4000 | bar |
|
4034 | bar | |
4001 | foo |
|
4035 | foo | |
4002 | tags: |
|
4036 | tags: | |
4003 | tip |
|
4037 | tip | |
4004 | branches: |
|
4038 | branches: | |
4005 | text.{rev} |
|
4039 | text.{rev} | |
4006 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' |
|
4040 | $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}' | |
4007 | bar |
|
4041 | bar | |
4008 | foo |
|
4042 | foo | |
4009 |
|
4043 | |||
4010 | Test stringify on sub expressions |
|
4044 | Test stringify on sub expressions | |
4011 |
|
4045 | |||
4012 | $ cd .. |
|
4046 | $ cd .. | |
4013 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' |
|
4047 | $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n' | |
4014 | fourth, second, third |
|
4048 | fourth, second, third | |
4015 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' |
|
4049 | $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n' | |
4016 | abc |
|
4050 | abc | |
4017 |
|
4051 | |||
4018 | Test splitlines |
|
4052 | Test splitlines | |
4019 |
|
4053 | |||
4020 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" |
|
4054 | $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}" | |
4021 | @ foo Modify, add, remove, rename |
|
4055 | @ foo Modify, add, remove, rename | |
4022 | | |
|
4056 | | | |
4023 | o foo future |
|
4057 | o foo future | |
4024 | | |
|
4058 | | | |
4025 | o foo third |
|
4059 | o foo third | |
4026 | | |
|
4060 | | | |
4027 | o foo second |
|
4061 | o foo second | |
4028 |
|
4062 | |||
4029 | o foo merge |
|
4063 | o foo merge | |
4030 | |\ |
|
4064 | |\ | |
4031 | | o foo new head |
|
4065 | | o foo new head | |
4032 | | | |
|
4066 | | | | |
4033 | o | foo new branch |
|
4067 | o | foo new branch | |
4034 | |/ |
|
4068 | |/ | |
4035 | o foo no user, no domain |
|
4069 | o foo no user, no domain | |
4036 | | |
|
4070 | | | |
4037 | o foo no person |
|
4071 | o foo no person | |
4038 | | |
|
4072 | | | |
4039 | o foo other 1 |
|
4073 | o foo other 1 | |
4040 | | foo other 2 |
|
4074 | | foo other 2 | |
4041 | | foo |
|
4075 | | foo | |
4042 | | foo other 3 |
|
4076 | | foo other 3 | |
4043 | o foo line 1 |
|
4077 | o foo line 1 | |
4044 | foo line 2 |
|
4078 | foo line 2 | |
4045 |
|
4079 | |||
4046 | $ hg log -R a -r0 -T '{desc|splitlines}\n' |
|
4080 | $ hg log -R a -r0 -T '{desc|splitlines}\n' | |
4047 | line 1 line 2 |
|
4081 | line 1 line 2 | |
4048 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' |
|
4082 | $ hg log -R a -r0 -T '{join(desc|splitlines, "|")}\n' | |
4049 | line 1|line 2 |
|
4083 | line 1|line 2 | |
4050 |
|
4084 | |||
4051 | Test startswith |
|
4085 | Test startswith | |
4052 | $ hg log -Gv -R a --template "{startswith(desc)}" |
|
4086 | $ hg log -Gv -R a --template "{startswith(desc)}" | |
4053 | hg: parse error: startswith expects two arguments |
|
4087 | hg: parse error: startswith expects two arguments | |
4054 | [255] |
|
4088 | [255] | |
4055 |
|
4089 | |||
4056 | $ hg log -Gv -R a --template "{startswith('line', desc)}" |
|
4090 | $ hg log -Gv -R a --template "{startswith('line', desc)}" | |
4057 | @ |
|
4091 | @ | |
4058 | | |
|
4092 | | | |
4059 | o |
|
4093 | o | |
4060 | | |
|
4094 | | | |
4061 | o |
|
4095 | o | |
4062 | | |
|
4096 | | | |
4063 | o |
|
4097 | o | |
4064 |
|
4098 | |||
4065 | o |
|
4099 | o | |
4066 | |\ |
|
4100 | |\ | |
4067 | | o |
|
4101 | | o | |
4068 | | | |
|
4102 | | | | |
4069 | o | |
|
4103 | o | | |
4070 | |/ |
|
4104 | |/ | |
4071 | o |
|
4105 | o | |
4072 | | |
|
4106 | | | |
4073 | o |
|
4107 | o | |
4074 | | |
|
4108 | | | |
4075 | o |
|
4109 | o | |
4076 | | |
|
4110 | | | |
4077 | o line 1 |
|
4111 | o line 1 | |
4078 | line 2 |
|
4112 | line 2 | |
4079 |
|
4113 | |||
4080 | Test bad template with better error message |
|
4114 | Test bad template with better error message | |
4081 |
|
4115 | |||
4082 | $ hg log -Gv -R a --template '{desc|user()}' |
|
4116 | $ hg log -Gv -R a --template '{desc|user()}' | |
4083 | hg: parse error: expected a symbol, got 'func' |
|
4117 | hg: parse error: expected a symbol, got 'func' | |
4084 | [255] |
|
4118 | [255] | |
4085 |
|
4119 | |||
4086 | Test word function (including index out of bounds graceful failure) |
|
4120 | Test word function (including index out of bounds graceful failure) | |
4087 |
|
4121 | |||
4088 | $ hg log -Gv -R a --template "{word('1', desc)}" |
|
4122 | $ hg log -Gv -R a --template "{word('1', desc)}" | |
4089 | @ add, |
|
4123 | @ add, | |
4090 | | |
|
4124 | | | |
4091 | o |
|
4125 | o | |
4092 | | |
|
4126 | | | |
4093 | o |
|
4127 | o | |
4094 | | |
|
4128 | | | |
4095 | o |
|
4129 | o | |
4096 |
|
4130 | |||
4097 | o |
|
4131 | o | |
4098 | |\ |
|
4132 | |\ | |
4099 | | o head |
|
4133 | | o head | |
4100 | | | |
|
4134 | | | | |
4101 | o | branch |
|
4135 | o | branch | |
4102 | |/ |
|
4136 | |/ | |
4103 | o user, |
|
4137 | o user, | |
4104 | | |
|
4138 | | | |
4105 | o person |
|
4139 | o person | |
4106 | | |
|
4140 | | | |
4107 | o 1 |
|
4141 | o 1 | |
4108 | | |
|
4142 | | | |
4109 | o 1 |
|
4143 | o 1 | |
4110 |
|
4144 | |||
4111 |
|
4145 | |||
4112 | Test word third parameter used as splitter |
|
4146 | Test word third parameter used as splitter | |
4113 |
|
4147 | |||
4114 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" |
|
4148 | $ hg log -Gv -R a --template "{word('0', desc, 'o')}" | |
4115 | @ M |
|
4149 | @ M | |
4116 | | |
|
4150 | | | |
4117 | o future |
|
4151 | o future | |
4118 | | |
|
4152 | | | |
4119 | o third |
|
4153 | o third | |
4120 | | |
|
4154 | | | |
4121 | o sec |
|
4155 | o sec | |
4122 |
|
4156 | |||
4123 | o merge |
|
4157 | o merge | |
4124 | |\ |
|
4158 | |\ | |
4125 | | o new head |
|
4159 | | o new head | |
4126 | | | |
|
4160 | | | | |
4127 | o | new branch |
|
4161 | o | new branch | |
4128 | |/ |
|
4162 | |/ | |
4129 | o n |
|
4163 | o n | |
4130 | | |
|
4164 | | | |
4131 | o n |
|
4165 | o n | |
4132 | | |
|
4166 | | | |
4133 | o |
|
4167 | o | |
4134 | | |
|
4168 | | | |
4135 | o line 1 |
|
4169 | o line 1 | |
4136 | line 2 |
|
4170 | line 2 | |
4137 |
|
4171 | |||
4138 | Test word error messages for not enough and too many arguments |
|
4172 | Test word error messages for not enough and too many arguments | |
4139 |
|
4173 | |||
4140 | $ hg log -Gv -R a --template "{word('0')}" |
|
4174 | $ hg log -Gv -R a --template "{word('0')}" | |
4141 | hg: parse error: word expects two or three arguments, got 1 |
|
4175 | hg: parse error: word expects two or three arguments, got 1 | |
4142 | [255] |
|
4176 | [255] | |
4143 |
|
4177 | |||
4144 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" |
|
4178 | $ hg log -Gv -R a --template "{word('0', desc, 'o', 'h', 'b', 'o', 'y')}" | |
4145 | hg: parse error: word expects two or three arguments, got 7 |
|
4179 | hg: parse error: word expects two or three arguments, got 7 | |
4146 | [255] |
|
4180 | [255] | |
4147 |
|
4181 | |||
4148 | Test word for integer literal |
|
4182 | Test word for integer literal | |
4149 |
|
4183 | |||
4150 | $ hg log -R a --template "{word(2, desc)}\n" -r0 |
|
4184 | $ hg log -R a --template "{word(2, desc)}\n" -r0 | |
4151 | line |
|
4185 | line | |
4152 |
|
4186 | |||
4153 | Test word for invalid numbers |
|
4187 | Test word for invalid numbers | |
4154 |
|
4188 | |||
4155 | $ hg log -Gv -R a --template "{word('a', desc)}" |
|
4189 | $ hg log -Gv -R a --template "{word('a', desc)}" | |
4156 | hg: parse error: word expects an integer index |
|
4190 | hg: parse error: word expects an integer index | |
4157 | [255] |
|
4191 | [255] | |
4158 |
|
4192 | |||
4159 | Test word for out of range |
|
4193 | Test word for out of range | |
4160 |
|
4194 | |||
4161 | $ hg log -R a --template "{word(10000, desc)}" |
|
4195 | $ hg log -R a --template "{word(10000, desc)}" | |
4162 | $ hg log -R a --template "{word(-10000, desc)}" |
|
4196 | $ hg log -R a --template "{word(-10000, desc)}" | |
4163 |
|
4197 | |||
4164 | Test indent and not adding to empty lines |
|
4198 | Test indent and not adding to empty lines | |
4165 |
|
4199 | |||
4166 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a |
|
4200 | $ hg log -T "-----\n{indent(desc, '>> ', ' > ')}\n" -r 0:1 -R a | |
4167 | ----- |
|
4201 | ----- | |
4168 | > line 1 |
|
4202 | > line 1 | |
4169 | >> line 2 |
|
4203 | >> line 2 | |
4170 | ----- |
|
4204 | ----- | |
4171 | > other 1 |
|
4205 | > other 1 | |
4172 | >> other 2 |
|
4206 | >> other 2 | |
4173 |
|
4207 | |||
4174 | >> other 3 |
|
4208 | >> other 3 | |
4175 |
|
4209 | |||
4176 | Test with non-strings like dates |
|
4210 | Test with non-strings like dates | |
4177 |
|
4211 | |||
4178 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a |
|
4212 | $ hg log -T "{indent(date, ' ')}\n" -r 2:3 -R a | |
4179 | 1200000.00 |
|
4213 | 1200000.00 | |
4180 | 1300000.00 |
|
4214 | 1300000.00 | |
4181 |
|
4215 | |||
4182 | Test broken string escapes: |
|
4216 | Test broken string escapes: | |
4183 |
|
4217 | |||
4184 | $ hg log -T "bogus\\" -R a |
|
4218 | $ hg log -T "bogus\\" -R a | |
4185 | hg: parse error: trailing \ in string |
|
4219 | hg: parse error: trailing \ in string | |
4186 | [255] |
|
4220 | [255] | |
4187 | $ hg log -T "\\xy" -R a |
|
4221 | $ hg log -T "\\xy" -R a | |
4188 | hg: parse error: invalid \x escape |
|
4222 | hg: parse error: invalid \x escape | |
4189 | [255] |
|
4223 | [255] | |
4190 |
|
4224 | |||
4191 | json filter should escape HTML tags so that the output can be embedded in hgweb: |
|
4225 | json filter should escape HTML tags so that the output can be embedded in hgweb: | |
4192 |
|
4226 | |||
4193 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 |
|
4227 | $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1 | |
4194 | "\u003cfoo@example.org\u003e" |
|
4228 | "\u003cfoo@example.org\u003e" | |
4195 |
|
4229 | |||
4196 | Templater supports aliases of symbol and func() styles: |
|
4230 | Templater supports aliases of symbol and func() styles: | |
4197 |
|
4231 | |||
4198 | $ hg clone -q a aliases |
|
4232 | $ hg clone -q a aliases | |
4199 | $ cd aliases |
|
4233 | $ cd aliases | |
4200 | $ cat <<EOF >> .hg/hgrc |
|
4234 | $ cat <<EOF >> .hg/hgrc | |
4201 | > [templatealias] |
|
4235 | > [templatealias] | |
4202 | > r = rev |
|
4236 | > r = rev | |
4203 | > rn = "{r}:{node|short}" |
|
4237 | > rn = "{r}:{node|short}" | |
4204 | > status(c, files) = files % "{c} {file}\n" |
|
4238 | > status(c, files) = files % "{c} {file}\n" | |
4205 | > utcdate(d) = localdate(d, "UTC") |
|
4239 | > utcdate(d) = localdate(d, "UTC") | |
4206 | > EOF |
|
4240 | > EOF | |
4207 |
|
4241 | |||
4208 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' |
|
4242 | $ hg debugtemplate -vr0 '{rn} {utcdate(date)|isodate}\n' | |
4209 | (template |
|
4243 | (template | |
4210 | ('symbol', 'rn') |
|
4244 | ('symbol', 'rn') | |
4211 | ('string', ' ') |
|
4245 | ('string', ' ') | |
4212 | (| |
|
4246 | (| | |
4213 | (func |
|
4247 | (func | |
4214 | ('symbol', 'utcdate') |
|
4248 | ('symbol', 'utcdate') | |
4215 | ('symbol', 'date')) |
|
4249 | ('symbol', 'date')) | |
4216 | ('symbol', 'isodate')) |
|
4250 | ('symbol', 'isodate')) | |
4217 | ('string', '\n')) |
|
4251 | ('string', '\n')) | |
4218 | * expanded: |
|
4252 | * expanded: | |
4219 | (template |
|
4253 | (template | |
4220 | (template |
|
4254 | (template | |
4221 | ('symbol', 'rev') |
|
4255 | ('symbol', 'rev') | |
4222 | ('string', ':') |
|
4256 | ('string', ':') | |
4223 | (| |
|
4257 | (| | |
4224 | ('symbol', 'node') |
|
4258 | ('symbol', 'node') | |
4225 | ('symbol', 'short'))) |
|
4259 | ('symbol', 'short'))) | |
4226 | ('string', ' ') |
|
4260 | ('string', ' ') | |
4227 | (| |
|
4261 | (| | |
4228 | (func |
|
4262 | (func | |
4229 | ('symbol', 'localdate') |
|
4263 | ('symbol', 'localdate') | |
4230 | (list |
|
4264 | (list | |
4231 | ('symbol', 'date') |
|
4265 | ('symbol', 'date') | |
4232 | ('string', 'UTC'))) |
|
4266 | ('string', 'UTC'))) | |
4233 | ('symbol', 'isodate')) |
|
4267 | ('symbol', 'isodate')) | |
4234 | ('string', '\n')) |
|
4268 | ('string', '\n')) | |
4235 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4269 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4236 |
|
4270 | |||
4237 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' |
|
4271 | $ hg debugtemplate -vr0 '{status("A", file_adds)}' | |
4238 | (template |
|
4272 | (template | |
4239 | (func |
|
4273 | (func | |
4240 | ('symbol', 'status') |
|
4274 | ('symbol', 'status') | |
4241 | (list |
|
4275 | (list | |
4242 | ('string', 'A') |
|
4276 | ('string', 'A') | |
4243 | ('symbol', 'file_adds')))) |
|
4277 | ('symbol', 'file_adds')))) | |
4244 | * expanded: |
|
4278 | * expanded: | |
4245 | (template |
|
4279 | (template | |
4246 | (% |
|
4280 | (% | |
4247 | ('symbol', 'file_adds') |
|
4281 | ('symbol', 'file_adds') | |
4248 | (template |
|
4282 | (template | |
4249 | ('string', 'A') |
|
4283 | ('string', 'A') | |
4250 | ('string', ' ') |
|
4284 | ('string', ' ') | |
4251 | ('symbol', 'file') |
|
4285 | ('symbol', 'file') | |
4252 | ('string', '\n')))) |
|
4286 | ('string', '\n')))) | |
4253 | A a |
|
4287 | A a | |
4254 |
|
4288 | |||
4255 | A unary function alias can be called as a filter: |
|
4289 | A unary function alias can be called as a filter: | |
4256 |
|
4290 | |||
4257 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' |
|
4291 | $ hg debugtemplate -vr0 '{date|utcdate|isodate}\n' | |
4258 | (template |
|
4292 | (template | |
4259 | (| |
|
4293 | (| | |
4260 | (| |
|
4294 | (| | |
4261 | ('symbol', 'date') |
|
4295 | ('symbol', 'date') | |
4262 | ('symbol', 'utcdate')) |
|
4296 | ('symbol', 'utcdate')) | |
4263 | ('symbol', 'isodate')) |
|
4297 | ('symbol', 'isodate')) | |
4264 | ('string', '\n')) |
|
4298 | ('string', '\n')) | |
4265 | * expanded: |
|
4299 | * expanded: | |
4266 | (template |
|
4300 | (template | |
4267 | (| |
|
4301 | (| | |
4268 | (func |
|
4302 | (func | |
4269 | ('symbol', 'localdate') |
|
4303 | ('symbol', 'localdate') | |
4270 | (list |
|
4304 | (list | |
4271 | ('symbol', 'date') |
|
4305 | ('symbol', 'date') | |
4272 | ('string', 'UTC'))) |
|
4306 | ('string', 'UTC'))) | |
4273 | ('symbol', 'isodate')) |
|
4307 | ('symbol', 'isodate')) | |
4274 | ('string', '\n')) |
|
4308 | ('string', '\n')) | |
4275 | 1970-01-12 13:46 +0000 |
|
4309 | 1970-01-12 13:46 +0000 | |
4276 |
|
4310 | |||
4277 | Aliases should be applied only to command arguments and templates in hgrc. |
|
4311 | Aliases should be applied only to command arguments and templates in hgrc. | |
4278 | Otherwise, our stock styles and web templates could be corrupted: |
|
4312 | Otherwise, our stock styles and web templates could be corrupted: | |
4279 |
|
4313 | |||
4280 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' |
|
4314 | $ hg log -r0 -T '{rn} {utcdate(date)|isodate}\n' | |
4281 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4315 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4282 |
|
4316 | |||
4283 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' |
|
4317 | $ hg log -r0 --config ui.logtemplate='"{rn} {utcdate(date)|isodate}\n"' | |
4284 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 |
|
4318 | 0:1e4e1b8f71e0 1970-01-12 13:46 +0000 | |
4285 |
|
4319 | |||
4286 | $ cat <<EOF > tmpl |
|
4320 | $ cat <<EOF > tmpl | |
4287 | > changeset = 'nothing expanded:{rn}\n' |
|
4321 | > changeset = 'nothing expanded:{rn}\n' | |
4288 | > EOF |
|
4322 | > EOF | |
4289 | $ hg log -r0 --style ./tmpl |
|
4323 | $ hg log -r0 --style ./tmpl | |
4290 | nothing expanded: |
|
4324 | nothing expanded: | |
4291 |
|
4325 | |||
4292 | Aliases in formatter: |
|
4326 | Aliases in formatter: | |
4293 |
|
4327 | |||
4294 | $ hg branches -T '{pad(branch, 7)} {rn}\n' |
|
4328 | $ hg branches -T '{pad(branch, 7)} {rn}\n' | |
4295 | default 6:d41e714fe50d |
|
4329 | default 6:d41e714fe50d | |
4296 | foo 4:bbe44766e73d |
|
4330 | foo 4:bbe44766e73d | |
4297 |
|
4331 | |||
4298 | Aliases should honor HGPLAIN: |
|
4332 | Aliases should honor HGPLAIN: | |
4299 |
|
4333 | |||
4300 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' |
|
4334 | $ HGPLAIN= hg log -r0 -T 'nothing expanded:{rn}\n' | |
4301 | nothing expanded: |
|
4335 | nothing expanded: | |
4302 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' |
|
4336 | $ HGPLAINEXCEPT=templatealias hg log -r0 -T '{rn}\n' | |
4303 | 0:1e4e1b8f71e0 |
|
4337 | 0:1e4e1b8f71e0 | |
4304 |
|
4338 | |||
4305 | Unparsable alias: |
|
4339 | Unparsable alias: | |
4306 |
|
4340 | |||
4307 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' |
|
4341 | $ hg debugtemplate --config templatealias.bad='x(' -v '{bad}' | |
4308 | (template |
|
4342 | (template | |
4309 | ('symbol', 'bad')) |
|
4343 | ('symbol', 'bad')) | |
4310 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
4344 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4311 | [255] |
|
4345 | [255] | |
4312 | $ hg log --config templatealias.bad='x(' -T '{bad}' |
|
4346 | $ hg log --config templatealias.bad='x(' -T '{bad}' | |
4313 | abort: bad definition of template alias "bad": at 2: not a prefix: end |
|
4347 | abort: bad definition of template alias "bad": at 2: not a prefix: end | |
4314 | [255] |
|
4348 | [255] | |
4315 |
|
4349 | |||
4316 | $ cd .. |
|
4350 | $ cd .. | |
4317 |
|
4351 | |||
4318 | Set up repository for non-ascii encoding tests: |
|
4352 | Set up repository for non-ascii encoding tests: | |
4319 |
|
4353 | |||
4320 | $ hg init nonascii |
|
4354 | $ hg init nonascii | |
4321 | $ cd nonascii |
|
4355 | $ cd nonascii | |
4322 | $ $PYTHON <<EOF |
|
4356 | $ $PYTHON <<EOF | |
4323 | > open('latin1', 'w').write('\xe9') |
|
4357 | > open('latin1', 'w').write('\xe9') | |
4324 | > open('utf-8', 'w').write('\xc3\xa9') |
|
4358 | > open('utf-8', 'w').write('\xc3\xa9') | |
4325 | > EOF |
|
4359 | > EOF | |
4326 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
|
4360 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` | |
4327 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 |
|
4361 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 | |
4328 |
|
4362 | |||
4329 | json filter should try round-trip conversion to utf-8: |
|
4363 | json filter should try round-trip conversion to utf-8: | |
4330 |
|
4364 | |||
4331 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 |
|
4365 | $ HGENCODING=ascii hg log -T "{branch|json}\n" -r0 | |
4332 | "\u00e9" |
|
4366 | "\u00e9" | |
4333 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 |
|
4367 | $ HGENCODING=ascii hg log -T "{desc|json}\n" -r0 | |
4334 | "non-ascii branch: \u00e9" |
|
4368 | "non-ascii branch: \u00e9" | |
4335 |
|
4369 | |||
4336 | json filter takes input as utf-8b: |
|
4370 | json filter takes input as utf-8b: | |
4337 |
|
4371 | |||
4338 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 |
|
4372 | $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 | |
4339 | "\u00e9" |
|
4373 | "\u00e9" | |
4340 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 |
|
4374 | $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1 | |
4341 | "\udce9" |
|
4375 | "\udce9" | |
4342 |
|
4376 | |||
4343 | utf8 filter: |
|
4377 | utf8 filter: | |
4344 |
|
4378 | |||
4345 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 |
|
4379 | $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 | |
4346 | round-trip: c3a9 |
|
4380 | round-trip: c3a9 | |
4347 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
4381 | $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4348 | decoded: c3a9 |
|
4382 | decoded: c3a9 | |
4349 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
4383 | $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 | |
4350 | abort: decoding near * (glob) |
|
4384 | abort: decoding near * (glob) | |
4351 | [255] |
|
4385 | [255] | |
4352 | $ hg log -T "invalid type: {rev|utf8}\n" -r0 |
|
4386 | $ hg log -T "invalid type: {rev|utf8}\n" -r0 | |
4353 | abort: template filter 'utf8' is not compatible with keyword 'rev' |
|
4387 | abort: template filter 'utf8' is not compatible with keyword 'rev' | |
4354 | [255] |
|
4388 | [255] | |
4355 |
|
4389 | |||
4356 | pad width: |
|
4390 | pad width: | |
4357 |
|
4391 | |||
4358 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" |
|
4392 | $ HGENCODING=utf-8 hg debugtemplate "{pad('`cat utf-8`', 2, '-')}\n" | |
4359 | \xc3\xa9- (esc) |
|
4393 | \xc3\xa9- (esc) | |
4360 |
|
4394 | |||
4361 | $ cd .. |
|
4395 | $ cd .. | |
4362 |
|
4396 | |||
4363 | Test that template function in extension is registered as expected |
|
4397 | Test that template function in extension is registered as expected | |
4364 |
|
4398 | |||
4365 | $ cd a |
|
4399 | $ cd a | |
4366 |
|
4400 | |||
4367 | $ cat <<EOF > $TESTTMP/customfunc.py |
|
4401 | $ cat <<EOF > $TESTTMP/customfunc.py | |
4368 | > from mercurial import registrar |
|
4402 | > from mercurial import registrar | |
4369 | > |
|
4403 | > | |
4370 | > templatefunc = registrar.templatefunc() |
|
4404 | > templatefunc = registrar.templatefunc() | |
4371 | > |
|
4405 | > | |
4372 | > @templatefunc('custom()') |
|
4406 | > @templatefunc('custom()') | |
4373 | > def custom(context, mapping, args): |
|
4407 | > def custom(context, mapping, args): | |
4374 | > return 'custom' |
|
4408 | > return 'custom' | |
4375 | > EOF |
|
4409 | > EOF | |
4376 | $ cat <<EOF > .hg/hgrc |
|
4410 | $ cat <<EOF > .hg/hgrc | |
4377 | > [extensions] |
|
4411 | > [extensions] | |
4378 | > customfunc = $TESTTMP/customfunc.py |
|
4412 | > customfunc = $TESTTMP/customfunc.py | |
4379 | > EOF |
|
4413 | > EOF | |
4380 |
|
4414 | |||
4381 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true |
|
4415 | $ hg log -r . -T "{custom()}\n" --config customfunc.enabled=true | |
4382 | custom |
|
4416 | custom | |
4383 |
|
4417 | |||
4384 | $ cd .. |
|
4418 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now