##// END OF EJS Templates
templatekw: make {file_*} compare to both merge parents (issue4292)...
Martin von Zweigbergk -
r42982:0c72eddb default
parent child Browse files
Show More
@@ -1,863 +1,864 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 wdirid,
14 wdirid,
15 wdirrev,
15 wdirrev,
16 )
16 )
17
17
18 from . import (
18 from . import (
19 diffutil,
19 diffutil,
20 encoding,
20 encoding,
21 error,
21 error,
22 hbisect,
22 hbisect,
23 i18n,
23 i18n,
24 obsutil,
24 obsutil,
25 patch,
25 patch,
26 pycompat,
26 pycompat,
27 registrar,
27 registrar,
28 scmutil,
28 scmutil,
29 templateutil,
29 templateutil,
30 util,
30 util,
31 )
31 )
32 from .utils import (
32 from .utils import (
33 stringutil,
33 stringutil,
34 )
34 )
35
35
36 _hybrid = templateutil.hybrid
36 _hybrid = templateutil.hybrid
37 hybriddict = templateutil.hybriddict
37 hybriddict = templateutil.hybriddict
38 hybridlist = templateutil.hybridlist
38 hybridlist = templateutil.hybridlist
39 compatdict = templateutil.compatdict
39 compatdict = templateutil.compatdict
40 compatlist = templateutil.compatlist
40 compatlist = templateutil.compatlist
41 _showcompatlist = templateutil._showcompatlist
41 _showcompatlist = templateutil._showcompatlist
42
42
43 def getlatesttags(context, mapping, pattern=None):
43 def getlatesttags(context, mapping, pattern=None):
44 '''return date, distance and name for the latest tag of rev'''
44 '''return date, distance and name for the latest tag of rev'''
45 repo = context.resource(mapping, 'repo')
45 repo = context.resource(mapping, 'repo')
46 ctx = context.resource(mapping, 'ctx')
46 ctx = context.resource(mapping, 'ctx')
47 cache = context.resource(mapping, 'cache')
47 cache = context.resource(mapping, 'cache')
48
48
49 cachename = 'latesttags'
49 cachename = 'latesttags'
50 if pattern is not None:
50 if pattern is not None:
51 cachename += '-' + pattern
51 cachename += '-' + pattern
52 match = stringutil.stringmatcher(pattern)[2]
52 match = stringutil.stringmatcher(pattern)[2]
53 else:
53 else:
54 match = util.always
54 match = util.always
55
55
56 if cachename not in cache:
56 if cachename not in cache:
57 # Cache mapping from rev to a tuple with tag date, tag
57 # Cache mapping from rev to a tuple with tag date, tag
58 # distance and tag name
58 # distance and tag name
59 cache[cachename] = {-1: (0, 0, ['null'])}
59 cache[cachename] = {-1: (0, 0, ['null'])}
60 latesttags = cache[cachename]
60 latesttags = cache[cachename]
61
61
62 rev = ctx.rev()
62 rev = ctx.rev()
63 todo = [rev]
63 todo = [rev]
64 while todo:
64 while todo:
65 rev = todo.pop()
65 rev = todo.pop()
66 if rev in latesttags:
66 if rev in latesttags:
67 continue
67 continue
68 ctx = repo[rev]
68 ctx = repo[rev]
69 tags = [t for t in ctx.tags()
69 tags = [t for t in ctx.tags()
70 if (repo.tagtype(t) and repo.tagtype(t) != 'local'
70 if (repo.tagtype(t) and repo.tagtype(t) != 'local'
71 and match(t))]
71 and match(t))]
72 if tags:
72 if tags:
73 latesttags[rev] = ctx.date()[0], 0, [t for t in sorted(tags)]
73 latesttags[rev] = ctx.date()[0], 0, [t for t in sorted(tags)]
74 continue
74 continue
75 try:
75 try:
76 ptags = [latesttags[p.rev()] for p in ctx.parents()]
76 ptags = [latesttags[p.rev()] for p in ctx.parents()]
77 if len(ptags) > 1:
77 if len(ptags) > 1:
78 if ptags[0][2] == ptags[1][2]:
78 if ptags[0][2] == ptags[1][2]:
79 # The tuples are laid out so the right one can be found by
79 # The tuples are laid out so the right one can be found by
80 # comparison in this case.
80 # comparison in this case.
81 pdate, pdist, ptag = max(ptags)
81 pdate, pdist, ptag = max(ptags)
82 else:
82 else:
83 def key(x):
83 def key(x):
84 tag = x[2][0]
84 tag = x[2][0]
85 if ctx.rev() is None:
85 if ctx.rev() is None:
86 # only() doesn't support wdir
86 # only() doesn't support wdir
87 prevs = [c.rev() for c in ctx.parents()]
87 prevs = [c.rev() for c in ctx.parents()]
88 changes = repo.revs('only(%ld, %s)', prevs, tag)
88 changes = repo.revs('only(%ld, %s)', prevs, tag)
89 changessincetag = len(changes) + 1
89 changessincetag = len(changes) + 1
90 else:
90 else:
91 changes = repo.revs('only(%d, %s)', ctx.rev(), tag)
91 changes = repo.revs('only(%d, %s)', ctx.rev(), tag)
92 changessincetag = len(changes)
92 changessincetag = len(changes)
93 # Smallest number of changes since tag wins. Date is
93 # Smallest number of changes since tag wins. Date is
94 # used as tiebreaker.
94 # used as tiebreaker.
95 return [-changessincetag, x[0]]
95 return [-changessincetag, x[0]]
96 pdate, pdist, ptag = max(ptags, key=key)
96 pdate, pdist, ptag = max(ptags, key=key)
97 else:
97 else:
98 pdate, pdist, ptag = ptags[0]
98 pdate, pdist, ptag = ptags[0]
99 except KeyError:
99 except KeyError:
100 # Cache miss - recurse
100 # Cache miss - recurse
101 todo.append(rev)
101 todo.append(rev)
102 todo.extend(p.rev() for p in ctx.parents())
102 todo.extend(p.rev() for p in ctx.parents())
103 continue
103 continue
104 latesttags[rev] = pdate, pdist + 1, ptag
104 latesttags[rev] = pdate, pdist + 1, ptag
105 return latesttags[rev]
105 return latesttags[rev]
106
106
107 def getlogcolumns():
107 def getlogcolumns():
108 """Return a dict of log column labels"""
108 """Return a dict of log column labels"""
109 _ = pycompat.identity # temporarily disable gettext
109 _ = pycompat.identity # temporarily disable gettext
110 # i18n: column positioning for "hg log"
110 # i18n: column positioning for "hg log"
111 columns = _('bookmark: %s\n'
111 columns = _('bookmark: %s\n'
112 'branch: %s\n'
112 'branch: %s\n'
113 'changeset: %s\n'
113 'changeset: %s\n'
114 'copies: %s\n'
114 'copies: %s\n'
115 'date: %s\n'
115 'date: %s\n'
116 'extra: %s=%s\n'
116 'extra: %s=%s\n'
117 'files+: %s\n'
117 'files+: %s\n'
118 'files-: %s\n'
118 'files-: %s\n'
119 'files: %s\n'
119 'files: %s\n'
120 'instability: %s\n'
120 'instability: %s\n'
121 'manifest: %s\n'
121 'manifest: %s\n'
122 'obsolete: %s\n'
122 'obsolete: %s\n'
123 'parent: %s\n'
123 'parent: %s\n'
124 'phase: %s\n'
124 'phase: %s\n'
125 'summary: %s\n'
125 'summary: %s\n'
126 'tag: %s\n'
126 'tag: %s\n'
127 'user: %s\n')
127 'user: %s\n')
128 return dict(zip([s.split(':', 1)[0] for s in columns.splitlines()],
128 return dict(zip([s.split(':', 1)[0] for s in columns.splitlines()],
129 i18n._(columns).splitlines(True)))
129 i18n._(columns).splitlines(True)))
130
130
131 # basic internal templates
131 # basic internal templates
132 _changeidtmpl = '{rev}:{node|formatnode}'
132 _changeidtmpl = '{rev}:{node|formatnode}'
133
133
134 # default templates internally used for rendering of lists
134 # default templates internally used for rendering of lists
135 defaulttempl = {
135 defaulttempl = {
136 'parent': _changeidtmpl + ' ',
136 'parent': _changeidtmpl + ' ',
137 'manifest': _changeidtmpl,
137 'manifest': _changeidtmpl,
138 'file_copy': '{name} ({source})',
138 'file_copy': '{name} ({source})',
139 'envvar': '{key}={value}',
139 'envvar': '{key}={value}',
140 'extra': '{key}={value|stringescape}'
140 'extra': '{key}={value|stringescape}'
141 }
141 }
142 # filecopy is preserved for compatibility reasons
142 # filecopy is preserved for compatibility reasons
143 defaulttempl['filecopy'] = defaulttempl['file_copy']
143 defaulttempl['filecopy'] = defaulttempl['file_copy']
144
144
145 # keywords are callables (see registrar.templatekeyword for details)
145 # keywords are callables (see registrar.templatekeyword for details)
146 keywords = {}
146 keywords = {}
147 templatekeyword = registrar.templatekeyword(keywords)
147 templatekeyword = registrar.templatekeyword(keywords)
148
148
149 @templatekeyword('author', requires={'ctx'})
149 @templatekeyword('author', requires={'ctx'})
150 def showauthor(context, mapping):
150 def showauthor(context, mapping):
151 """Alias for ``{user}``"""
151 """Alias for ``{user}``"""
152 return showuser(context, mapping)
152 return showuser(context, mapping)
153
153
154 @templatekeyword('bisect', requires={'repo', 'ctx'})
154 @templatekeyword('bisect', requires={'repo', 'ctx'})
155 def showbisect(context, mapping):
155 def showbisect(context, mapping):
156 """String. The changeset bisection status."""
156 """String. The changeset bisection status."""
157 repo = context.resource(mapping, 'repo')
157 repo = context.resource(mapping, 'repo')
158 ctx = context.resource(mapping, 'ctx')
158 ctx = context.resource(mapping, 'ctx')
159 return hbisect.label(repo, ctx.node())
159 return hbisect.label(repo, ctx.node())
160
160
161 @templatekeyword('branch', requires={'ctx'})
161 @templatekeyword('branch', requires={'ctx'})
162 def showbranch(context, mapping):
162 def showbranch(context, mapping):
163 """String. The name of the branch on which the changeset was
163 """String. The name of the branch on which the changeset was
164 committed.
164 committed.
165 """
165 """
166 ctx = context.resource(mapping, 'ctx')
166 ctx = context.resource(mapping, 'ctx')
167 return ctx.branch()
167 return ctx.branch()
168
168
169 @templatekeyword('branches', requires={'ctx'})
169 @templatekeyword('branches', requires={'ctx'})
170 def showbranches(context, mapping):
170 def showbranches(context, mapping):
171 """List of strings. The name of the branch on which the
171 """List of strings. The name of the branch on which the
172 changeset was committed. Will be empty if the branch name was
172 changeset was committed. Will be empty if the branch name was
173 default. (DEPRECATED)
173 default. (DEPRECATED)
174 """
174 """
175 ctx = context.resource(mapping, 'ctx')
175 ctx = context.resource(mapping, 'ctx')
176 branch = ctx.branch()
176 branch = ctx.branch()
177 if branch != 'default':
177 if branch != 'default':
178 return compatlist(context, mapping, 'branch', [branch],
178 return compatlist(context, mapping, 'branch', [branch],
179 plural='branches')
179 plural='branches')
180 return compatlist(context, mapping, 'branch', [], plural='branches')
180 return compatlist(context, mapping, 'branch', [], plural='branches')
181
181
182 @templatekeyword('bookmarks', requires={'repo', 'ctx'})
182 @templatekeyword('bookmarks', requires={'repo', 'ctx'})
183 def showbookmarks(context, mapping):
183 def showbookmarks(context, mapping):
184 """List of strings. Any bookmarks associated with the
184 """List of strings. Any bookmarks associated with the
185 changeset. Also sets 'active', the name of the active bookmark.
185 changeset. Also sets 'active', the name of the active bookmark.
186 """
186 """
187 repo = context.resource(mapping, 'repo')
187 repo = context.resource(mapping, 'repo')
188 ctx = context.resource(mapping, 'ctx')
188 ctx = context.resource(mapping, 'ctx')
189 bookmarks = ctx.bookmarks()
189 bookmarks = ctx.bookmarks()
190 active = repo._activebookmark
190 active = repo._activebookmark
191 makemap = lambda v: {'bookmark': v, 'active': active, 'current': active}
191 makemap = lambda v: {'bookmark': v, 'active': active, 'current': active}
192 f = _showcompatlist(context, mapping, 'bookmark', bookmarks)
192 f = _showcompatlist(context, mapping, 'bookmark', bookmarks)
193 return _hybrid(f, bookmarks, makemap, pycompat.identity)
193 return _hybrid(f, bookmarks, makemap, pycompat.identity)
194
194
195 @templatekeyword('children', requires={'ctx'})
195 @templatekeyword('children', requires={'ctx'})
196 def showchildren(context, mapping):
196 def showchildren(context, mapping):
197 """List of strings. The children of the changeset."""
197 """List of strings. The children of the changeset."""
198 ctx = context.resource(mapping, 'ctx')
198 ctx = context.resource(mapping, 'ctx')
199 childrevs = ['%d:%s' % (cctx.rev(), cctx) for cctx in ctx.children()]
199 childrevs = ['%d:%s' % (cctx.rev(), cctx) for cctx in ctx.children()]
200 return compatlist(context, mapping, 'children', childrevs, element='child')
200 return compatlist(context, mapping, 'children', childrevs, element='child')
201
201
202 # Deprecated, but kept alive for help generation a purpose.
202 # Deprecated, but kept alive for help generation a purpose.
203 @templatekeyword('currentbookmark', requires={'repo', 'ctx'})
203 @templatekeyword('currentbookmark', requires={'repo', 'ctx'})
204 def showcurrentbookmark(context, mapping):
204 def showcurrentbookmark(context, mapping):
205 """String. The active bookmark, if it is associated with the changeset.
205 """String. The active bookmark, if it is associated with the changeset.
206 (DEPRECATED)"""
206 (DEPRECATED)"""
207 return showactivebookmark(context, mapping)
207 return showactivebookmark(context, mapping)
208
208
209 @templatekeyword('activebookmark', requires={'repo', 'ctx'})
209 @templatekeyword('activebookmark', requires={'repo', 'ctx'})
210 def showactivebookmark(context, mapping):
210 def showactivebookmark(context, mapping):
211 """String. The active bookmark, if it is associated with the changeset."""
211 """String. The active bookmark, if it is associated with the changeset."""
212 repo = context.resource(mapping, 'repo')
212 repo = context.resource(mapping, 'repo')
213 ctx = context.resource(mapping, 'ctx')
213 ctx = context.resource(mapping, 'ctx')
214 active = repo._activebookmark
214 active = repo._activebookmark
215 if active and active in ctx.bookmarks():
215 if active and active in ctx.bookmarks():
216 return active
216 return active
217 return ''
217 return ''
218
218
219 @templatekeyword('date', requires={'ctx'})
219 @templatekeyword('date', requires={'ctx'})
220 def showdate(context, mapping):
220 def showdate(context, mapping):
221 """Date information. The date when the changeset was committed."""
221 """Date information. The date when the changeset was committed."""
222 ctx = context.resource(mapping, 'ctx')
222 ctx = context.resource(mapping, 'ctx')
223 # the default string format is '<float(unixtime)><tzoffset>' because
223 # the default string format is '<float(unixtime)><tzoffset>' because
224 # python-hglib splits date at decimal separator.
224 # python-hglib splits date at decimal separator.
225 return templateutil.date(ctx.date(), showfmt='%d.0%d')
225 return templateutil.date(ctx.date(), showfmt='%d.0%d')
226
226
227 @templatekeyword('desc', requires={'ctx'})
227 @templatekeyword('desc', requires={'ctx'})
228 def showdescription(context, mapping):
228 def showdescription(context, mapping):
229 """String. The text of the changeset description."""
229 """String. The text of the changeset description."""
230 ctx = context.resource(mapping, 'ctx')
230 ctx = context.resource(mapping, 'ctx')
231 s = ctx.description()
231 s = ctx.description()
232 if isinstance(s, encoding.localstr):
232 if isinstance(s, encoding.localstr):
233 # try hard to preserve utf-8 bytes
233 # try hard to preserve utf-8 bytes
234 return encoding.tolocal(encoding.fromlocal(s).strip())
234 return encoding.tolocal(encoding.fromlocal(s).strip())
235 elif isinstance(s, encoding.safelocalstr):
235 elif isinstance(s, encoding.safelocalstr):
236 return encoding.safelocalstr(s.strip())
236 return encoding.safelocalstr(s.strip())
237 else:
237 else:
238 return s.strip()
238 return s.strip()
239
239
240 @templatekeyword('diffstat', requires={'ui', 'ctx'})
240 @templatekeyword('diffstat', requires={'ui', 'ctx'})
241 def showdiffstat(context, mapping):
241 def showdiffstat(context, mapping):
242 """String. Statistics of changes with the following format:
242 """String. Statistics of changes with the following format:
243 "modified files: +added/-removed lines"
243 "modified files: +added/-removed lines"
244 """
244 """
245 ui = context.resource(mapping, 'ui')
245 ui = context.resource(mapping, 'ui')
246 ctx = context.resource(mapping, 'ctx')
246 ctx = context.resource(mapping, 'ctx')
247 diffopts = diffutil.diffallopts(ui, {'noprefix': False})
247 diffopts = diffutil.diffallopts(ui, {'noprefix': False})
248 diff = ctx.diff(opts=diffopts)
248 diff = ctx.diff(opts=diffopts)
249 stats = patch.diffstatdata(util.iterlines(diff))
249 stats = patch.diffstatdata(util.iterlines(diff))
250 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
250 maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats)
251 return '%d: +%d/-%d' % (len(stats), adds, removes)
251 return '%d: +%d/-%d' % (len(stats), adds, removes)
252
252
253 @templatekeyword('envvars', requires={'ui'})
253 @templatekeyword('envvars', requires={'ui'})
254 def showenvvars(context, mapping):
254 def showenvvars(context, mapping):
255 """A dictionary of environment variables. (EXPERIMENTAL)"""
255 """A dictionary of environment variables. (EXPERIMENTAL)"""
256 ui = context.resource(mapping, 'ui')
256 ui = context.resource(mapping, 'ui')
257 env = ui.exportableenviron()
257 env = ui.exportableenviron()
258 env = util.sortdict((k, env[k]) for k in sorted(env))
258 env = util.sortdict((k, env[k]) for k in sorted(env))
259 return compatdict(context, mapping, 'envvar', env, plural='envvars')
259 return compatdict(context, mapping, 'envvar', env, plural='envvars')
260
260
261 @templatekeyword('extras', requires={'ctx'})
261 @templatekeyword('extras', requires={'ctx'})
262 def showextras(context, mapping):
262 def showextras(context, mapping):
263 """List of dicts with key, value entries of the 'extras'
263 """List of dicts with key, value entries of the 'extras'
264 field of this changeset."""
264 field of this changeset."""
265 ctx = context.resource(mapping, 'ctx')
265 ctx = context.resource(mapping, 'ctx')
266 extras = ctx.extra()
266 extras = ctx.extra()
267 extras = util.sortdict((k, extras[k]) for k in sorted(extras))
267 extras = util.sortdict((k, extras[k]) for k in sorted(extras))
268 makemap = lambda k: {'key': k, 'value': extras[k]}
268 makemap = lambda k: {'key': k, 'value': extras[k]}
269 c = [makemap(k) for k in extras]
269 c = [makemap(k) for k in extras]
270 f = _showcompatlist(context, mapping, 'extra', c, plural='extras')
270 f = _showcompatlist(context, mapping, 'extra', c, plural='extras')
271 return _hybrid(f, extras, makemap,
271 return _hybrid(f, extras, makemap,
272 lambda k: '%s=%s' % (k, stringutil.escapestr(extras[k])))
272 lambda k: '%s=%s' % (k, stringutil.escapestr(extras[k])))
273
273
274 def _getfilestatus(context, mapping, listall=False):
274 def _getfilestatus(context, mapping, listall=False):
275 ctx = context.resource(mapping, 'ctx')
275 ctx = context.resource(mapping, 'ctx')
276 revcache = context.resource(mapping, 'revcache')
276 revcache = context.resource(mapping, 'revcache')
277 if 'filestatus' not in revcache or revcache['filestatusall'] < listall:
277 if 'filestatus' not in revcache or revcache['filestatusall'] < listall:
278 stat = ctx.p1().status(ctx, listignored=listall, listclean=listall,
278 stat = ctx.p1().status(ctx, listignored=listall, listclean=listall,
279 listunknown=listall)
279 listunknown=listall)
280 revcache['filestatus'] = stat
280 revcache['filestatus'] = stat
281 revcache['filestatusall'] = listall
281 revcache['filestatusall'] = listall
282 return revcache['filestatus']
282 return revcache['filestatus']
283
283
284 def _getfilestatusmap(context, mapping, listall=False):
284 def _getfilestatusmap(context, mapping, listall=False):
285 revcache = context.resource(mapping, 'revcache')
285 revcache = context.resource(mapping, 'revcache')
286 if 'filestatusmap' not in revcache or revcache['filestatusall'] < listall:
286 if 'filestatusmap' not in revcache or revcache['filestatusall'] < listall:
287 stat = _getfilestatus(context, mapping, listall=listall)
287 stat = _getfilestatus(context, mapping, listall=listall)
288 revcache['filestatusmap'] = statmap = {}
288 revcache['filestatusmap'] = statmap = {}
289 for char, files in zip(pycompat.iterbytestr('MAR!?IC'), stat):
289 for char, files in zip(pycompat.iterbytestr('MAR!?IC'), stat):
290 statmap.update((f, char) for f in files)
290 statmap.update((f, char) for f in files)
291 return revcache['filestatusmap'] # {path: statchar}
291 return revcache['filestatusmap'] # {path: statchar}
292
292
293 def _showfilesbystat(context, mapping, name, index):
294 stat = _getfilestatus(context, mapping)
295 files = stat[index]
296 return templateutil.compatfileslist(context, mapping, name, files)
297
298 @templatekeyword('file_copies',
293 @templatekeyword('file_copies',
299 requires={'repo', 'ctx', 'cache', 'revcache'})
294 requires={'repo', 'ctx', 'cache', 'revcache'})
300 def showfilecopies(context, mapping):
295 def showfilecopies(context, mapping):
301 """List of strings. Files copied in this changeset with
296 """List of strings. Files copied in this changeset with
302 their sources.
297 their sources.
303 """
298 """
304 repo = context.resource(mapping, 'repo')
299 repo = context.resource(mapping, 'repo')
305 ctx = context.resource(mapping, 'ctx')
300 ctx = context.resource(mapping, 'ctx')
306 cache = context.resource(mapping, 'cache')
301 cache = context.resource(mapping, 'cache')
307 copies = context.resource(mapping, 'revcache').get('copies')
302 copies = context.resource(mapping, 'revcache').get('copies')
308 if copies is None:
303 if copies is None:
309 if 'getrenamed' not in cache:
304 if 'getrenamed' not in cache:
310 cache['getrenamed'] = scmutil.getrenamedfn(repo)
305 cache['getrenamed'] = scmutil.getrenamedfn(repo)
311 copies = []
306 copies = []
312 getrenamed = cache['getrenamed']
307 getrenamed = cache['getrenamed']
313 for fn in ctx.files():
308 for fn in ctx.files():
314 rename = getrenamed(fn, ctx.rev())
309 rename = getrenamed(fn, ctx.rev())
315 if rename:
310 if rename:
316 copies.append((fn, rename))
311 copies.append((fn, rename))
317 return templateutil.compatfilecopiesdict(context, mapping, 'file_copy',
312 return templateutil.compatfilecopiesdict(context, mapping, 'file_copy',
318 copies)
313 copies)
319
314
320 # showfilecopiesswitch() displays file copies only if copy records are
315 # showfilecopiesswitch() displays file copies only if copy records are
321 # provided before calling the templater, usually with a --copies
316 # provided before calling the templater, usually with a --copies
322 # command line switch.
317 # command line switch.
323 @templatekeyword('file_copies_switch', requires={'revcache'})
318 @templatekeyword('file_copies_switch', requires={'revcache'})
324 def showfilecopiesswitch(context, mapping):
319 def showfilecopiesswitch(context, mapping):
325 """List of strings. Like "file_copies" but displayed
320 """List of strings. Like "file_copies" but displayed
326 only if the --copied switch is set.
321 only if the --copied switch is set.
327 """
322 """
328 copies = context.resource(mapping, 'revcache').get('copies') or []
323 copies = context.resource(mapping, 'revcache').get('copies') or []
329 return templateutil.compatfilecopiesdict(context, mapping, 'file_copy',
324 return templateutil.compatfilecopiesdict(context, mapping, 'file_copy',
330 copies)
325 copies)
331
326
332 @templatekeyword('file_adds', requires={'ctx', 'revcache'})
327 @templatekeyword('file_adds', requires={'ctx', 'revcache'})
333 def showfileadds(context, mapping):
328 def showfileadds(context, mapping):
334 """List of strings. Files added by this changeset."""
329 """List of strings. Files added by this changeset."""
335 return _showfilesbystat(context, mapping, 'file_add', 1)
330 ctx = context.resource(mapping, 'ctx')
331 return templateutil.compatfileslist(context, mapping, 'file_add',
332 ctx.filesadded())
336
333
337 @templatekeyword('file_dels', requires={'ctx', 'revcache'})
334 @templatekeyword('file_dels', requires={'ctx', 'revcache'})
338 def showfiledels(context, mapping):
335 def showfiledels(context, mapping):
339 """List of strings. Files removed by this changeset."""
336 """List of strings. Files removed by this changeset."""
340 return _showfilesbystat(context, mapping, 'file_del', 2)
337 ctx = context.resource(mapping, 'ctx')
338 return templateutil.compatfileslist(context, mapping, 'file_del',
339 ctx.filesremoved())
341
340
342 @templatekeyword('file_mods', requires={'ctx', 'revcache'})
341 @templatekeyword('file_mods', requires={'ctx', 'revcache'})
343 def showfilemods(context, mapping):
342 def showfilemods(context, mapping):
344 """List of strings. Files modified by this changeset."""
343 """List of strings. Files modified by this changeset."""
345 return _showfilesbystat(context, mapping, 'file_mod', 0)
344 ctx = context.resource(mapping, 'ctx')
345 return templateutil.compatfileslist(context, mapping, 'file_mod',
346 ctx.filesmodified())
346
347
347 @templatekeyword('files', requires={'ctx'})
348 @templatekeyword('files', requires={'ctx'})
348 def showfiles(context, mapping):
349 def showfiles(context, mapping):
349 """List of strings. All files modified, added, or removed by this
350 """List of strings. All files modified, added, or removed by this
350 changeset.
351 changeset.
351 """
352 """
352 ctx = context.resource(mapping, 'ctx')
353 ctx = context.resource(mapping, 'ctx')
353 return templateutil.compatfileslist(context, mapping, 'file', ctx.files())
354 return templateutil.compatfileslist(context, mapping, 'file', ctx.files())
354
355
355 @templatekeyword('graphnode', requires={'repo', 'ctx'})
356 @templatekeyword('graphnode', requires={'repo', 'ctx'})
356 def showgraphnode(context, mapping):
357 def showgraphnode(context, mapping):
357 """String. The character representing the changeset node in an ASCII
358 """String. The character representing the changeset node in an ASCII
358 revision graph."""
359 revision graph."""
359 repo = context.resource(mapping, 'repo')
360 repo = context.resource(mapping, 'repo')
360 ctx = context.resource(mapping, 'ctx')
361 ctx = context.resource(mapping, 'ctx')
361 return getgraphnode(repo, ctx)
362 return getgraphnode(repo, ctx)
362
363
363 def getgraphnode(repo, ctx):
364 def getgraphnode(repo, ctx):
364 return getgraphnodecurrent(repo, ctx) or getgraphnodesymbol(ctx)
365 return getgraphnodecurrent(repo, ctx) or getgraphnodesymbol(ctx)
365
366
366 def getgraphnodecurrent(repo, ctx):
367 def getgraphnodecurrent(repo, ctx):
367 wpnodes = repo.dirstate.parents()
368 wpnodes = repo.dirstate.parents()
368 if wpnodes[1] == nullid:
369 if wpnodes[1] == nullid:
369 wpnodes = wpnodes[:1]
370 wpnodes = wpnodes[:1]
370 if ctx.node() in wpnodes:
371 if ctx.node() in wpnodes:
371 return '@'
372 return '@'
372 else:
373 else:
373 return ''
374 return ''
374
375
375 def getgraphnodesymbol(ctx):
376 def getgraphnodesymbol(ctx):
376 if ctx.obsolete():
377 if ctx.obsolete():
377 return 'x'
378 return 'x'
378 elif ctx.isunstable():
379 elif ctx.isunstable():
379 return '*'
380 return '*'
380 elif ctx.closesbranch():
381 elif ctx.closesbranch():
381 return '_'
382 return '_'
382 else:
383 else:
383 return 'o'
384 return 'o'
384
385
385 @templatekeyword('graphwidth', requires=())
386 @templatekeyword('graphwidth', requires=())
386 def showgraphwidth(context, mapping):
387 def showgraphwidth(context, mapping):
387 """Integer. The width of the graph drawn by 'log --graph' or zero."""
388 """Integer. The width of the graph drawn by 'log --graph' or zero."""
388 # just hosts documentation; should be overridden by template mapping
389 # just hosts documentation; should be overridden by template mapping
389 return 0
390 return 0
390
391
391 @templatekeyword('index', requires=())
392 @templatekeyword('index', requires=())
392 def showindex(context, mapping):
393 def showindex(context, mapping):
393 """Integer. The current iteration of the loop. (0 indexed)"""
394 """Integer. The current iteration of the loop. (0 indexed)"""
394 # just hosts documentation; should be overridden by template mapping
395 # just hosts documentation; should be overridden by template mapping
395 raise error.Abort(_("can't use index in this context"))
396 raise error.Abort(_("can't use index in this context"))
396
397
397 @templatekeyword('latesttag', requires={'repo', 'ctx', 'cache'})
398 @templatekeyword('latesttag', requires={'repo', 'ctx', 'cache'})
398 def showlatesttag(context, mapping):
399 def showlatesttag(context, mapping):
399 """List of strings. The global tags on the most recent globally
400 """List of strings. The global tags on the most recent globally
400 tagged ancestor of this changeset. If no such tags exist, the list
401 tagged ancestor of this changeset. If no such tags exist, the list
401 consists of the single string "null".
402 consists of the single string "null".
402 """
403 """
403 return showlatesttags(context, mapping, None)
404 return showlatesttags(context, mapping, None)
404
405
405 def showlatesttags(context, mapping, pattern):
406 def showlatesttags(context, mapping, pattern):
406 """helper method for the latesttag keyword and function"""
407 """helper method for the latesttag keyword and function"""
407 latesttags = getlatesttags(context, mapping, pattern)
408 latesttags = getlatesttags(context, mapping, pattern)
408
409
409 # latesttag[0] is an implementation detail for sorting csets on different
410 # latesttag[0] is an implementation detail for sorting csets on different
410 # branches in a stable manner- it is the date the tagged cset was created,
411 # branches in a stable manner- it is the date the tagged cset was created,
411 # not the date the tag was created. Therefore it isn't made visible here.
412 # not the date the tag was created. Therefore it isn't made visible here.
412 makemap = lambda v: {
413 makemap = lambda v: {
413 'changes': _showchangessincetag,
414 'changes': _showchangessincetag,
414 'distance': latesttags[1],
415 'distance': latesttags[1],
415 'latesttag': v, # BC with {latesttag % '{latesttag}'}
416 'latesttag': v, # BC with {latesttag % '{latesttag}'}
416 'tag': v
417 'tag': v
417 }
418 }
418
419
419 tags = latesttags[2]
420 tags = latesttags[2]
420 f = _showcompatlist(context, mapping, 'latesttag', tags, separator=':')
421 f = _showcompatlist(context, mapping, 'latesttag', tags, separator=':')
421 return _hybrid(f, tags, makemap, pycompat.identity)
422 return _hybrid(f, tags, makemap, pycompat.identity)
422
423
423 @templatekeyword('latesttagdistance', requires={'repo', 'ctx', 'cache'})
424 @templatekeyword('latesttagdistance', requires={'repo', 'ctx', 'cache'})
424 def showlatesttagdistance(context, mapping):
425 def showlatesttagdistance(context, mapping):
425 """Integer. Longest path to the latest tag."""
426 """Integer. Longest path to the latest tag."""
426 return getlatesttags(context, mapping)[1]
427 return getlatesttags(context, mapping)[1]
427
428
428 @templatekeyword('changessincelatesttag', requires={'repo', 'ctx', 'cache'})
429 @templatekeyword('changessincelatesttag', requires={'repo', 'ctx', 'cache'})
429 def showchangessincelatesttag(context, mapping):
430 def showchangessincelatesttag(context, mapping):
430 """Integer. All ancestors not in the latest tag."""
431 """Integer. All ancestors not in the latest tag."""
431 tag = getlatesttags(context, mapping)[2][0]
432 tag = getlatesttags(context, mapping)[2][0]
432 mapping = context.overlaymap(mapping, {'tag': tag})
433 mapping = context.overlaymap(mapping, {'tag': tag})
433 return _showchangessincetag(context, mapping)
434 return _showchangessincetag(context, mapping)
434
435
435 def _showchangessincetag(context, mapping):
436 def _showchangessincetag(context, mapping):
436 repo = context.resource(mapping, 'repo')
437 repo = context.resource(mapping, 'repo')
437 ctx = context.resource(mapping, 'ctx')
438 ctx = context.resource(mapping, 'ctx')
438 offset = 0
439 offset = 0
439 revs = [ctx.rev()]
440 revs = [ctx.rev()]
440 tag = context.symbol(mapping, 'tag')
441 tag = context.symbol(mapping, 'tag')
441
442
442 # The only() revset doesn't currently support wdir()
443 # The only() revset doesn't currently support wdir()
443 if ctx.rev() is None:
444 if ctx.rev() is None:
444 offset = 1
445 offset = 1
445 revs = [p.rev() for p in ctx.parents()]
446 revs = [p.rev() for p in ctx.parents()]
446
447
447 return len(repo.revs('only(%ld, %s)', revs, tag)) + offset
448 return len(repo.revs('only(%ld, %s)', revs, tag)) + offset
448
449
449 # teach templater latesttags.changes is switched to (context, mapping) API
450 # teach templater latesttags.changes is switched to (context, mapping) API
450 _showchangessincetag._requires = {'repo', 'ctx'}
451 _showchangessincetag._requires = {'repo', 'ctx'}
451
452
452 @templatekeyword('manifest', requires={'repo', 'ctx'})
453 @templatekeyword('manifest', requires={'repo', 'ctx'})
453 def showmanifest(context, mapping):
454 def showmanifest(context, mapping):
454 repo = context.resource(mapping, 'repo')
455 repo = context.resource(mapping, 'repo')
455 ctx = context.resource(mapping, 'ctx')
456 ctx = context.resource(mapping, 'ctx')
456 mnode = ctx.manifestnode()
457 mnode = ctx.manifestnode()
457 if mnode is None:
458 if mnode is None:
458 mnode = wdirid
459 mnode = wdirid
459 mrev = wdirrev
460 mrev = wdirrev
460 else:
461 else:
461 mrev = repo.manifestlog.rev(mnode)
462 mrev = repo.manifestlog.rev(mnode)
462 mhex = hex(mnode)
463 mhex = hex(mnode)
463 mapping = context.overlaymap(mapping, {'rev': mrev, 'node': mhex})
464 mapping = context.overlaymap(mapping, {'rev': mrev, 'node': mhex})
464 f = context.process('manifest', mapping)
465 f = context.process('manifest', mapping)
465 return templateutil.hybriditem(f, None, f,
466 return templateutil.hybriditem(f, None, f,
466 lambda x: {'rev': mrev, 'node': mhex})
467 lambda x: {'rev': mrev, 'node': mhex})
467
468
468 @templatekeyword('obsfate', requires={'ui', 'repo', 'ctx'})
469 @templatekeyword('obsfate', requires={'ui', 'repo', 'ctx'})
469 def showobsfate(context, mapping):
470 def showobsfate(context, mapping):
470 # this function returns a list containing pre-formatted obsfate strings.
471 # this function returns a list containing pre-formatted obsfate strings.
471 #
472 #
472 # This function will be replaced by templates fragments when we will have
473 # This function will be replaced by templates fragments when we will have
473 # the verbosity templatekw available.
474 # the verbosity templatekw available.
474 succsandmarkers = showsuccsandmarkers(context, mapping)
475 succsandmarkers = showsuccsandmarkers(context, mapping)
475
476
476 ui = context.resource(mapping, 'ui')
477 ui = context.resource(mapping, 'ui')
477 repo = context.resource(mapping, 'repo')
478 repo = context.resource(mapping, 'repo')
478 values = []
479 values = []
479
480
480 for x in succsandmarkers.tovalue(context, mapping):
481 for x in succsandmarkers.tovalue(context, mapping):
481 v = obsutil.obsfateprinter(ui, repo, x['successors'], x['markers'],
482 v = obsutil.obsfateprinter(ui, repo, x['successors'], x['markers'],
482 scmutil.formatchangeid)
483 scmutil.formatchangeid)
483 values.append(v)
484 values.append(v)
484
485
485 return compatlist(context, mapping, "fate", values)
486 return compatlist(context, mapping, "fate", values)
486
487
487 def shownames(context, mapping, namespace):
488 def shownames(context, mapping, namespace):
488 """helper method to generate a template keyword for a namespace"""
489 """helper method to generate a template keyword for a namespace"""
489 repo = context.resource(mapping, 'repo')
490 repo = context.resource(mapping, 'repo')
490 ctx = context.resource(mapping, 'ctx')
491 ctx = context.resource(mapping, 'ctx')
491 ns = repo.names[namespace]
492 ns = repo.names[namespace]
492 names = ns.names(repo, ctx.node())
493 names = ns.names(repo, ctx.node())
493 return compatlist(context, mapping, ns.templatename, names,
494 return compatlist(context, mapping, ns.templatename, names,
494 plural=namespace)
495 plural=namespace)
495
496
496 @templatekeyword('namespaces', requires={'repo', 'ctx'})
497 @templatekeyword('namespaces', requires={'repo', 'ctx'})
497 def shownamespaces(context, mapping):
498 def shownamespaces(context, mapping):
498 """Dict of lists. Names attached to this changeset per
499 """Dict of lists. Names attached to this changeset per
499 namespace."""
500 namespace."""
500 repo = context.resource(mapping, 'repo')
501 repo = context.resource(mapping, 'repo')
501 ctx = context.resource(mapping, 'ctx')
502 ctx = context.resource(mapping, 'ctx')
502
503
503 namespaces = util.sortdict()
504 namespaces = util.sortdict()
504 def makensmapfn(ns):
505 def makensmapfn(ns):
505 # 'name' for iterating over namespaces, templatename for local reference
506 # 'name' for iterating over namespaces, templatename for local reference
506 return lambda v: {'name': v, ns.templatename: v}
507 return lambda v: {'name': v, ns.templatename: v}
507
508
508 for k, ns in repo.names.iteritems():
509 for k, ns in repo.names.iteritems():
509 names = ns.names(repo, ctx.node())
510 names = ns.names(repo, ctx.node())
510 f = _showcompatlist(context, mapping, 'name', names)
511 f = _showcompatlist(context, mapping, 'name', names)
511 namespaces[k] = _hybrid(f, names, makensmapfn(ns), pycompat.identity)
512 namespaces[k] = _hybrid(f, names, makensmapfn(ns), pycompat.identity)
512
513
513 f = _showcompatlist(context, mapping, 'namespace', list(namespaces))
514 f = _showcompatlist(context, mapping, 'namespace', list(namespaces))
514
515
515 def makemap(ns):
516 def makemap(ns):
516 return {
517 return {
517 'namespace': ns,
518 'namespace': ns,
518 'names': namespaces[ns],
519 'names': namespaces[ns],
519 'builtin': repo.names[ns].builtin,
520 'builtin': repo.names[ns].builtin,
520 'colorname': repo.names[ns].colorname,
521 'colorname': repo.names[ns].colorname,
521 }
522 }
522
523
523 return _hybrid(f, namespaces, makemap, pycompat.identity)
524 return _hybrid(f, namespaces, makemap, pycompat.identity)
524
525
525 @templatekeyword('negrev', requires={'repo', 'ctx'})
526 @templatekeyword('negrev', requires={'repo', 'ctx'})
526 def shownegrev(context, mapping):
527 def shownegrev(context, mapping):
527 """Integer. The repository-local changeset negative revision number,
528 """Integer. The repository-local changeset negative revision number,
528 which counts in the opposite direction."""
529 which counts in the opposite direction."""
529 ctx = context.resource(mapping, 'ctx')
530 ctx = context.resource(mapping, 'ctx')
530 rev = ctx.rev()
531 rev = ctx.rev()
531 if rev is None or rev < 0: # wdir() or nullrev?
532 if rev is None or rev < 0: # wdir() or nullrev?
532 return None
533 return None
533 repo = context.resource(mapping, 'repo')
534 repo = context.resource(mapping, 'repo')
534 return rev - len(repo)
535 return rev - len(repo)
535
536
536 @templatekeyword('node', requires={'ctx'})
537 @templatekeyword('node', requires={'ctx'})
537 def shownode(context, mapping):
538 def shownode(context, mapping):
538 """String. The changeset identification hash, as a 40 hexadecimal
539 """String. The changeset identification hash, as a 40 hexadecimal
539 digit string.
540 digit string.
540 """
541 """
541 ctx = context.resource(mapping, 'ctx')
542 ctx = context.resource(mapping, 'ctx')
542 return ctx.hex()
543 return ctx.hex()
543
544
544 @templatekeyword('obsolete', requires={'ctx'})
545 @templatekeyword('obsolete', requires={'ctx'})
545 def showobsolete(context, mapping):
546 def showobsolete(context, mapping):
546 """String. Whether the changeset is obsolete. (EXPERIMENTAL)"""
547 """String. Whether the changeset is obsolete. (EXPERIMENTAL)"""
547 ctx = context.resource(mapping, 'ctx')
548 ctx = context.resource(mapping, 'ctx')
548 if ctx.obsolete():
549 if ctx.obsolete():
549 return 'obsolete'
550 return 'obsolete'
550 return ''
551 return ''
551
552
552 @templatekeyword('path', requires={'fctx'})
553 @templatekeyword('path', requires={'fctx'})
553 def showpath(context, mapping):
554 def showpath(context, mapping):
554 """String. Repository-absolute path of the current file. (EXPERIMENTAL)"""
555 """String. Repository-absolute path of the current file. (EXPERIMENTAL)"""
555 fctx = context.resource(mapping, 'fctx')
556 fctx = context.resource(mapping, 'fctx')
556 return fctx.path()
557 return fctx.path()
557
558
558 @templatekeyword('peerurls', requires={'repo'})
559 @templatekeyword('peerurls', requires={'repo'})
559 def showpeerurls(context, mapping):
560 def showpeerurls(context, mapping):
560 """A dictionary of repository locations defined in the [paths] section
561 """A dictionary of repository locations defined in the [paths] section
561 of your configuration file."""
562 of your configuration file."""
562 repo = context.resource(mapping, 'repo')
563 repo = context.resource(mapping, 'repo')
563 # see commands.paths() for naming of dictionary keys
564 # see commands.paths() for naming of dictionary keys
564 paths = repo.ui.paths
565 paths = repo.ui.paths
565 urls = util.sortdict((k, p.rawloc) for k, p in sorted(paths.iteritems()))
566 urls = util.sortdict((k, p.rawloc) for k, p in sorted(paths.iteritems()))
566 def makemap(k):
567 def makemap(k):
567 p = paths[k]
568 p = paths[k]
568 d = {'name': k, 'url': p.rawloc}
569 d = {'name': k, 'url': p.rawloc}
569 d.update((o, v) for o, v in sorted(p.suboptions.iteritems()))
570 d.update((o, v) for o, v in sorted(p.suboptions.iteritems()))
570 return d
571 return d
571 return _hybrid(None, urls, makemap, lambda k: '%s=%s' % (k, urls[k]))
572 return _hybrid(None, urls, makemap, lambda k: '%s=%s' % (k, urls[k]))
572
573
573 @templatekeyword("predecessors", requires={'repo', 'ctx'})
574 @templatekeyword("predecessors", requires={'repo', 'ctx'})
574 def showpredecessors(context, mapping):
575 def showpredecessors(context, mapping):
575 """Returns the list of the closest visible successors. (EXPERIMENTAL)"""
576 """Returns the list of the closest visible successors. (EXPERIMENTAL)"""
576 repo = context.resource(mapping, 'repo')
577 repo = context.resource(mapping, 'repo')
577 ctx = context.resource(mapping, 'ctx')
578 ctx = context.resource(mapping, 'ctx')
578 predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node()))
579 predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node()))
579 predecessors = pycompat.maplist(hex, predecessors)
580 predecessors = pycompat.maplist(hex, predecessors)
580
581
581 return _hybrid(None, predecessors,
582 return _hybrid(None, predecessors,
582 lambda x: {'ctx': repo[x]},
583 lambda x: {'ctx': repo[x]},
583 lambda x: scmutil.formatchangeid(repo[x]))
584 lambda x: scmutil.formatchangeid(repo[x]))
584
585
585 @templatekeyword('reporoot', requires={'repo'})
586 @templatekeyword('reporoot', requires={'repo'})
586 def showreporoot(context, mapping):
587 def showreporoot(context, mapping):
587 """String. The root directory of the current repository."""
588 """String. The root directory of the current repository."""
588 repo = context.resource(mapping, 'repo')
589 repo = context.resource(mapping, 'repo')
589 return repo.root
590 return repo.root
590
591
591 @templatekeyword('size', requires={'fctx'})
592 @templatekeyword('size', requires={'fctx'})
592 def showsize(context, mapping):
593 def showsize(context, mapping):
593 """Integer. Size of the current file in bytes. (EXPERIMENTAL)"""
594 """Integer. Size of the current file in bytes. (EXPERIMENTAL)"""
594 fctx = context.resource(mapping, 'fctx')
595 fctx = context.resource(mapping, 'fctx')
595 return fctx.size()
596 return fctx.size()
596
597
597 # requires 'fctx' to denote {status} depends on (ctx, path) pair
598 # requires 'fctx' to denote {status} depends on (ctx, path) pair
598 @templatekeyword('status', requires={'ctx', 'fctx', 'revcache'})
599 @templatekeyword('status', requires={'ctx', 'fctx', 'revcache'})
599 def showstatus(context, mapping):
600 def showstatus(context, mapping):
600 """String. Status code of the current file. (EXPERIMENTAL)"""
601 """String. Status code of the current file. (EXPERIMENTAL)"""
601 path = templateutil.runsymbol(context, mapping, 'path')
602 path = templateutil.runsymbol(context, mapping, 'path')
602 path = templateutil.stringify(context, mapping, path)
603 path = templateutil.stringify(context, mapping, path)
603 if not path:
604 if not path:
604 return
605 return
605 statmap = _getfilestatusmap(context, mapping)
606 statmap = _getfilestatusmap(context, mapping)
606 if path not in statmap:
607 if path not in statmap:
607 statmap = _getfilestatusmap(context, mapping, listall=True)
608 statmap = _getfilestatusmap(context, mapping, listall=True)
608 return statmap.get(path)
609 return statmap.get(path)
609
610
610 @templatekeyword("successorssets", requires={'repo', 'ctx'})
611 @templatekeyword("successorssets", requires={'repo', 'ctx'})
611 def showsuccessorssets(context, mapping):
612 def showsuccessorssets(context, mapping):
612 """Returns a string of sets of successors for a changectx. Format used
613 """Returns a string of sets of successors for a changectx. Format used
613 is: [ctx1, ctx2], [ctx3] if ctx has been split into ctx1 and ctx2
614 is: [ctx1, ctx2], [ctx3] if ctx has been split into ctx1 and ctx2
614 while also diverged into ctx3. (EXPERIMENTAL)"""
615 while also diverged into ctx3. (EXPERIMENTAL)"""
615 repo = context.resource(mapping, 'repo')
616 repo = context.resource(mapping, 'repo')
616 ctx = context.resource(mapping, 'ctx')
617 ctx = context.resource(mapping, 'ctx')
617 if not ctx.obsolete():
618 if not ctx.obsolete():
618 return ''
619 return ''
619
620
620 ssets = obsutil.successorssets(repo, ctx.node(), closest=True)
621 ssets = obsutil.successorssets(repo, ctx.node(), closest=True)
621 ssets = [[hex(n) for n in ss] for ss in ssets]
622 ssets = [[hex(n) for n in ss] for ss in ssets]
622
623
623 data = []
624 data = []
624 for ss in ssets:
625 for ss in ssets:
625 h = _hybrid(None, ss, lambda x: {'ctx': repo[x]},
626 h = _hybrid(None, ss, lambda x: {'ctx': repo[x]},
626 lambda x: scmutil.formatchangeid(repo[x]))
627 lambda x: scmutil.formatchangeid(repo[x]))
627 data.append(h)
628 data.append(h)
628
629
629 # Format the successorssets
630 # Format the successorssets
630 def render(d):
631 def render(d):
631 return templateutil.stringify(context, mapping, d)
632 return templateutil.stringify(context, mapping, d)
632
633
633 def gen(data):
634 def gen(data):
634 yield "; ".join(render(d) for d in data)
635 yield "; ".join(render(d) for d in data)
635
636
636 return _hybrid(gen(data), data, lambda x: {'successorset': x},
637 return _hybrid(gen(data), data, lambda x: {'successorset': x},
637 pycompat.identity)
638 pycompat.identity)
638
639
639 @templatekeyword("succsandmarkers", requires={'repo', 'ctx'})
640 @templatekeyword("succsandmarkers", requires={'repo', 'ctx'})
640 def showsuccsandmarkers(context, mapping):
641 def showsuccsandmarkers(context, mapping):
641 """Returns a list of dict for each final successor of ctx. The dict
642 """Returns a list of dict for each final successor of ctx. The dict
642 contains successors node id in "successors" keys and the list of
643 contains successors node id in "successors" keys and the list of
643 obs-markers from ctx to the set of successors in "markers".
644 obs-markers from ctx to the set of successors in "markers".
644 (EXPERIMENTAL)
645 (EXPERIMENTAL)
645 """
646 """
646 repo = context.resource(mapping, 'repo')
647 repo = context.resource(mapping, 'repo')
647 ctx = context.resource(mapping, 'ctx')
648 ctx = context.resource(mapping, 'ctx')
648
649
649 values = obsutil.successorsandmarkers(repo, ctx)
650 values = obsutil.successorsandmarkers(repo, ctx)
650
651
651 if values is None:
652 if values is None:
652 values = []
653 values = []
653
654
654 # Format successors and markers to avoid exposing binary to templates
655 # Format successors and markers to avoid exposing binary to templates
655 data = []
656 data = []
656 for i in values:
657 for i in values:
657 # Format successors
658 # Format successors
658 successors = i['successors']
659 successors = i['successors']
659
660
660 successors = [hex(n) for n in successors]
661 successors = [hex(n) for n in successors]
661 successors = _hybrid(None, successors,
662 successors = _hybrid(None, successors,
662 lambda x: {'ctx': repo[x]},
663 lambda x: {'ctx': repo[x]},
663 lambda x: scmutil.formatchangeid(repo[x]))
664 lambda x: scmutil.formatchangeid(repo[x]))
664
665
665 # Format markers
666 # Format markers
666 finalmarkers = []
667 finalmarkers = []
667 for m in i['markers']:
668 for m in i['markers']:
668 hexprec = hex(m[0])
669 hexprec = hex(m[0])
669 hexsucs = tuple(hex(n) for n in m[1])
670 hexsucs = tuple(hex(n) for n in m[1])
670 hexparents = None
671 hexparents = None
671 if m[5] is not None:
672 if m[5] is not None:
672 hexparents = tuple(hex(n) for n in m[5])
673 hexparents = tuple(hex(n) for n in m[5])
673 newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:]
674 newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:]
674 finalmarkers.append(newmarker)
675 finalmarkers.append(newmarker)
675
676
676 data.append({'successors': successors, 'markers': finalmarkers})
677 data.append({'successors': successors, 'markers': finalmarkers})
677
678
678 return templateutil.mappinglist(data)
679 return templateutil.mappinglist(data)
679
680
680 @templatekeyword('p1', requires={'ctx'})
681 @templatekeyword('p1', requires={'ctx'})
681 def showp1(context, mapping):
682 def showp1(context, mapping):
682 """Changeset. The changeset's first parent. ``{p1.rev}`` for the revision
683 """Changeset. The changeset's first parent. ``{p1.rev}`` for the revision
683 number, and ``{p1.node}`` for the identification hash."""
684 number, and ``{p1.node}`` for the identification hash."""
684 ctx = context.resource(mapping, 'ctx')
685 ctx = context.resource(mapping, 'ctx')
685 return templateutil.mappingdict({'ctx': ctx.p1()}, tmpl=_changeidtmpl)
686 return templateutil.mappingdict({'ctx': ctx.p1()}, tmpl=_changeidtmpl)
686
687
687 @templatekeyword('p2', requires={'ctx'})
688 @templatekeyword('p2', requires={'ctx'})
688 def showp2(context, mapping):
689 def showp2(context, mapping):
689 """Changeset. The changeset's second parent. ``{p2.rev}`` for the revision
690 """Changeset. The changeset's second parent. ``{p2.rev}`` for the revision
690 number, and ``{p2.node}`` for the identification hash."""
691 number, and ``{p2.node}`` for the identification hash."""
691 ctx = context.resource(mapping, 'ctx')
692 ctx = context.resource(mapping, 'ctx')
692 return templateutil.mappingdict({'ctx': ctx.p2()}, tmpl=_changeidtmpl)
693 return templateutil.mappingdict({'ctx': ctx.p2()}, tmpl=_changeidtmpl)
693
694
694 @templatekeyword('p1rev', requires={'ctx'})
695 @templatekeyword('p1rev', requires={'ctx'})
695 def showp1rev(context, mapping):
696 def showp1rev(context, mapping):
696 """Integer. The repository-local revision number of the changeset's
697 """Integer. The repository-local revision number of the changeset's
697 first parent, or -1 if the changeset has no parents. (DEPRECATED)"""
698 first parent, or -1 if the changeset has no parents. (DEPRECATED)"""
698 ctx = context.resource(mapping, 'ctx')
699 ctx = context.resource(mapping, 'ctx')
699 return ctx.p1().rev()
700 return ctx.p1().rev()
700
701
701 @templatekeyword('p2rev', requires={'ctx'})
702 @templatekeyword('p2rev', requires={'ctx'})
702 def showp2rev(context, mapping):
703 def showp2rev(context, mapping):
703 """Integer. The repository-local revision number of the changeset's
704 """Integer. The repository-local revision number of the changeset's
704 second parent, or -1 if the changeset has no second parent. (DEPRECATED)"""
705 second parent, or -1 if the changeset has no second parent. (DEPRECATED)"""
705 ctx = context.resource(mapping, 'ctx')
706 ctx = context.resource(mapping, 'ctx')
706 return ctx.p2().rev()
707 return ctx.p2().rev()
707
708
708 @templatekeyword('p1node', requires={'ctx'})
709 @templatekeyword('p1node', requires={'ctx'})
709 def showp1node(context, mapping):
710 def showp1node(context, mapping):
710 """String. The identification hash of the changeset's first parent,
711 """String. The identification hash of the changeset's first parent,
711 as a 40 digit hexadecimal string. If the changeset has no parents, all
712 as a 40 digit hexadecimal string. If the changeset has no parents, all
712 digits are 0. (DEPRECATED)"""
713 digits are 0. (DEPRECATED)"""
713 ctx = context.resource(mapping, 'ctx')
714 ctx = context.resource(mapping, 'ctx')
714 return ctx.p1().hex()
715 return ctx.p1().hex()
715
716
716 @templatekeyword('p2node', requires={'ctx'})
717 @templatekeyword('p2node', requires={'ctx'})
717 def showp2node(context, mapping):
718 def showp2node(context, mapping):
718 """String. The identification hash of the changeset's second
719 """String. The identification hash of the changeset's second
719 parent, as a 40 digit hexadecimal string. If the changeset has no second
720 parent, as a 40 digit hexadecimal string. If the changeset has no second
720 parent, all digits are 0. (DEPRECATED)"""
721 parent, all digits are 0. (DEPRECATED)"""
721 ctx = context.resource(mapping, 'ctx')
722 ctx = context.resource(mapping, 'ctx')
722 return ctx.p2().hex()
723 return ctx.p2().hex()
723
724
724 @templatekeyword('parents', requires={'repo', 'ctx'})
725 @templatekeyword('parents', requires={'repo', 'ctx'})
725 def showparents(context, mapping):
726 def showparents(context, mapping):
726 """List of strings. The parents of the changeset in "rev:node"
727 """List of strings. The parents of the changeset in "rev:node"
727 format. If the changeset has only one "natural" parent (the predecessor
728 format. If the changeset has only one "natural" parent (the predecessor
728 revision) nothing is shown."""
729 revision) nothing is shown."""
729 repo = context.resource(mapping, 'repo')
730 repo = context.resource(mapping, 'repo')
730 ctx = context.resource(mapping, 'ctx')
731 ctx = context.resource(mapping, 'ctx')
731 pctxs = scmutil.meaningfulparents(repo, ctx)
732 pctxs = scmutil.meaningfulparents(repo, ctx)
732 prevs = [p.rev() for p in pctxs]
733 prevs = [p.rev() for p in pctxs]
733 parents = [[('rev', p.rev()),
734 parents = [[('rev', p.rev()),
734 ('node', p.hex()),
735 ('node', p.hex()),
735 ('phase', p.phasestr())]
736 ('phase', p.phasestr())]
736 for p in pctxs]
737 for p in pctxs]
737 f = _showcompatlist(context, mapping, 'parent', parents)
738 f = _showcompatlist(context, mapping, 'parent', parents)
738 return _hybrid(f, prevs, lambda x: {'ctx': repo[x]},
739 return _hybrid(f, prevs, lambda x: {'ctx': repo[x]},
739 lambda x: scmutil.formatchangeid(repo[x]), keytype=int)
740 lambda x: scmutil.formatchangeid(repo[x]), keytype=int)
740
741
741 @templatekeyword('phase', requires={'ctx'})
742 @templatekeyword('phase', requires={'ctx'})
742 def showphase(context, mapping):
743 def showphase(context, mapping):
743 """String. The changeset phase name."""
744 """String. The changeset phase name."""
744 ctx = context.resource(mapping, 'ctx')
745 ctx = context.resource(mapping, 'ctx')
745 return ctx.phasestr()
746 return ctx.phasestr()
746
747
747 @templatekeyword('phaseidx', requires={'ctx'})
748 @templatekeyword('phaseidx', requires={'ctx'})
748 def showphaseidx(context, mapping):
749 def showphaseidx(context, mapping):
749 """Integer. The changeset phase index. (ADVANCED)"""
750 """Integer. The changeset phase index. (ADVANCED)"""
750 ctx = context.resource(mapping, 'ctx')
751 ctx = context.resource(mapping, 'ctx')
751 return ctx.phase()
752 return ctx.phase()
752
753
753 @templatekeyword('rev', requires={'ctx'})
754 @templatekeyword('rev', requires={'ctx'})
754 def showrev(context, mapping):
755 def showrev(context, mapping):
755 """Integer. The repository-local changeset revision number."""
756 """Integer. The repository-local changeset revision number."""
756 ctx = context.resource(mapping, 'ctx')
757 ctx = context.resource(mapping, 'ctx')
757 return scmutil.intrev(ctx)
758 return scmutil.intrev(ctx)
758
759
759 def showrevslist(context, mapping, name, revs):
760 def showrevslist(context, mapping, name, revs):
760 """helper to generate a list of revisions in which a mapped template will
761 """helper to generate a list of revisions in which a mapped template will
761 be evaluated"""
762 be evaluated"""
762 repo = context.resource(mapping, 'repo')
763 repo = context.resource(mapping, 'repo')
763 # revs may be a smartset; don't compute it until f() has to be evaluated
764 # revs may be a smartset; don't compute it until f() has to be evaluated
764 def f():
765 def f():
765 srevs = ['%d' % r for r in revs]
766 srevs = ['%d' % r for r in revs]
766 return _showcompatlist(context, mapping, name, srevs)
767 return _showcompatlist(context, mapping, name, srevs)
767 return _hybrid(f, revs,
768 return _hybrid(f, revs,
768 lambda x: {name: x, 'ctx': repo[x]},
769 lambda x: {name: x, 'ctx': repo[x]},
769 pycompat.identity, keytype=int)
770 pycompat.identity, keytype=int)
770
771
771 @templatekeyword('subrepos', requires={'ctx'})
772 @templatekeyword('subrepos', requires={'ctx'})
772 def showsubrepos(context, mapping):
773 def showsubrepos(context, mapping):
773 """List of strings. Updated subrepositories in the changeset."""
774 """List of strings. Updated subrepositories in the changeset."""
774 ctx = context.resource(mapping, 'ctx')
775 ctx = context.resource(mapping, 'ctx')
775 substate = ctx.substate
776 substate = ctx.substate
776 if not substate:
777 if not substate:
777 return compatlist(context, mapping, 'subrepo', [])
778 return compatlist(context, mapping, 'subrepo', [])
778 psubstate = ctx.p1().substate or {}
779 psubstate = ctx.p1().substate or {}
779 subrepos = []
780 subrepos = []
780 for sub in substate:
781 for sub in substate:
781 if sub not in psubstate or substate[sub] != psubstate[sub]:
782 if sub not in psubstate or substate[sub] != psubstate[sub]:
782 subrepos.append(sub) # modified or newly added in ctx
783 subrepos.append(sub) # modified or newly added in ctx
783 for sub in psubstate:
784 for sub in psubstate:
784 if sub not in substate:
785 if sub not in substate:
785 subrepos.append(sub) # removed in ctx
786 subrepos.append(sub) # removed in ctx
786 return compatlist(context, mapping, 'subrepo', sorted(subrepos))
787 return compatlist(context, mapping, 'subrepo', sorted(subrepos))
787
788
788 # don't remove "showtags" definition, even though namespaces will put
789 # don't remove "showtags" definition, even though namespaces will put
789 # a helper function for "tags" keyword into "keywords" map automatically,
790 # a helper function for "tags" keyword into "keywords" map automatically,
790 # because online help text is built without namespaces initialization
791 # because online help text is built without namespaces initialization
791 @templatekeyword('tags', requires={'repo', 'ctx'})
792 @templatekeyword('tags', requires={'repo', 'ctx'})
792 def showtags(context, mapping):
793 def showtags(context, mapping):
793 """List of strings. Any tags associated with the changeset."""
794 """List of strings. Any tags associated with the changeset."""
794 return shownames(context, mapping, 'tags')
795 return shownames(context, mapping, 'tags')
795
796
796 @templatekeyword('termwidth', requires={'ui'})
797 @templatekeyword('termwidth', requires={'ui'})
797 def showtermwidth(context, mapping):
798 def showtermwidth(context, mapping):
798 """Integer. The width of the current terminal."""
799 """Integer. The width of the current terminal."""
799 ui = context.resource(mapping, 'ui')
800 ui = context.resource(mapping, 'ui')
800 return ui.termwidth()
801 return ui.termwidth()
801
802
802 @templatekeyword('user', requires={'ctx'})
803 @templatekeyword('user', requires={'ctx'})
803 def showuser(context, mapping):
804 def showuser(context, mapping):
804 """String. The unmodified author of the changeset."""
805 """String. The unmodified author of the changeset."""
805 ctx = context.resource(mapping, 'ctx')
806 ctx = context.resource(mapping, 'ctx')
806 return ctx.user()
807 return ctx.user()
807
808
808 @templatekeyword('instabilities', requires={'ctx'})
809 @templatekeyword('instabilities', requires={'ctx'})
809 def showinstabilities(context, mapping):
810 def showinstabilities(context, mapping):
810 """List of strings. Evolution instabilities affecting the changeset.
811 """List of strings. Evolution instabilities affecting the changeset.
811 (EXPERIMENTAL)
812 (EXPERIMENTAL)
812 """
813 """
813 ctx = context.resource(mapping, 'ctx')
814 ctx = context.resource(mapping, 'ctx')
814 return compatlist(context, mapping, 'instability', ctx.instabilities(),
815 return compatlist(context, mapping, 'instability', ctx.instabilities(),
815 plural='instabilities')
816 plural='instabilities')
816
817
817 @templatekeyword('verbosity', requires={'ui'})
818 @templatekeyword('verbosity', requires={'ui'})
818 def showverbosity(context, mapping):
819 def showverbosity(context, mapping):
819 """String. The current output verbosity in 'debug', 'quiet', 'verbose',
820 """String. The current output verbosity in 'debug', 'quiet', 'verbose',
820 or ''."""
821 or ''."""
821 ui = context.resource(mapping, 'ui')
822 ui = context.resource(mapping, 'ui')
822 # see logcmdutil.changesettemplater for priority of these flags
823 # see logcmdutil.changesettemplater for priority of these flags
823 if ui.debugflag:
824 if ui.debugflag:
824 return 'debug'
825 return 'debug'
825 elif ui.quiet:
826 elif ui.quiet:
826 return 'quiet'
827 return 'quiet'
827 elif ui.verbose:
828 elif ui.verbose:
828 return 'verbose'
829 return 'verbose'
829 return ''
830 return ''
830
831
831 @templatekeyword('whyunstable', requires={'repo', 'ctx'})
832 @templatekeyword('whyunstable', requires={'repo', 'ctx'})
832 def showwhyunstable(context, mapping):
833 def showwhyunstable(context, mapping):
833 """List of dicts explaining all instabilities of a changeset.
834 """List of dicts explaining all instabilities of a changeset.
834 (EXPERIMENTAL)
835 (EXPERIMENTAL)
835 """
836 """
836 repo = context.resource(mapping, 'repo')
837 repo = context.resource(mapping, 'repo')
837 ctx = context.resource(mapping, 'ctx')
838 ctx = context.resource(mapping, 'ctx')
838
839
839 def formatnode(ctx):
840 def formatnode(ctx):
840 return '%s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr())
841 return '%s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr())
841
842
842 entries = obsutil.whyunstable(repo, ctx)
843 entries = obsutil.whyunstable(repo, ctx)
843
844
844 for entry in entries:
845 for entry in entries:
845 if entry.get('divergentnodes'):
846 if entry.get('divergentnodes'):
846 dnodes = entry['divergentnodes']
847 dnodes = entry['divergentnodes']
847 dnhybrid = _hybrid(None, [dnode.hex() for dnode in dnodes],
848 dnhybrid = _hybrid(None, [dnode.hex() for dnode in dnodes],
848 lambda x: {'ctx': repo[x]},
849 lambda x: {'ctx': repo[x]},
849 lambda x: formatnode(repo[x]))
850 lambda x: formatnode(repo[x]))
850 entry['divergentnodes'] = dnhybrid
851 entry['divergentnodes'] = dnhybrid
851
852
852 tmpl = ('{instability}:{if(divergentnodes, " ")}{divergentnodes} '
853 tmpl = ('{instability}:{if(divergentnodes, " ")}{divergentnodes} '
853 '{reason} {node|short}')
854 '{reason} {node|short}')
854 return templateutil.mappinglist(entries, tmpl=tmpl, sep='\n')
855 return templateutil.mappinglist(entries, tmpl=tmpl, sep='\n')
855
856
856 def loadkeyword(ui, extname, registrarobj):
857 def loadkeyword(ui, extname, registrarobj):
857 """Load template keyword from specified registrarobj
858 """Load template keyword from specified registrarobj
858 """
859 """
859 for name, func in registrarobj._table.iteritems():
860 for name, func in registrarobj._table.iteritems():
860 keywords[name] = func
861 keywords[name] = func
861
862
862 # tell hggettext to extract docstrings from these functions:
863 # tell hggettext to extract docstrings from these functions:
863 i18nfunctions = keywords.values()
864 i18nfunctions = keywords.values()
@@ -1,42 +1,56 b''
1 == New Features ==
1 == New Features ==
2
2
3 * New config `commands.commit.post-status` shows status after successful
3 * New config `commands.commit.post-status` shows status after successful
4 commit.
4 commit.
5
5
6
6
7 == New Experimental Features ==
7 == New Experimental Features ==
8
8
9 * New config `experimental.log.topo` makes `hg log -G` use
9 * New config `experimental.log.topo` makes `hg log -G` use
10 topological sorting. This is especially useful for aliases since it
10 topological sorting. This is especially useful for aliases since it
11 lets the alias accept an `-r` option while still using topological
11 lets the alias accept an `-r` option while still using topological
12 sorting with or without the `-r` (unlike if you use the `sort(...,
12 sorting with or without the `-r` (unlike if you use the `sort(...,
13 topo)` revset).
13 topo)` revset).
14
14
15
15
16 == Bug Fixes ==
16 == Bug Fixes ==
17
17
18 * issue4292: "hg log and {files} {file_adds} {file_mods} {file_dels}
19 in template show wrong files on merged revision". See details in
20 "Backwards Compatibility Changes".
21
18
22
19 == Backwards Compatibility Changes ==
23 == Backwards Compatibility Changes ==
20
24
21 * Removed (experimental) support for log graph lines mixing
25 * Removed (experimental) support for log graph lines mixing
22 parent/grandparent styles. Setting
26 parent/grandparent styles. Setting
23 e.g. `experimental.graphstyle.parent = !` and
27 e.g. `experimental.graphstyle.parent = !` and
24 `experimental.graphstyle.grandparent = 3.` would use `!` for the
28 `experimental.graphstyle.grandparent = 3.` would use `!` for the
25 first three lines of the graph and then `.`. This is no longer
29 first three lines of the graph and then `.`. This is no longer
26 supported.
30 supported.
27
31
28 * If `ui.origbackuppath` had been (incorrectly) configured to point
32 * If `ui.origbackuppath` had been (incorrectly) configured to point
29 to a file, we will now replace that file by a directory and put
33 to a file, we will now replace that file by a directory and put
30 backups in that directory. This is similar to how we would
34 backups in that directory. This is similar to how we would
31 previously replace files *in* the configured directory by
35 previously replace files *in* the configured directory by
32 subdirectories.
36 subdirectories.
33
37
38 * Template keyword `{file_mods}`, `{file_adds}`, and `{file_dels}`
39 have changed behavior on merge commits. They used to be relative to
40 the first parent, but they now consider both parents. `{file_adds}`
41 shows files that exists in the commit but did not exist in either
42 parent. `{file_dels}` shows files that do not exist in the commit
43 but existed in either parent. `{file_mods}` show the remaining
44 files from `{files}` that were not in the other two
45 sets.
46
47
34 == Internal API Changes ==
48 == Internal API Changes ==
35
49
36 * Matchers are no longer iterable. Use `match.files()` instead.
50 * Matchers are no longer iterable. Use `match.files()` instead.
37
51
38 * `match.visitdir()` and `match.visitchildrenset()` now expect the
52 * `match.visitdir()` and `match.visitchildrenset()` now expect the
39 empty string instead of '.' to indicate the root directory.
53 empty string instead of '.' to indicate the root directory.
40
54
41 * `util.dirs()` and `util.finddirs()` now include an entry for the
55 * `util.dirs()` and `util.finddirs()` now include an entry for the
42 root directory (empty string).
56 root directory (empty string).
@@ -1,225 +1,225 b''
1 #require bzr
1 #require bzr
2
2
3 N.B. bzr 1.13 has a bug that breaks this test. If you see this
3 N.B. bzr 1.13 has a bug that breaks this test. If you see this
4 test fail, check your bzr version. Upgrading to bzr 1.13.1
4 test fail, check your bzr version. Upgrading to bzr 1.13.1
5 should fix it.
5 should fix it.
6
6
7 $ . "$TESTDIR/bzr-definitions"
7 $ . "$TESTDIR/bzr-definitions"
8
8
9 test multiple merges at once
9 test multiple merges at once
10
10
11 $ mkdir test-multimerge
11 $ mkdir test-multimerge
12 $ cd test-multimerge
12 $ cd test-multimerge
13 $ bzr init -q source
13 $ bzr init -q source
14 $ cd source
14 $ cd source
15 $ echo content > file
15 $ echo content > file
16 $ echo text > rename_me
16 $ echo text > rename_me
17 $ bzr add -q file rename_me
17 $ bzr add -q file rename_me
18 $ bzr commit -q -m 'Initial add' '--commit-time=2009-10-10 08:00:00 +0100'
18 $ bzr commit -q -m 'Initial add' '--commit-time=2009-10-10 08:00:00 +0100'
19 $ cd ..
19 $ cd ..
20 $ bzr branch -q source source-branch1
20 $ bzr branch -q source source-branch1
21 $ cd source-branch1
21 $ cd source-branch1
22 $ echo morecontent >> file
22 $ echo morecontent >> file
23 $ echo evenmorecontent > file-branch1
23 $ echo evenmorecontent > file-branch1
24 $ bzr add -q file-branch1
24 $ bzr add -q file-branch1
25 $ bzr commit -q -m 'Added branch1 file' '--commit-time=2009-10-10 08:00:01 +0100'
25 $ bzr commit -q -m 'Added branch1 file' '--commit-time=2009-10-10 08:00:01 +0100'
26 $ cd ../source
26 $ cd ../source
27 $ sleep 1
27 $ sleep 1
28 $ echo content > file-parent
28 $ echo content > file-parent
29 $ bzr add -q file-parent
29 $ bzr add -q file-parent
30 $ bzr commit -q -m 'Added parent file' '--commit-time=2009-10-10 08:00:02 +0100'
30 $ bzr commit -q -m 'Added parent file' '--commit-time=2009-10-10 08:00:02 +0100'
31 $ cd ..
31 $ cd ..
32 $ bzr branch -q source source-branch2
32 $ bzr branch -q source source-branch2
33 $ cd source-branch2
33 $ cd source-branch2
34 $ echo somecontent > file-branch2
34 $ echo somecontent > file-branch2
35 $ bzr add -q file-branch2
35 $ bzr add -q file-branch2
36 $ bzr mv -q rename_me renamed
36 $ bzr mv -q rename_me renamed
37 $ echo change > renamed
37 $ echo change > renamed
38 $ bzr commit -q -m 'Added brach2 file' '--commit-time=2009-10-10 08:00:03 +0100'
38 $ bzr commit -q -m 'Added brach2 file' '--commit-time=2009-10-10 08:00:03 +0100'
39 $ sleep 1
39 $ sleep 1
40 $ cd ../source
40 $ cd ../source
41 $ bzr merge -q ../source-branch1
41 $ bzr merge -q ../source-branch1
42 $ bzr merge -q --force ../source-branch2
42 $ bzr merge -q --force ../source-branch2
43 $ bzr commit -q -m 'Merged branches' '--commit-time=2009-10-10 08:00:04 +0100'
43 $ bzr commit -q -m 'Merged branches' '--commit-time=2009-10-10 08:00:04 +0100'
44 $ cd ..
44 $ cd ..
45
45
46 BUG: file-branch2 should not be added in rev 4, and the rename_me -> renamed
46 BUG: file-branch2 should not be added in rev 4, and the rename_me -> renamed
47 move should be recorded in the fixup merge.
47 move should be recorded in the fixup merge.
48 $ hg convert --datesort --config convert.bzr.saverev=False source source-hg
48 $ hg convert --datesort --config convert.bzr.saverev=False source source-hg
49 initializing destination source-hg repository
49 initializing destination source-hg repository
50 scanning source...
50 scanning source...
51 sorting...
51 sorting...
52 converting...
52 converting...
53 4 Initial add
53 4 Initial add
54 3 Added branch1 file
54 3 Added branch1 file
55 2 Added parent file
55 2 Added parent file
56 1 Added brach2 file
56 1 Added brach2 file
57 0 Merged branches
57 0 Merged branches
58 warning: can't find ancestor for 'renamed' copied from 'rename_me'!
58 warning: can't find ancestor for 'renamed' copied from 'rename_me'!
59 $ glog -R source-hg
59 $ glog -R source-hg
60 o 5@source "(octopus merge fixup)" files+: [], files-: [], files: [renamed]
60 o 5@source "(octopus merge fixup)" files+: [], files-: [], files: [renamed]
61 |\
61 |\
62 | o 4@source "Merged branches" files+: [file-branch1 file-branch2 renamed], files-: [rename_me], files: [file]
62 | o 4@source "Merged branches" files+: [file-branch2 renamed], files-: [rename_me], files: []
63 | |\
63 | |\
64 o---+ 3@source-branch2 "Added brach2 file" files+: [file-branch2 renamed], files-: [rename_me], files: []
64 o---+ 3@source-branch2 "Added brach2 file" files+: [file-branch2 renamed], files-: [rename_me], files: []
65 / /
65 / /
66 | o 2@source "Added parent file" files+: [file-parent], files-: [], files: []
66 | o 2@source "Added parent file" files+: [file-parent], files-: [], files: []
67 | |
67 | |
68 o | 1@source-branch1 "Added branch1 file" files+: [file-branch1], files-: [], files: [file]
68 o | 1@source-branch1 "Added branch1 file" files+: [file-branch1], files-: [], files: [file]
69 |/
69 |/
70 o 0@source "Initial add" files+: [file rename_me], files-: [], files: []
70 o 0@source "Initial add" files+: [file rename_me], files-: [], files: []
71
71
72 $ manifest source-hg tip
72 $ manifest source-hg tip
73 % manifest of tip
73 % manifest of tip
74 644 file
74 644 file
75 644 file-branch1
75 644 file-branch1
76 644 file-branch2
76 644 file-branch2
77 644 file-parent
77 644 file-parent
78 644 renamed
78 644 renamed
79
79
80 $ hg convert source-hg hg2hg
80 $ hg convert source-hg hg2hg
81 initializing destination hg2hg repository
81 initializing destination hg2hg repository
82 scanning source...
82 scanning source...
83 sorting...
83 sorting...
84 converting...
84 converting...
85 5 Initial add
85 5 Initial add
86 4 Added branch1 file
86 4 Added branch1 file
87 3 Added parent file
87 3 Added parent file
88 2 Added brach2 file
88 2 Added brach2 file
89 1 Merged branches
89 1 Merged branches
90 0 (octopus merge fixup)
90 0 (octopus merge fixup)
91
91
92 BUG: The manifest entries should be the same for matching revisions, and
92 BUG: The manifest entries should be the same for matching revisions, and
93 nothing should be outgoing
93 nothing should be outgoing
94
94
95 $ hg -R source-hg manifest --debug -r tip | grep renamed
95 $ hg -R source-hg manifest --debug -r tip | grep renamed
96 67109fdebf6c556eb0a9d5696dd98c8420520405 644 renamed
96 67109fdebf6c556eb0a9d5696dd98c8420520405 644 renamed
97 $ hg -R hg2hg manifest --debug -r tip | grep renamed
97 $ hg -R hg2hg manifest --debug -r tip | grep renamed
98 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
98 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
99 $ hg -R source-hg manifest --debug -r 'tip^' | grep renamed
99 $ hg -R source-hg manifest --debug -r 'tip^' | grep renamed
100 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
100 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
101 $ hg -R hg2hg manifest --debug -r 'tip^' | grep renamed
101 $ hg -R hg2hg manifest --debug -r 'tip^' | grep renamed
102 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
102 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
103
103
104 BUG: The revisions found should be the same in both repos
104 BUG: The revisions found should be the same in both repos
105
105
106 $ hg --cwd source-hg log -r 'file("renamed")' -G -Tcompact
106 $ hg --cwd source-hg log -r 'file("renamed")' -G -Tcompact
107 o 5[tip]:4,3 6652429c300a 2009-10-10 08:00 +0100 foo
107 o 5[tip]:4,3 6652429c300a 2009-10-10 08:00 +0100 foo
108 |\ (octopus merge fixup)
108 |\ (octopus merge fixup)
109 | |
109 | |
110 | o 4:2,1 e0ae8af3503a 2009-10-10 08:00 +0100 foo
110 | o 4:2,1 e0ae8af3503a 2009-10-10 08:00 +0100 foo
111 | |\ Merged branches
111 | |\ Merged branches
112 | ~ ~
112 | ~ ~
113 o 3 138bed2e14be 2009-10-10 08:00 +0100 foo
113 o 3 138bed2e14be 2009-10-10 08:00 +0100 foo
114 | Added brach2 file
114 | Added brach2 file
115 ~
115 ~
116 $ hg --cwd hg2hg log -r 'file("renamed")' -G -Tcompact
116 $ hg --cwd hg2hg log -r 'file("renamed")' -G -Tcompact
117 o 4:2,1 e0ae8af3503a 2009-10-10 08:00 +0100 foo
117 o 4:2,1 e0ae8af3503a 2009-10-10 08:00 +0100 foo
118 |\ Merged branches
118 |\ Merged branches
119 ~ ~
119 ~ ~
120 o 3 138bed2e14be 2009-10-10 08:00 +0100 foo
120 o 3 138bed2e14be 2009-10-10 08:00 +0100 foo
121 | Added brach2 file
121 | Added brach2 file
122 ~
122 ~
123
123
124 BUG(?): The move seems to be recorded in rev 4, so it should probably show up
124 BUG(?): The move seems to be recorded in rev 4, so it should probably show up
125 there. It's not recorded as a move in rev 5, even in source-hg.
125 there. It's not recorded as a move in rev 5, even in source-hg.
126
126
127 $ hg -R source-hg up -q tip
127 $ hg -R source-hg up -q tip
128 $ hg -R hg2hg up -q tip
128 $ hg -R hg2hg up -q tip
129 $ hg --cwd source-hg log -r 'follow("renamed")' -G -Tcompact
129 $ hg --cwd source-hg log -r 'follow("renamed")' -G -Tcompact
130 @ 5[tip]:4,3 6652429c300a 2009-10-10 08:00 +0100 foo
130 @ 5[tip]:4,3 6652429c300a 2009-10-10 08:00 +0100 foo
131 |\ (octopus merge fixup)
131 |\ (octopus merge fixup)
132 | :
132 | :
133 o : 3 138bed2e14be 2009-10-10 08:00 +0100 foo
133 o : 3 138bed2e14be 2009-10-10 08:00 +0100 foo
134 :/ Added brach2 file
134 :/ Added brach2 file
135 :
135 :
136 o 0 18b86f5df51b 2009-10-10 08:00 +0100 foo
136 o 0 18b86f5df51b 2009-10-10 08:00 +0100 foo
137 Initial add
137 Initial add
138
138
139 $ hg --cwd hg2hg log -r 'follow("renamed")' -G -Tcompact
139 $ hg --cwd hg2hg log -r 'follow("renamed")' -G -Tcompact
140 o 3 138bed2e14be 2009-10-10 08:00 +0100 foo
140 o 3 138bed2e14be 2009-10-10 08:00 +0100 foo
141 : Added brach2 file
141 : Added brach2 file
142 :
142 :
143 o 0 18b86f5df51b 2009-10-10 08:00 +0100 foo
143 o 0 18b86f5df51b 2009-10-10 08:00 +0100 foo
144 Initial add
144 Initial add
145
145
146
146
147 $ hg -R hg2hg out source-hg -T compact
147 $ hg -R hg2hg out source-hg -T compact
148 comparing with source-hg
148 comparing with source-hg
149 searching for changes
149 searching for changes
150 5[tip]:4,3 3be2299ccd31 2009-10-10 08:00 +0100 foo
150 5[tip]:4,3 3be2299ccd31 2009-10-10 08:00 +0100 foo
151 (octopus merge fixup)
151 (octopus merge fixup)
152
152
153
153
154 $ glog -R hg2hg
154 $ glog -R hg2hg
155 @ 5@source "(octopus merge fixup)" files+: [], files-: [], files: []
155 @ 5@source "(octopus merge fixup)" files+: [], files-: [], files: []
156 |\
156 |\
157 | o 4@source "Merged branches" files+: [file-branch1 file-branch2 renamed], files-: [rename_me], files: [file]
157 | o 4@source "Merged branches" files+: [file-branch2 renamed], files-: [rename_me], files: []
158 | |\
158 | |\
159 o---+ 3@source-branch2 "Added brach2 file" files+: [file-branch2 renamed], files-: [rename_me], files: []
159 o---+ 3@source-branch2 "Added brach2 file" files+: [file-branch2 renamed], files-: [rename_me], files: []
160 / /
160 / /
161 | o 2@source "Added parent file" files+: [file-parent], files-: [], files: []
161 | o 2@source "Added parent file" files+: [file-parent], files-: [], files: []
162 | |
162 | |
163 o | 1@source-branch1 "Added branch1 file" files+: [file-branch1], files-: [], files: [file]
163 o | 1@source-branch1 "Added branch1 file" files+: [file-branch1], files-: [], files: [file]
164 |/
164 |/
165 o 0@source "Initial add" files+: [file rename_me], files-: [], files: []
165 o 0@source "Initial add" files+: [file rename_me], files-: [], files: []
166
166
167
167
168 $ hg -R source-hg log --debug -r tip
168 $ hg -R source-hg log --debug -r tip
169 changeset: 5:6652429c300ab66fdeaf2e730945676a00b53231
169 changeset: 5:6652429c300ab66fdeaf2e730945676a00b53231
170 branch: source
170 branch: source
171 tag: tip
171 tag: tip
172 phase: draft
172 phase: draft
173 parent: 4:e0ae8af3503af9bbffb0b29268a02744cc61a561
173 parent: 4:e0ae8af3503af9bbffb0b29268a02744cc61a561
174 parent: 3:138bed2e14be415a2692b02e41405b2864f758b4
174 parent: 3:138bed2e14be415a2692b02e41405b2864f758b4
175 manifest: 5:1eabd5f5d4b985784cf2c45c717ff053eca14b0d
175 manifest: 5:1eabd5f5d4b985784cf2c45c717ff053eca14b0d
176 user: Foo Bar <foo.bar@example.com>
176 user: Foo Bar <foo.bar@example.com>
177 date: Sat Oct 10 08:00:04 2009 +0100
177 date: Sat Oct 10 08:00:04 2009 +0100
178 files: renamed
178 files: renamed
179 extra: branch=source
179 extra: branch=source
180 description:
180 description:
181 (octopus merge fixup)
181 (octopus merge fixup)
182
182
183
183
184 $ hg -R hg2hg log --debug -r tip
184 $ hg -R hg2hg log --debug -r tip
185 changeset: 5:3be2299ccd315ff9aab2b49bdb0d14e3244435e8
185 changeset: 5:3be2299ccd315ff9aab2b49bdb0d14e3244435e8
186 branch: source
186 branch: source
187 tag: tip
187 tag: tip
188 phase: draft
188 phase: draft
189 parent: 4:e0ae8af3503af9bbffb0b29268a02744cc61a561
189 parent: 4:e0ae8af3503af9bbffb0b29268a02744cc61a561
190 parent: 3:138bed2e14be415a2692b02e41405b2864f758b4
190 parent: 3:138bed2e14be415a2692b02e41405b2864f758b4
191 manifest: 4:3ece3c7f2cc6df15b3cbbf3273c69869fc7c3ab0
191 manifest: 4:3ece3c7f2cc6df15b3cbbf3273c69869fc7c3ab0
192 user: Foo Bar <foo.bar@example.com>
192 user: Foo Bar <foo.bar@example.com>
193 date: Sat Oct 10 08:00:04 2009 +0100
193 date: Sat Oct 10 08:00:04 2009 +0100
194 extra: branch=source
194 extra: branch=source
195 description:
195 description:
196 (octopus merge fixup)
196 (octopus merge fixup)
197
197
198
198
199 $ hg -R source-hg manifest --debug -r tip
199 $ hg -R source-hg manifest --debug -r tip
200 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
200 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
201 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
201 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
202 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
202 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
203 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
203 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
204 67109fdebf6c556eb0a9d5696dd98c8420520405 644 renamed
204 67109fdebf6c556eb0a9d5696dd98c8420520405 644 renamed
205 $ hg -R source-hg manifest --debug -r 'tip^'
205 $ hg -R source-hg manifest --debug -r 'tip^'
206 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
206 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
207 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
207 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
208 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
208 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
209 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
209 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
210 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
210 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
211
211
212 $ hg -R hg2hg manifest --debug -r tip
212 $ hg -R hg2hg manifest --debug -r tip
213 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
213 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
214 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
214 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
215 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
215 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
216 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
216 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
217 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
217 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
218 $ hg -R hg2hg manifest --debug -r 'tip^'
218 $ hg -R hg2hg manifest --debug -r 'tip^'
219 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
219 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
220 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
220 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
221 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
221 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
222 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
222 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
223 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
223 27c968376d7c3afd095ecb9c7697919b933448c8 644 renamed
224
224
225 $ cd ..
225 $ cd ..
@@ -1,288 +1,288 b''
1 #require bzr
1 #require bzr
2
2
3 $ . "$TESTDIR/bzr-definitions"
3 $ . "$TESTDIR/bzr-definitions"
4
4
5 create and rename on the same file in the same step
5 create and rename on the same file in the same step
6
6
7 $ mkdir test-createandrename
7 $ mkdir test-createandrename
8 $ cd test-createandrename
8 $ cd test-createandrename
9 $ bzr init -q source
9 $ bzr init -q source
10
10
11 test empty repo conversion (issue3233)
11 test empty repo conversion (issue3233)
12
12
13 $ hg convert source source-hg
13 $ hg convert source source-hg
14 initializing destination source-hg repository
14 initializing destination source-hg repository
15 scanning source...
15 scanning source...
16 sorting...
16 sorting...
17 converting...
17 converting...
18
18
19 back to the rename stuff
19 back to the rename stuff
20
20
21 $ cd source
21 $ cd source
22 $ echo a > a
22 $ echo a > a
23 $ echo c > c
23 $ echo c > c
24 $ echo e > e
24 $ echo e > e
25 $ bzr add -q a c e
25 $ bzr add -q a c e
26 $ bzr commit -q -m 'Initial add: a, c, e'
26 $ bzr commit -q -m 'Initial add: a, c, e'
27 $ bzr mv a b
27 $ bzr mv a b
28 a => b
28 a => b
29 $ bzr mv c d
29 $ bzr mv c d
30 c => d
30 c => d
31 $ bzr mv e f
31 $ bzr mv e f
32 e => f
32 e => f
33 $ echo a2 >> a
33 $ echo a2 >> a
34 $ mkdir e
34 $ mkdir e
35 $ bzr add -q a e
35 $ bzr add -q a e
36 $ bzr commit -q -m 'rename a into b, create a, rename c into d'
36 $ bzr commit -q -m 'rename a into b, create a, rename c into d'
37 $ cd ..
37 $ cd ..
38 $ hg convert source source-hg
38 $ hg convert source source-hg
39 scanning source...
39 scanning source...
40 sorting...
40 sorting...
41 converting...
41 converting...
42 1 Initial add: a, c, e
42 1 Initial add: a, c, e
43 0 rename a into b, create a, rename c into d
43 0 rename a into b, create a, rename c into d
44 $ glog -R source-hg
44 $ glog -R source-hg
45 o 1@source "rename a into b, create a, rename c into d" files+: [b d f], files-: [c e], files: [a]
45 o 1@source "rename a into b, create a, rename c into d" files+: [b d f], files-: [c e], files: [a]
46 |
46 |
47 o 0@source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
47 o 0@source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
48
48
49
49
50 manifest
50 manifest
51
51
52 $ hg manifest -R source-hg -r tip
52 $ hg manifest -R source-hg -r tip
53 a
53 a
54 b
54 b
55 d
55 d
56 f
56 f
57
57
58 test --rev option
58 test --rev option
59
59
60 $ hg convert -r 1 source source-1-hg
60 $ hg convert -r 1 source source-1-hg
61 initializing destination source-1-hg repository
61 initializing destination source-1-hg repository
62 scanning source...
62 scanning source...
63 sorting...
63 sorting...
64 converting...
64 converting...
65 0 Initial add: a, c, e
65 0 Initial add: a, c, e
66 $ glog -R source-1-hg
66 $ glog -R source-1-hg
67 o 0@source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
67 o 0@source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
68
68
69
69
70 test with filemap
70 test with filemap
71
71
72 $ cat > filemap <<EOF
72 $ cat > filemap <<EOF
73 > exclude a
73 > exclude a
74 > EOF
74 > EOF
75 $ hg convert --filemap filemap source source-filemap-hg
75 $ hg convert --filemap filemap source source-filemap-hg
76 initializing destination source-filemap-hg repository
76 initializing destination source-filemap-hg repository
77 scanning source...
77 scanning source...
78 sorting...
78 sorting...
79 converting...
79 converting...
80 1 Initial add: a, c, e
80 1 Initial add: a, c, e
81 0 rename a into b, create a, rename c into d
81 0 rename a into b, create a, rename c into d
82 $ hg -R source-filemap-hg manifest -r tip
82 $ hg -R source-filemap-hg manifest -r tip
83 b
83 b
84 d
84 d
85 f
85 f
86
86
87 convert from lightweight checkout
87 convert from lightweight checkout
88
88
89 $ bzr checkout --lightweight source source-light
89 $ bzr checkout --lightweight source source-light
90 $ hg convert -s bzr source-light source-light-hg
90 $ hg convert -s bzr source-light source-light-hg
91 initializing destination source-light-hg repository
91 initializing destination source-light-hg repository
92 warning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
92 warning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
93 $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository
93 $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository
94 abort: source-light: missing or unsupported repository
94 abort: source-light: missing or unsupported repository
95 [255]
95 [255]
96
96
97 extract timestamps that look just like hg's {date|isodate}:
97 extract timestamps that look just like hg's {date|isodate}:
98 yyyy-mm-dd HH:MM zzzz (no seconds!)
98 yyyy-mm-dd HH:MM zzzz (no seconds!)
99 compare timestamps
99 compare timestamps
100
100
101 $ cd source
101 $ cd source
102 $ bzr log | \
102 $ bzr log | \
103 > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \
103 > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \
104 > > ../bzr-timestamps
104 > > ../bzr-timestamps
105 $ cd ..
105 $ cd ..
106 $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
106 $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
107 $ cmp bzr-timestamps hg-timestamps || diff -u bzr-timestamps hg-timestamps
107 $ cmp bzr-timestamps hg-timestamps || diff -u bzr-timestamps hg-timestamps
108 $ cd ..
108 $ cd ..
109
109
110 merge
110 merge
111
111
112 $ mkdir test-merge
112 $ mkdir test-merge
113 $ cd test-merge
113 $ cd test-merge
114 $ cat > helper.py <<EOF
114 $ cat > helper.py <<EOF
115 > import sys
115 > import sys
116 > from bzrlib import workingtree
116 > from bzrlib import workingtree
117 > wt = workingtree.WorkingTree.open('.')
117 > wt = workingtree.WorkingTree.open('.')
118 >
118 >
119 > message, stamp = sys.argv[1:]
119 > message, stamp = sys.argv[1:]
120 > wt.commit(message, timestamp=int(stamp))
120 > wt.commit(message, timestamp=int(stamp))
121 > EOF
121 > EOF
122 $ bzr init -q source
122 $ bzr init -q source
123 $ cd source
123 $ cd source
124 $ echo content > a
124 $ echo content > a
125 $ echo content2 > b
125 $ echo content2 > b
126 $ bzr add -q a b
126 $ bzr add -q a b
127 $ bzr commit -q -m 'Initial add'
127 $ bzr commit -q -m 'Initial add'
128 $ cd ..
128 $ cd ..
129 $ bzr branch -q source source-improve
129 $ bzr branch -q source source-improve
130 $ cd source
130 $ cd source
131 $ echo more >> a
131 $ echo more >> a
132 $ "$PYTHON" ../helper.py 'Editing a' 100
132 $ "$PYTHON" ../helper.py 'Editing a' 100
133 $ cd ../source-improve
133 $ cd ../source-improve
134 $ echo content3 >> b
134 $ echo content3 >> b
135 $ "$PYTHON" ../helper.py 'Editing b' 200
135 $ "$PYTHON" ../helper.py 'Editing b' 200
136 $ cd ../source
136 $ cd ../source
137 $ bzr merge -q ../source-improve
137 $ bzr merge -q ../source-improve
138 $ bzr commit -q -m 'Merged improve branch'
138 $ bzr commit -q -m 'Merged improve branch'
139 $ cd ..
139 $ cd ..
140 $ hg convert --datesort source source-hg
140 $ hg convert --datesort source source-hg
141 initializing destination source-hg repository
141 initializing destination source-hg repository
142 scanning source...
142 scanning source...
143 sorting...
143 sorting...
144 converting...
144 converting...
145 3 Initial add
145 3 Initial add
146 2 Editing a
146 2 Editing a
147 1 Editing b
147 1 Editing b
148 0 Merged improve branch
148 0 Merged improve branch
149 $ glog -R source-hg
149 $ glog -R source-hg
150 o 3@source "Merged improve branch" files+: [], files-: [], files: [b]
150 o 3@source "Merged improve branch" files+: [], files-: [], files: []
151 |\
151 |\
152 | o 2@source-improve "Editing b" files+: [], files-: [], files: [b]
152 | o 2@source-improve "Editing b" files+: [], files-: [], files: [b]
153 | |
153 | |
154 o | 1@source "Editing a" files+: [], files-: [], files: [a]
154 o | 1@source "Editing a" files+: [], files-: [], files: [a]
155 |/
155 |/
156 o 0@source "Initial add" files+: [a b], files-: [], files: []
156 o 0@source "Initial add" files+: [a b], files-: [], files: []
157
157
158 $ cd ..
158 $ cd ..
159
159
160 #if symlink execbit
160 #if symlink execbit
161
161
162 symlinks and executable files
162 symlinks and executable files
163
163
164 $ mkdir test-symlinks
164 $ mkdir test-symlinks
165 $ cd test-symlinks
165 $ cd test-symlinks
166 $ bzr init -q source
166 $ bzr init -q source
167 $ cd source
167 $ cd source
168 $ touch program
168 $ touch program
169 $ chmod +x program
169 $ chmod +x program
170 $ ln -s program altname
170 $ ln -s program altname
171 $ mkdir d
171 $ mkdir d
172 $ echo a > d/a
172 $ echo a > d/a
173 $ ln -s a syma
173 $ ln -s a syma
174 $ bzr add -q altname program syma d/a
174 $ bzr add -q altname program syma d/a
175 $ bzr commit -q -m 'Initial setup'
175 $ bzr commit -q -m 'Initial setup'
176 $ touch newprog
176 $ touch newprog
177 $ chmod +x newprog
177 $ chmod +x newprog
178 $ rm altname
178 $ rm altname
179 $ ln -s newprog altname
179 $ ln -s newprog altname
180 $ chmod -x program
180 $ chmod -x program
181 $ bzr add -q newprog
181 $ bzr add -q newprog
182 $ bzr commit -q -m 'Symlink changed, x bits changed'
182 $ bzr commit -q -m 'Symlink changed, x bits changed'
183 $ cd ..
183 $ cd ..
184 $ hg convert source source-hg
184 $ hg convert source source-hg
185 initializing destination source-hg repository
185 initializing destination source-hg repository
186 scanning source...
186 scanning source...
187 sorting...
187 sorting...
188 converting...
188 converting...
189 1 Initial setup
189 1 Initial setup
190 0 Symlink changed, x bits changed
190 0 Symlink changed, x bits changed
191 $ manifest source-hg 0
191 $ manifest source-hg 0
192 % manifest of 0
192 % manifest of 0
193 644 @ altname
193 644 @ altname
194 644 d/a
194 644 d/a
195 755 * program
195 755 * program
196 644 @ syma
196 644 @ syma
197 $ manifest source-hg tip
197 $ manifest source-hg tip
198 % manifest of tip
198 % manifest of tip
199 644 @ altname
199 644 @ altname
200 644 d/a
200 644 d/a
201 755 * newprog
201 755 * newprog
202 644 program
202 644 program
203 644 @ syma
203 644 @ syma
204
204
205 test the symlinks can be recreated
205 test the symlinks can be recreated
206
206
207 $ cd source-hg
207 $ cd source-hg
208 $ hg up
208 $ hg up
209 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
209 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 $ hg cat syma; echo
210 $ hg cat syma; echo
211 a
211 a
212 $ cd ../..
212 $ cd ../..
213
213
214 #endif
214 #endif
215
215
216 Multiple branches
216 Multiple branches
217
217
218 $ bzr init-repo -q --no-trees repo
218 $ bzr init-repo -q --no-trees repo
219 $ bzr init -q repo/trunk
219 $ bzr init -q repo/trunk
220 $ bzr co repo/trunk repo-trunk
220 $ bzr co repo/trunk repo-trunk
221 $ cd repo-trunk
221 $ cd repo-trunk
222 $ echo a > a
222 $ echo a > a
223 $ bzr add -q a
223 $ bzr add -q a
224 $ bzr ci -qm adda
224 $ bzr ci -qm adda
225 $ bzr tag trunk-tag
225 $ bzr tag trunk-tag
226 Created tag trunk-tag.
226 Created tag trunk-tag.
227 $ bzr switch -b branch
227 $ bzr switch -b branch
228 Tree is up to date at revision 1.
228 Tree is up to date at revision 1.
229 Switched to branch: *repo/branch/ (glob)
229 Switched to branch: *repo/branch/ (glob)
230 $ sleep 1
230 $ sleep 1
231 $ echo b > b
231 $ echo b > b
232 $ bzr add -q b
232 $ bzr add -q b
233 $ bzr ci -qm addb
233 $ bzr ci -qm addb
234 $ bzr tag branch-tag
234 $ bzr tag branch-tag
235 Created tag branch-tag.
235 Created tag branch-tag.
236 $ bzr switch --force ../repo/trunk
236 $ bzr switch --force ../repo/trunk
237 Updated to revision 1.
237 Updated to revision 1.
238 Switched to branch: */repo/trunk/ (glob)
238 Switched to branch: */repo/trunk/ (glob)
239 $ sleep 1
239 $ sleep 1
240 $ echo a >> a
240 $ echo a >> a
241 $ bzr ci -qm changea
241 $ bzr ci -qm changea
242 $ cd ..
242 $ cd ..
243 $ hg convert --datesort repo repo-bzr
243 $ hg convert --datesort repo repo-bzr
244 initializing destination repo-bzr repository
244 initializing destination repo-bzr repository
245 scanning source...
245 scanning source...
246 sorting...
246 sorting...
247 converting...
247 converting...
248 2 adda
248 2 adda
249 1 addb
249 1 addb
250 0 changea
250 0 changea
251 updating tags
251 updating tags
252 $ (cd repo-bzr; glog)
252 $ (cd repo-bzr; glog)
253 o 3@default "update tags" files+: [.hgtags], files-: [], files: []
253 o 3@default "update tags" files+: [.hgtags], files-: [], files: []
254 |
254 |
255 o 2@default "changea" files+: [], files-: [], files: [a]
255 o 2@default "changea" files+: [], files-: [], files: [a]
256 |
256 |
257 | o 1@branch "addb" files+: [b], files-: [], files: []
257 | o 1@branch "addb" files+: [b], files-: [], files: []
258 |/
258 |/
259 o 0@default "adda" files+: [a], files-: [], files: []
259 o 0@default "adda" files+: [a], files-: [], files: []
260
260
261
261
262 Test tags (converted identifiers are not stable because bzr ones are
262 Test tags (converted identifiers are not stable because bzr ones are
263 not and get incorporated in extra fields).
263 not and get incorporated in extra fields).
264
264
265 $ hg -R repo-bzr tags
265 $ hg -R repo-bzr tags
266 tip 3:* (glob)
266 tip 3:* (glob)
267 branch-tag 1:* (glob)
267 branch-tag 1:* (glob)
268 trunk-tag 0:* (glob)
268 trunk-tag 0:* (glob)
269
269
270 Nested repositories (issue3254)
270 Nested repositories (issue3254)
271
271
272 $ bzr init-repo -q --no-trees repo/inner
272 $ bzr init-repo -q --no-trees repo/inner
273 $ bzr init -q repo/inner/trunk
273 $ bzr init -q repo/inner/trunk
274 $ bzr co repo/inner/trunk inner-trunk
274 $ bzr co repo/inner/trunk inner-trunk
275 $ cd inner-trunk
275 $ cd inner-trunk
276 $ echo b > b
276 $ echo b > b
277 $ bzr add -q b
277 $ bzr add -q b
278 $ bzr ci -qm addb
278 $ bzr ci -qm addb
279 $ cd ..
279 $ cd ..
280 $ hg convert --datesort repo noinner-bzr
280 $ hg convert --datesort repo noinner-bzr
281 initializing destination noinner-bzr repository
281 initializing destination noinner-bzr repository
282 scanning source...
282 scanning source...
283 sorting...
283 sorting...
284 converting...
284 converting...
285 2 adda
285 2 adda
286 1 addb
286 1 addb
287 0 changea
287 0 changea
288 updating tags
288 updating tags
@@ -1,1380 +1,1380 b''
1 Test template keywords
1 Test template keywords
2 ======================
2 ======================
3
3
4 $ hg init a
4 $ hg init a
5 $ cd a
5 $ cd a
6 $ echo a > a
6 $ echo a > a
7 $ hg add a
7 $ hg add a
8 $ echo line 1 > b
8 $ echo line 1 > b
9 $ echo line 2 >> b
9 $ echo line 2 >> b
10 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
10 $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
11
11
12 $ hg add b
12 $ hg add b
13 $ echo other 1 > c
13 $ echo other 1 > c
14 $ echo other 2 >> c
14 $ echo other 2 >> c
15 $ echo >> c
15 $ echo >> c
16 $ echo other 3 >> c
16 $ echo other 3 >> c
17 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
17 $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
18
18
19 $ hg add c
19 $ hg add c
20 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
20 $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
21 $ echo c >> c
21 $ echo c >> c
22 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
22 $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
23
23
24 $ echo foo > .hg/branch
24 $ echo foo > .hg/branch
25 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
25 $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
26
26
27 $ hg co -q 3
27 $ hg co -q 3
28 $ echo other 4 >> d
28 $ echo other 4 >> d
29 $ hg add d
29 $ hg add d
30 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
30 $ hg commit -m 'new head' -d '1500000 0' -u 'person'
31
31
32 $ hg merge -q foo
32 $ hg merge -q foo
33 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
33 $ hg commit -m 'merge' -d '1500001 0' -u 'person'
34
34
35 Second branch starting at nullrev:
35 Second branch starting at nullrev:
36
36
37 $ hg update null
37 $ hg update null
38 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
38 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
39 $ echo second > second
39 $ echo second > second
40 $ hg add second
40 $ hg add second
41 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
41 $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
42 created new head
42 created new head
43
43
44 $ echo third > third
44 $ echo third > third
45 $ hg add third
45 $ hg add third
46 $ hg mv second fourth
46 $ hg mv second fourth
47 $ hg commit -m third -d "2020-01-01 10:01"
47 $ hg commit -m third -d "2020-01-01 10:01"
48
48
49 Working-directory revision has special identifiers, though they are still
49 Working-directory revision has special identifiers, though they are still
50 experimental:
50 experimental:
51
51
52 $ hg log -r 'wdir()' -T '{rev}:{node}\n'
52 $ hg log -r 'wdir()' -T '{rev}:{node}\n'
53 2147483647:ffffffffffffffffffffffffffffffffffffffff
53 2147483647:ffffffffffffffffffffffffffffffffffffffff
54
54
55 $ hg log -r 'wdir()' -Tjson --debug
55 $ hg log -r 'wdir()' -Tjson --debug
56 [
56 [
57 {
57 {
58 "added": [],
58 "added": [],
59 "bookmarks": [],
59 "bookmarks": [],
60 "branch": "default",
60 "branch": "default",
61 "date": [0, 0],
61 "date": [0, 0],
62 "desc": "",
62 "desc": "",
63 "extra": {"branch": "default"},
63 "extra": {"branch": "default"},
64 "manifest": "ffffffffffffffffffffffffffffffffffffffff",
64 "manifest": "ffffffffffffffffffffffffffffffffffffffff",
65 "modified": [],
65 "modified": [],
66 "node": "ffffffffffffffffffffffffffffffffffffffff",
66 "node": "ffffffffffffffffffffffffffffffffffffffff",
67 "parents": ["95c24699272ef57d062b8bccc32c878bf841784a"],
67 "parents": ["95c24699272ef57d062b8bccc32c878bf841784a"],
68 "phase": "draft",
68 "phase": "draft",
69 "removed": [],
69 "removed": [],
70 "rev": 2147483647,
70 "rev": 2147483647,
71 "tags": [],
71 "tags": [],
72 "user": "test"
72 "user": "test"
73 }
73 }
74 ]
74 ]
75
75
76 $ hg log -r 'wdir()' -T '{manifest}\n'
76 $ hg log -r 'wdir()' -T '{manifest}\n'
77 2147483647:ffffffffffff
77 2147483647:ffffffffffff
78
78
79 However, for negrev, we refuse to output anything (as well as for null)
79 However, for negrev, we refuse to output anything (as well as for null)
80
80
81 $ hg log -r 'wdir() + null' -T 'bla{negrev}nk\n'
81 $ hg log -r 'wdir() + null' -T 'bla{negrev}nk\n'
82 blank
82 blank
83 blank
83 blank
84
84
85 Changectx-derived keywords are disabled within {manifest} as {node} changes:
85 Changectx-derived keywords are disabled within {manifest} as {node} changes:
86
86
87 $ hg log -r0 -T 'outer:{p1node} {manifest % "inner:{p1node}"}\n'
87 $ hg log -r0 -T 'outer:{p1node} {manifest % "inner:{p1node}"}\n'
88 outer:0000000000000000000000000000000000000000 inner:
88 outer:0000000000000000000000000000000000000000 inner:
89
89
90 Check that {phase} works correctly on parents:
90 Check that {phase} works correctly on parents:
91
91
92 $ cat << EOF > parentphase
92 $ cat << EOF > parentphase
93 > changeset_debug = '{rev} ({phase}):{parents}\n'
93 > changeset_debug = '{rev} ({phase}):{parents}\n'
94 > parent = ' {rev} ({phase})'
94 > parent = ' {rev} ({phase})'
95 > EOF
95 > EOF
96 $ hg phase -r 5 --public
96 $ hg phase -r 5 --public
97 $ hg phase -r 7 --secret --force
97 $ hg phase -r 7 --secret --force
98 $ hg log --debug -G --style ./parentphase
98 $ hg log --debug -G --style ./parentphase
99 @ 8 (secret): 7 (secret) -1 (public)
99 @ 8 (secret): 7 (secret) -1 (public)
100 |
100 |
101 o 7 (secret): -1 (public) -1 (public)
101 o 7 (secret): -1 (public) -1 (public)
102
102
103 o 6 (draft): 5 (public) 4 (draft)
103 o 6 (draft): 5 (public) 4 (draft)
104 |\
104 |\
105 | o 5 (public): 3 (public) -1 (public)
105 | o 5 (public): 3 (public) -1 (public)
106 | |
106 | |
107 o | 4 (draft): 3 (public) -1 (public)
107 o | 4 (draft): 3 (public) -1 (public)
108 |/
108 |/
109 o 3 (public): 2 (public) -1 (public)
109 o 3 (public): 2 (public) -1 (public)
110 |
110 |
111 o 2 (public): 1 (public) -1 (public)
111 o 2 (public): 1 (public) -1 (public)
112 |
112 |
113 o 1 (public): 0 (public) -1 (public)
113 o 1 (public): 0 (public) -1 (public)
114 |
114 |
115 o 0 (public): -1 (public) -1 (public)
115 o 0 (public): -1 (public) -1 (public)
116
116
117
117
118 Keys work:
118 Keys work:
119
119
120 $ for key in author branch branches date desc file_adds file_dels file_mods \
120 $ for key in author branch branches date desc file_adds file_dels file_mods \
121 > file_copies file_copies_switch files \
121 > file_copies file_copies_switch files \
122 > manifest node parents rev tags diffstat extras \
122 > manifest node parents rev tags diffstat extras \
123 > p1rev p2rev p1node p2node user; do
123 > p1rev p2rev p1node p2node user; do
124 > for mode in '' --verbose --debug; do
124 > for mode in '' --verbose --debug; do
125 > hg log $mode --template "$key$mode: {$key}\n"
125 > hg log $mode --template "$key$mode: {$key}\n"
126 > done
126 > done
127 > done
127 > done
128 author: test
128 author: test
129 author: User Name <user@hostname>
129 author: User Name <user@hostname>
130 author: person
130 author: person
131 author: person
131 author: person
132 author: person
132 author: person
133 author: person
133 author: person
134 author: other@place
134 author: other@place
135 author: A. N. Other <other@place>
135 author: A. N. Other <other@place>
136 author: User Name <user@hostname>
136 author: User Name <user@hostname>
137 author--verbose: test
137 author--verbose: test
138 author--verbose: User Name <user@hostname>
138 author--verbose: User Name <user@hostname>
139 author--verbose: person
139 author--verbose: person
140 author--verbose: person
140 author--verbose: person
141 author--verbose: person
141 author--verbose: person
142 author--verbose: person
142 author--verbose: person
143 author--verbose: other@place
143 author--verbose: other@place
144 author--verbose: A. N. Other <other@place>
144 author--verbose: A. N. Other <other@place>
145 author--verbose: User Name <user@hostname>
145 author--verbose: User Name <user@hostname>
146 author--debug: test
146 author--debug: test
147 author--debug: User Name <user@hostname>
147 author--debug: User Name <user@hostname>
148 author--debug: person
148 author--debug: person
149 author--debug: person
149 author--debug: person
150 author--debug: person
150 author--debug: person
151 author--debug: person
151 author--debug: person
152 author--debug: other@place
152 author--debug: other@place
153 author--debug: A. N. Other <other@place>
153 author--debug: A. N. Other <other@place>
154 author--debug: User Name <user@hostname>
154 author--debug: User Name <user@hostname>
155 branch: default
155 branch: default
156 branch: default
156 branch: default
157 branch: default
157 branch: default
158 branch: default
158 branch: default
159 branch: foo
159 branch: foo
160 branch: default
160 branch: default
161 branch: default
161 branch: default
162 branch: default
162 branch: default
163 branch: default
163 branch: default
164 branch--verbose: default
164 branch--verbose: default
165 branch--verbose: default
165 branch--verbose: default
166 branch--verbose: default
166 branch--verbose: default
167 branch--verbose: default
167 branch--verbose: default
168 branch--verbose: foo
168 branch--verbose: foo
169 branch--verbose: default
169 branch--verbose: default
170 branch--verbose: default
170 branch--verbose: default
171 branch--verbose: default
171 branch--verbose: default
172 branch--verbose: default
172 branch--verbose: default
173 branch--debug: default
173 branch--debug: default
174 branch--debug: default
174 branch--debug: default
175 branch--debug: default
175 branch--debug: default
176 branch--debug: default
176 branch--debug: default
177 branch--debug: foo
177 branch--debug: foo
178 branch--debug: default
178 branch--debug: default
179 branch--debug: default
179 branch--debug: default
180 branch--debug: default
180 branch--debug: default
181 branch--debug: default
181 branch--debug: default
182 branches:
182 branches:
183 branches:
183 branches:
184 branches:
184 branches:
185 branches:
185 branches:
186 branches: foo
186 branches: foo
187 branches:
187 branches:
188 branches:
188 branches:
189 branches:
189 branches:
190 branches:
190 branches:
191 branches--verbose:
191 branches--verbose:
192 branches--verbose:
192 branches--verbose:
193 branches--verbose:
193 branches--verbose:
194 branches--verbose:
194 branches--verbose:
195 branches--verbose: foo
195 branches--verbose: foo
196 branches--verbose:
196 branches--verbose:
197 branches--verbose:
197 branches--verbose:
198 branches--verbose:
198 branches--verbose:
199 branches--verbose:
199 branches--verbose:
200 branches--debug:
200 branches--debug:
201 branches--debug:
201 branches--debug:
202 branches--debug:
202 branches--debug:
203 branches--debug:
203 branches--debug:
204 branches--debug: foo
204 branches--debug: foo
205 branches--debug:
205 branches--debug:
206 branches--debug:
206 branches--debug:
207 branches--debug:
207 branches--debug:
208 branches--debug:
208 branches--debug:
209 date: 1577872860.00
209 date: 1577872860.00
210 date: 1000000.00
210 date: 1000000.00
211 date: 1500001.00
211 date: 1500001.00
212 date: 1500000.00
212 date: 1500000.00
213 date: 1400000.00
213 date: 1400000.00
214 date: 1300000.00
214 date: 1300000.00
215 date: 1200000.00
215 date: 1200000.00
216 date: 1100000.00
216 date: 1100000.00
217 date: 1000000.00
217 date: 1000000.00
218 date--verbose: 1577872860.00
218 date--verbose: 1577872860.00
219 date--verbose: 1000000.00
219 date--verbose: 1000000.00
220 date--verbose: 1500001.00
220 date--verbose: 1500001.00
221 date--verbose: 1500000.00
221 date--verbose: 1500000.00
222 date--verbose: 1400000.00
222 date--verbose: 1400000.00
223 date--verbose: 1300000.00
223 date--verbose: 1300000.00
224 date--verbose: 1200000.00
224 date--verbose: 1200000.00
225 date--verbose: 1100000.00
225 date--verbose: 1100000.00
226 date--verbose: 1000000.00
226 date--verbose: 1000000.00
227 date--debug: 1577872860.00
227 date--debug: 1577872860.00
228 date--debug: 1000000.00
228 date--debug: 1000000.00
229 date--debug: 1500001.00
229 date--debug: 1500001.00
230 date--debug: 1500000.00
230 date--debug: 1500000.00
231 date--debug: 1400000.00
231 date--debug: 1400000.00
232 date--debug: 1300000.00
232 date--debug: 1300000.00
233 date--debug: 1200000.00
233 date--debug: 1200000.00
234 date--debug: 1100000.00
234 date--debug: 1100000.00
235 date--debug: 1000000.00
235 date--debug: 1000000.00
236 desc: third
236 desc: third
237 desc: second
237 desc: second
238 desc: merge
238 desc: merge
239 desc: new head
239 desc: new head
240 desc: new branch
240 desc: new branch
241 desc: no user, no domain
241 desc: no user, no domain
242 desc: no person
242 desc: no person
243 desc: other 1
243 desc: other 1
244 other 2
244 other 2
245
245
246 other 3
246 other 3
247 desc: line 1
247 desc: line 1
248 line 2
248 line 2
249 desc--verbose: third
249 desc--verbose: third
250 desc--verbose: second
250 desc--verbose: second
251 desc--verbose: merge
251 desc--verbose: merge
252 desc--verbose: new head
252 desc--verbose: new head
253 desc--verbose: new branch
253 desc--verbose: new branch
254 desc--verbose: no user, no domain
254 desc--verbose: no user, no domain
255 desc--verbose: no person
255 desc--verbose: no person
256 desc--verbose: other 1
256 desc--verbose: other 1
257 other 2
257 other 2
258
258
259 other 3
259 other 3
260 desc--verbose: line 1
260 desc--verbose: line 1
261 line 2
261 line 2
262 desc--debug: third
262 desc--debug: third
263 desc--debug: second
263 desc--debug: second
264 desc--debug: merge
264 desc--debug: merge
265 desc--debug: new head
265 desc--debug: new head
266 desc--debug: new branch
266 desc--debug: new branch
267 desc--debug: no user, no domain
267 desc--debug: no user, no domain
268 desc--debug: no person
268 desc--debug: no person
269 desc--debug: other 1
269 desc--debug: other 1
270 other 2
270 other 2
271
271
272 other 3
272 other 3
273 desc--debug: line 1
273 desc--debug: line 1
274 line 2
274 line 2
275 file_adds: fourth third
275 file_adds: fourth third
276 file_adds: second
276 file_adds: second
277 file_adds:
277 file_adds:
278 file_adds: d
278 file_adds: d
279 file_adds:
279 file_adds:
280 file_adds:
280 file_adds:
281 file_adds: c
281 file_adds: c
282 file_adds: b
282 file_adds: b
283 file_adds: a
283 file_adds: a
284 file_adds--verbose: fourth third
284 file_adds--verbose: fourth third
285 file_adds--verbose: second
285 file_adds--verbose: second
286 file_adds--verbose:
286 file_adds--verbose:
287 file_adds--verbose: d
287 file_adds--verbose: d
288 file_adds--verbose:
288 file_adds--verbose:
289 file_adds--verbose:
289 file_adds--verbose:
290 file_adds--verbose: c
290 file_adds--verbose: c
291 file_adds--verbose: b
291 file_adds--verbose: b
292 file_adds--verbose: a
292 file_adds--verbose: a
293 file_adds--debug: fourth third
293 file_adds--debug: fourth third
294 file_adds--debug: second
294 file_adds--debug: second
295 file_adds--debug:
295 file_adds--debug:
296 file_adds--debug: d
296 file_adds--debug: d
297 file_adds--debug:
297 file_adds--debug:
298 file_adds--debug:
298 file_adds--debug:
299 file_adds--debug: c
299 file_adds--debug: c
300 file_adds--debug: b
300 file_adds--debug: b
301 file_adds--debug: a
301 file_adds--debug: a
302 file_dels: second
302 file_dels: second
303 file_dels:
303 file_dels:
304 file_dels:
304 file_dels:
305 file_dels:
305 file_dels:
306 file_dels:
306 file_dels:
307 file_dels:
307 file_dels:
308 file_dels:
308 file_dels:
309 file_dels:
309 file_dels:
310 file_dels:
310 file_dels:
311 file_dels--verbose: second
311 file_dels--verbose: second
312 file_dels--verbose:
312 file_dels--verbose:
313 file_dels--verbose:
313 file_dels--verbose:
314 file_dels--verbose:
314 file_dels--verbose:
315 file_dels--verbose:
315 file_dels--verbose:
316 file_dels--verbose:
316 file_dels--verbose:
317 file_dels--verbose:
317 file_dels--verbose:
318 file_dels--verbose:
318 file_dels--verbose:
319 file_dels--verbose:
319 file_dels--verbose:
320 file_dels--debug: second
320 file_dels--debug: second
321 file_dels--debug:
321 file_dels--debug:
322 file_dels--debug:
322 file_dels--debug:
323 file_dels--debug:
323 file_dels--debug:
324 file_dels--debug:
324 file_dels--debug:
325 file_dels--debug:
325 file_dels--debug:
326 file_dels--debug:
326 file_dels--debug:
327 file_dels--debug:
327 file_dels--debug:
328 file_dels--debug:
328 file_dels--debug:
329 file_mods:
329 file_mods:
330 file_mods:
330 file_mods:
331 file_mods:
331 file_mods:
332 file_mods:
332 file_mods:
333 file_mods:
333 file_mods:
334 file_mods: c
334 file_mods: c
335 file_mods:
335 file_mods:
336 file_mods:
336 file_mods:
337 file_mods:
337 file_mods:
338 file_mods--verbose:
338 file_mods--verbose:
339 file_mods--verbose:
339 file_mods--verbose:
340 file_mods--verbose:
340 file_mods--verbose:
341 file_mods--verbose:
341 file_mods--verbose:
342 file_mods--verbose:
342 file_mods--verbose:
343 file_mods--verbose: c
343 file_mods--verbose: c
344 file_mods--verbose:
344 file_mods--verbose:
345 file_mods--verbose:
345 file_mods--verbose:
346 file_mods--verbose:
346 file_mods--verbose:
347 file_mods--debug:
347 file_mods--debug:
348 file_mods--debug:
348 file_mods--debug:
349 file_mods--debug:
349 file_mods--debug:
350 file_mods--debug:
350 file_mods--debug:
351 file_mods--debug:
351 file_mods--debug:
352 file_mods--debug: c
352 file_mods--debug: c
353 file_mods--debug:
353 file_mods--debug:
354 file_mods--debug:
354 file_mods--debug:
355 file_mods--debug:
355 file_mods--debug:
356 file_copies: fourth (second)
356 file_copies: fourth (second)
357 file_copies:
357 file_copies:
358 file_copies:
358 file_copies:
359 file_copies:
359 file_copies:
360 file_copies:
360 file_copies:
361 file_copies:
361 file_copies:
362 file_copies:
362 file_copies:
363 file_copies:
363 file_copies:
364 file_copies:
364 file_copies:
365 file_copies--verbose: fourth (second)
365 file_copies--verbose: fourth (second)
366 file_copies--verbose:
366 file_copies--verbose:
367 file_copies--verbose:
367 file_copies--verbose:
368 file_copies--verbose:
368 file_copies--verbose:
369 file_copies--verbose:
369 file_copies--verbose:
370 file_copies--verbose:
370 file_copies--verbose:
371 file_copies--verbose:
371 file_copies--verbose:
372 file_copies--verbose:
372 file_copies--verbose:
373 file_copies--verbose:
373 file_copies--verbose:
374 file_copies--debug: fourth (second)
374 file_copies--debug: fourth (second)
375 file_copies--debug:
375 file_copies--debug:
376 file_copies--debug:
376 file_copies--debug:
377 file_copies--debug:
377 file_copies--debug:
378 file_copies--debug:
378 file_copies--debug:
379 file_copies--debug:
379 file_copies--debug:
380 file_copies--debug:
380 file_copies--debug:
381 file_copies--debug:
381 file_copies--debug:
382 file_copies--debug:
382 file_copies--debug:
383 file_copies_switch:
383 file_copies_switch:
384 file_copies_switch:
384 file_copies_switch:
385 file_copies_switch:
385 file_copies_switch:
386 file_copies_switch:
386 file_copies_switch:
387 file_copies_switch:
387 file_copies_switch:
388 file_copies_switch:
388 file_copies_switch:
389 file_copies_switch:
389 file_copies_switch:
390 file_copies_switch:
390 file_copies_switch:
391 file_copies_switch:
391 file_copies_switch:
392 file_copies_switch--verbose:
392 file_copies_switch--verbose:
393 file_copies_switch--verbose:
393 file_copies_switch--verbose:
394 file_copies_switch--verbose:
394 file_copies_switch--verbose:
395 file_copies_switch--verbose:
395 file_copies_switch--verbose:
396 file_copies_switch--verbose:
396 file_copies_switch--verbose:
397 file_copies_switch--verbose:
397 file_copies_switch--verbose:
398 file_copies_switch--verbose:
398 file_copies_switch--verbose:
399 file_copies_switch--verbose:
399 file_copies_switch--verbose:
400 file_copies_switch--verbose:
400 file_copies_switch--verbose:
401 file_copies_switch--debug:
401 file_copies_switch--debug:
402 file_copies_switch--debug:
402 file_copies_switch--debug:
403 file_copies_switch--debug:
403 file_copies_switch--debug:
404 file_copies_switch--debug:
404 file_copies_switch--debug:
405 file_copies_switch--debug:
405 file_copies_switch--debug:
406 file_copies_switch--debug:
406 file_copies_switch--debug:
407 file_copies_switch--debug:
407 file_copies_switch--debug:
408 file_copies_switch--debug:
408 file_copies_switch--debug:
409 file_copies_switch--debug:
409 file_copies_switch--debug:
410 files: fourth second third
410 files: fourth second third
411 files: second
411 files: second
412 files:
412 files:
413 files: d
413 files: d
414 files:
414 files:
415 files: c
415 files: c
416 files: c
416 files: c
417 files: b
417 files: b
418 files: a
418 files: a
419 files--verbose: fourth second third
419 files--verbose: fourth second third
420 files--verbose: second
420 files--verbose: second
421 files--verbose:
421 files--verbose:
422 files--verbose: d
422 files--verbose: d
423 files--verbose:
423 files--verbose:
424 files--verbose: c
424 files--verbose: c
425 files--verbose: c
425 files--verbose: c
426 files--verbose: b
426 files--verbose: b
427 files--verbose: a
427 files--verbose: a
428 files--debug: fourth second third
428 files--debug: fourth second third
429 files--debug: second
429 files--debug: second
430 files--debug:
430 files--debug:
431 files--debug: d
431 files--debug: d
432 files--debug:
432 files--debug:
433 files--debug: c
433 files--debug: c
434 files--debug: c
434 files--debug: c
435 files--debug: b
435 files--debug: b
436 files--debug: a
436 files--debug: a
437 manifest: 6:94961b75a2da
437 manifest: 6:94961b75a2da
438 manifest: 5:f2dbc354b94e
438 manifest: 5:f2dbc354b94e
439 manifest: 4:4dc3def4f9b4
439 manifest: 4:4dc3def4f9b4
440 manifest: 4:4dc3def4f9b4
440 manifest: 4:4dc3def4f9b4
441 manifest: 3:cb5a1327723b
441 manifest: 3:cb5a1327723b
442 manifest: 3:cb5a1327723b
442 manifest: 3:cb5a1327723b
443 manifest: 2:6e0e82995c35
443 manifest: 2:6e0e82995c35
444 manifest: 1:4e8d705b1e53
444 manifest: 1:4e8d705b1e53
445 manifest: 0:a0c8bcbbb45c
445 manifest: 0:a0c8bcbbb45c
446 manifest--verbose: 6:94961b75a2da
446 manifest--verbose: 6:94961b75a2da
447 manifest--verbose: 5:f2dbc354b94e
447 manifest--verbose: 5:f2dbc354b94e
448 manifest--verbose: 4:4dc3def4f9b4
448 manifest--verbose: 4:4dc3def4f9b4
449 manifest--verbose: 4:4dc3def4f9b4
449 manifest--verbose: 4:4dc3def4f9b4
450 manifest--verbose: 3:cb5a1327723b
450 manifest--verbose: 3:cb5a1327723b
451 manifest--verbose: 3:cb5a1327723b
451 manifest--verbose: 3:cb5a1327723b
452 manifest--verbose: 2:6e0e82995c35
452 manifest--verbose: 2:6e0e82995c35
453 manifest--verbose: 1:4e8d705b1e53
453 manifest--verbose: 1:4e8d705b1e53
454 manifest--verbose: 0:a0c8bcbbb45c
454 manifest--verbose: 0:a0c8bcbbb45c
455 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
455 manifest--debug: 6:94961b75a2da554b4df6fb599e5bfc7d48de0c64
456 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
456 manifest--debug: 5:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
457 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
457 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
458 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
458 manifest--debug: 4:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
459 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
459 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
460 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
460 manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
461 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
461 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
462 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
462 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
463 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
463 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
464 node: 95c24699272ef57d062b8bccc32c878bf841784a
464 node: 95c24699272ef57d062b8bccc32c878bf841784a
465 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
465 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
466 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
466 node: d41e714fe50d9e4a5f11b4d595d543481b5f980b
467 node: 13207e5a10d9fd28ec424934298e176197f2c67f
467 node: 13207e5a10d9fd28ec424934298e176197f2c67f
468 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
468 node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
469 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
469 node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
470 node: 97054abb4ab824450e9164180baf491ae0078465
470 node: 97054abb4ab824450e9164180baf491ae0078465
471 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
471 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
472 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
472 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
473 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
473 node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
474 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
474 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
475 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
475 node--verbose: d41e714fe50d9e4a5f11b4d595d543481b5f980b
476 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
476 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
477 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
477 node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
478 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
478 node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
479 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
479 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
480 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
480 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
481 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
481 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
482 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
482 node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
483 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
483 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
484 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
484 node--debug: d41e714fe50d9e4a5f11b4d595d543481b5f980b
485 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
485 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
486 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
486 node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
487 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
487 node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
488 node--debug: 97054abb4ab824450e9164180baf491ae0078465
488 node--debug: 97054abb4ab824450e9164180baf491ae0078465
489 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
489 node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
490 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
490 node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
491 parents:
491 parents:
492 parents: -1:000000000000
492 parents: -1:000000000000
493 parents: 5:13207e5a10d9 4:bbe44766e73d
493 parents: 5:13207e5a10d9 4:bbe44766e73d
494 parents: 3:10e46f2dcbf4
494 parents: 3:10e46f2dcbf4
495 parents:
495 parents:
496 parents:
496 parents:
497 parents:
497 parents:
498 parents:
498 parents:
499 parents:
499 parents:
500 parents--verbose:
500 parents--verbose:
501 parents--verbose: -1:000000000000
501 parents--verbose: -1:000000000000
502 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
502 parents--verbose: 5:13207e5a10d9 4:bbe44766e73d
503 parents--verbose: 3:10e46f2dcbf4
503 parents--verbose: 3:10e46f2dcbf4
504 parents--verbose:
504 parents--verbose:
505 parents--verbose:
505 parents--verbose:
506 parents--verbose:
506 parents--verbose:
507 parents--verbose:
507 parents--verbose:
508 parents--verbose:
508 parents--verbose:
509 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
509 parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000
510 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
510 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
511 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
511 parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
512 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
512 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
513 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
513 parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000
514 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
514 parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000
515 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
515 parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000
516 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
516 parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000
517 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
517 parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000
518 rev: 8
518 rev: 8
519 rev: 7
519 rev: 7
520 rev: 6
520 rev: 6
521 rev: 5
521 rev: 5
522 rev: 4
522 rev: 4
523 rev: 3
523 rev: 3
524 rev: 2
524 rev: 2
525 rev: 1
525 rev: 1
526 rev: 0
526 rev: 0
527 rev--verbose: 8
527 rev--verbose: 8
528 rev--verbose: 7
528 rev--verbose: 7
529 rev--verbose: 6
529 rev--verbose: 6
530 rev--verbose: 5
530 rev--verbose: 5
531 rev--verbose: 4
531 rev--verbose: 4
532 rev--verbose: 3
532 rev--verbose: 3
533 rev--verbose: 2
533 rev--verbose: 2
534 rev--verbose: 1
534 rev--verbose: 1
535 rev--verbose: 0
535 rev--verbose: 0
536 rev--debug: 8
536 rev--debug: 8
537 rev--debug: 7
537 rev--debug: 7
538 rev--debug: 6
538 rev--debug: 6
539 rev--debug: 5
539 rev--debug: 5
540 rev--debug: 4
540 rev--debug: 4
541 rev--debug: 3
541 rev--debug: 3
542 rev--debug: 2
542 rev--debug: 2
543 rev--debug: 1
543 rev--debug: 1
544 rev--debug: 0
544 rev--debug: 0
545 tags: tip
545 tags: tip
546 tags:
546 tags:
547 tags:
547 tags:
548 tags:
548 tags:
549 tags:
549 tags:
550 tags:
550 tags:
551 tags:
551 tags:
552 tags:
552 tags:
553 tags:
553 tags:
554 tags--verbose: tip
554 tags--verbose: tip
555 tags--verbose:
555 tags--verbose:
556 tags--verbose:
556 tags--verbose:
557 tags--verbose:
557 tags--verbose:
558 tags--verbose:
558 tags--verbose:
559 tags--verbose:
559 tags--verbose:
560 tags--verbose:
560 tags--verbose:
561 tags--verbose:
561 tags--verbose:
562 tags--verbose:
562 tags--verbose:
563 tags--debug: tip
563 tags--debug: tip
564 tags--debug:
564 tags--debug:
565 tags--debug:
565 tags--debug:
566 tags--debug:
566 tags--debug:
567 tags--debug:
567 tags--debug:
568 tags--debug:
568 tags--debug:
569 tags--debug:
569 tags--debug:
570 tags--debug:
570 tags--debug:
571 tags--debug:
571 tags--debug:
572 diffstat: 3: +2/-1
572 diffstat: 3: +2/-1
573 diffstat: 1: +1/-0
573 diffstat: 1: +1/-0
574 diffstat: 0: +0/-0
574 diffstat: 0: +0/-0
575 diffstat: 1: +1/-0
575 diffstat: 1: +1/-0
576 diffstat: 0: +0/-0
576 diffstat: 0: +0/-0
577 diffstat: 1: +1/-0
577 diffstat: 1: +1/-0
578 diffstat: 1: +4/-0
578 diffstat: 1: +4/-0
579 diffstat: 1: +2/-0
579 diffstat: 1: +2/-0
580 diffstat: 1: +1/-0
580 diffstat: 1: +1/-0
581 diffstat--verbose: 3: +2/-1
581 diffstat--verbose: 3: +2/-1
582 diffstat--verbose: 1: +1/-0
582 diffstat--verbose: 1: +1/-0
583 diffstat--verbose: 0: +0/-0
583 diffstat--verbose: 0: +0/-0
584 diffstat--verbose: 1: +1/-0
584 diffstat--verbose: 1: +1/-0
585 diffstat--verbose: 0: +0/-0
585 diffstat--verbose: 0: +0/-0
586 diffstat--verbose: 1: +1/-0
586 diffstat--verbose: 1: +1/-0
587 diffstat--verbose: 1: +4/-0
587 diffstat--verbose: 1: +4/-0
588 diffstat--verbose: 1: +2/-0
588 diffstat--verbose: 1: +2/-0
589 diffstat--verbose: 1: +1/-0
589 diffstat--verbose: 1: +1/-0
590 diffstat--debug: 3: +2/-1
590 diffstat--debug: 3: +2/-1
591 diffstat--debug: 1: +1/-0
591 diffstat--debug: 1: +1/-0
592 diffstat--debug: 0: +0/-0
592 diffstat--debug: 0: +0/-0
593 diffstat--debug: 1: +1/-0
593 diffstat--debug: 1: +1/-0
594 diffstat--debug: 0: +0/-0
594 diffstat--debug: 0: +0/-0
595 diffstat--debug: 1: +1/-0
595 diffstat--debug: 1: +1/-0
596 diffstat--debug: 1: +4/-0
596 diffstat--debug: 1: +4/-0
597 diffstat--debug: 1: +2/-0
597 diffstat--debug: 1: +2/-0
598 diffstat--debug: 1: +1/-0
598 diffstat--debug: 1: +1/-0
599 extras: branch=default
599 extras: branch=default
600 extras: branch=default
600 extras: branch=default
601 extras: branch=default
601 extras: branch=default
602 extras: branch=default
602 extras: branch=default
603 extras: branch=foo
603 extras: branch=foo
604 extras: branch=default
604 extras: branch=default
605 extras: branch=default
605 extras: branch=default
606 extras: branch=default
606 extras: branch=default
607 extras: branch=default
607 extras: branch=default
608 extras--verbose: branch=default
608 extras--verbose: branch=default
609 extras--verbose: branch=default
609 extras--verbose: branch=default
610 extras--verbose: branch=default
610 extras--verbose: branch=default
611 extras--verbose: branch=default
611 extras--verbose: branch=default
612 extras--verbose: branch=foo
612 extras--verbose: branch=foo
613 extras--verbose: branch=default
613 extras--verbose: branch=default
614 extras--verbose: branch=default
614 extras--verbose: branch=default
615 extras--verbose: branch=default
615 extras--verbose: branch=default
616 extras--verbose: branch=default
616 extras--verbose: branch=default
617 extras--debug: branch=default
617 extras--debug: branch=default
618 extras--debug: branch=default
618 extras--debug: branch=default
619 extras--debug: branch=default
619 extras--debug: branch=default
620 extras--debug: branch=default
620 extras--debug: branch=default
621 extras--debug: branch=foo
621 extras--debug: branch=foo
622 extras--debug: branch=default
622 extras--debug: branch=default
623 extras--debug: branch=default
623 extras--debug: branch=default
624 extras--debug: branch=default
624 extras--debug: branch=default
625 extras--debug: branch=default
625 extras--debug: branch=default
626 p1rev: 7
626 p1rev: 7
627 p1rev: -1
627 p1rev: -1
628 p1rev: 5
628 p1rev: 5
629 p1rev: 3
629 p1rev: 3
630 p1rev: 3
630 p1rev: 3
631 p1rev: 2
631 p1rev: 2
632 p1rev: 1
632 p1rev: 1
633 p1rev: 0
633 p1rev: 0
634 p1rev: -1
634 p1rev: -1
635 p1rev--verbose: 7
635 p1rev--verbose: 7
636 p1rev--verbose: -1
636 p1rev--verbose: -1
637 p1rev--verbose: 5
637 p1rev--verbose: 5
638 p1rev--verbose: 3
638 p1rev--verbose: 3
639 p1rev--verbose: 3
639 p1rev--verbose: 3
640 p1rev--verbose: 2
640 p1rev--verbose: 2
641 p1rev--verbose: 1
641 p1rev--verbose: 1
642 p1rev--verbose: 0
642 p1rev--verbose: 0
643 p1rev--verbose: -1
643 p1rev--verbose: -1
644 p1rev--debug: 7
644 p1rev--debug: 7
645 p1rev--debug: -1
645 p1rev--debug: -1
646 p1rev--debug: 5
646 p1rev--debug: 5
647 p1rev--debug: 3
647 p1rev--debug: 3
648 p1rev--debug: 3
648 p1rev--debug: 3
649 p1rev--debug: 2
649 p1rev--debug: 2
650 p1rev--debug: 1
650 p1rev--debug: 1
651 p1rev--debug: 0
651 p1rev--debug: 0
652 p1rev--debug: -1
652 p1rev--debug: -1
653 p2rev: -1
653 p2rev: -1
654 p2rev: -1
654 p2rev: -1
655 p2rev: 4
655 p2rev: 4
656 p2rev: -1
656 p2rev: -1
657 p2rev: -1
657 p2rev: -1
658 p2rev: -1
658 p2rev: -1
659 p2rev: -1
659 p2rev: -1
660 p2rev: -1
660 p2rev: -1
661 p2rev: -1
661 p2rev: -1
662 p2rev--verbose: -1
662 p2rev--verbose: -1
663 p2rev--verbose: -1
663 p2rev--verbose: -1
664 p2rev--verbose: 4
664 p2rev--verbose: 4
665 p2rev--verbose: -1
665 p2rev--verbose: -1
666 p2rev--verbose: -1
666 p2rev--verbose: -1
667 p2rev--verbose: -1
667 p2rev--verbose: -1
668 p2rev--verbose: -1
668 p2rev--verbose: -1
669 p2rev--verbose: -1
669 p2rev--verbose: -1
670 p2rev--verbose: -1
670 p2rev--verbose: -1
671 p2rev--debug: -1
671 p2rev--debug: -1
672 p2rev--debug: -1
672 p2rev--debug: -1
673 p2rev--debug: 4
673 p2rev--debug: 4
674 p2rev--debug: -1
674 p2rev--debug: -1
675 p2rev--debug: -1
675 p2rev--debug: -1
676 p2rev--debug: -1
676 p2rev--debug: -1
677 p2rev--debug: -1
677 p2rev--debug: -1
678 p2rev--debug: -1
678 p2rev--debug: -1
679 p2rev--debug: -1
679 p2rev--debug: -1
680 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
680 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
681 p1node: 0000000000000000000000000000000000000000
681 p1node: 0000000000000000000000000000000000000000
682 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
682 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
683 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
683 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
684 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
684 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
685 p1node: 97054abb4ab824450e9164180baf491ae0078465
685 p1node: 97054abb4ab824450e9164180baf491ae0078465
686 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
686 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
687 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
687 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
688 p1node: 0000000000000000000000000000000000000000
688 p1node: 0000000000000000000000000000000000000000
689 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
689 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
690 p1node--verbose: 0000000000000000000000000000000000000000
690 p1node--verbose: 0000000000000000000000000000000000000000
691 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
691 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
692 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
692 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
693 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
693 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
694 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
694 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
695 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
695 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
696 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
696 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
697 p1node--verbose: 0000000000000000000000000000000000000000
697 p1node--verbose: 0000000000000000000000000000000000000000
698 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
698 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
699 p1node--debug: 0000000000000000000000000000000000000000
699 p1node--debug: 0000000000000000000000000000000000000000
700 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
700 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
701 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
701 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
702 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
702 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
703 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
703 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
704 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
704 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
705 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
705 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
706 p1node--debug: 0000000000000000000000000000000000000000
706 p1node--debug: 0000000000000000000000000000000000000000
707 p2node: 0000000000000000000000000000000000000000
707 p2node: 0000000000000000000000000000000000000000
708 p2node: 0000000000000000000000000000000000000000
708 p2node: 0000000000000000000000000000000000000000
709 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
709 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
710 p2node: 0000000000000000000000000000000000000000
710 p2node: 0000000000000000000000000000000000000000
711 p2node: 0000000000000000000000000000000000000000
711 p2node: 0000000000000000000000000000000000000000
712 p2node: 0000000000000000000000000000000000000000
712 p2node: 0000000000000000000000000000000000000000
713 p2node: 0000000000000000000000000000000000000000
713 p2node: 0000000000000000000000000000000000000000
714 p2node: 0000000000000000000000000000000000000000
714 p2node: 0000000000000000000000000000000000000000
715 p2node: 0000000000000000000000000000000000000000
715 p2node: 0000000000000000000000000000000000000000
716 p2node--verbose: 0000000000000000000000000000000000000000
716 p2node--verbose: 0000000000000000000000000000000000000000
717 p2node--verbose: 0000000000000000000000000000000000000000
717 p2node--verbose: 0000000000000000000000000000000000000000
718 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
718 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
719 p2node--verbose: 0000000000000000000000000000000000000000
719 p2node--verbose: 0000000000000000000000000000000000000000
720 p2node--verbose: 0000000000000000000000000000000000000000
720 p2node--verbose: 0000000000000000000000000000000000000000
721 p2node--verbose: 0000000000000000000000000000000000000000
721 p2node--verbose: 0000000000000000000000000000000000000000
722 p2node--verbose: 0000000000000000000000000000000000000000
722 p2node--verbose: 0000000000000000000000000000000000000000
723 p2node--verbose: 0000000000000000000000000000000000000000
723 p2node--verbose: 0000000000000000000000000000000000000000
724 p2node--verbose: 0000000000000000000000000000000000000000
724 p2node--verbose: 0000000000000000000000000000000000000000
725 p2node--debug: 0000000000000000000000000000000000000000
725 p2node--debug: 0000000000000000000000000000000000000000
726 p2node--debug: 0000000000000000000000000000000000000000
726 p2node--debug: 0000000000000000000000000000000000000000
727 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
727 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
728 p2node--debug: 0000000000000000000000000000000000000000
728 p2node--debug: 0000000000000000000000000000000000000000
729 p2node--debug: 0000000000000000000000000000000000000000
729 p2node--debug: 0000000000000000000000000000000000000000
730 p2node--debug: 0000000000000000000000000000000000000000
730 p2node--debug: 0000000000000000000000000000000000000000
731 p2node--debug: 0000000000000000000000000000000000000000
731 p2node--debug: 0000000000000000000000000000000000000000
732 p2node--debug: 0000000000000000000000000000000000000000
732 p2node--debug: 0000000000000000000000000000000000000000
733 p2node--debug: 0000000000000000000000000000000000000000
733 p2node--debug: 0000000000000000000000000000000000000000
734 user: test
734 user: test
735 user: User Name <user@hostname>
735 user: User Name <user@hostname>
736 user: person
736 user: person
737 user: person
737 user: person
738 user: person
738 user: person
739 user: person
739 user: person
740 user: other@place
740 user: other@place
741 user: A. N. Other <other@place>
741 user: A. N. Other <other@place>
742 user: User Name <user@hostname>
742 user: User Name <user@hostname>
743 user--verbose: test
743 user--verbose: test
744 user--verbose: User Name <user@hostname>
744 user--verbose: User Name <user@hostname>
745 user--verbose: person
745 user--verbose: person
746 user--verbose: person
746 user--verbose: person
747 user--verbose: person
747 user--verbose: person
748 user--verbose: person
748 user--verbose: person
749 user--verbose: other@place
749 user--verbose: other@place
750 user--verbose: A. N. Other <other@place>
750 user--verbose: A. N. Other <other@place>
751 user--verbose: User Name <user@hostname>
751 user--verbose: User Name <user@hostname>
752 user--debug: test
752 user--debug: test
753 user--debug: User Name <user@hostname>
753 user--debug: User Name <user@hostname>
754 user--debug: person
754 user--debug: person
755 user--debug: person
755 user--debug: person
756 user--debug: person
756 user--debug: person
757 user--debug: person
757 user--debug: person
758 user--debug: other@place
758 user--debug: other@place
759 user--debug: A. N. Other <other@place>
759 user--debug: A. N. Other <other@place>
760 user--debug: User Name <user@hostname>
760 user--debug: User Name <user@hostname>
761
761
762 Add a dummy commit to make up for the instability of the above:
762 Add a dummy commit to make up for the instability of the above:
763
763
764 $ echo a > a
764 $ echo a > a
765 $ hg add a
765 $ hg add a
766 $ hg ci -m future
766 $ hg ci -m future
767
767
768 Add a commit that does all possible modifications at once
768 Add a commit that does all possible modifications at once
769
769
770 $ echo modify >> third
770 $ echo modify >> third
771 $ touch b
771 $ touch b
772 $ hg add b
772 $ hg add b
773 $ hg mv fourth fifth
773 $ hg mv fourth fifth
774 $ hg rm a
774 $ hg rm a
775 $ hg ci -m "Modify, add, remove, rename"
775 $ hg ci -m "Modify, add, remove, rename"
776
776
777 Test files list:
777 Test files list:
778
778
779 $ hg log -l1 -T '{join(file_mods, " ")}\n'
779 $ hg log -l1 -T '{join(file_mods, " ")}\n'
780 third
780 third
781 $ hg log -l1 -T '{file_mods % "{file}\n"}'
781 $ hg log -l1 -T '{file_mods % "{file}\n"}'
782 third
782 third
783 $ hg log -l1 -T '{file_mods % "{path}\n"}'
783 $ hg log -l1 -T '{file_mods % "{path}\n"}'
784 third
784 third
785
785
786 $ hg log -l1 -T '{join(files, " ")}\n'
786 $ hg log -l1 -T '{join(files, " ")}\n'
787 a b fifth fourth third
787 a b fifth fourth third
788 $ hg log -l1 -T '{files % "{file}\n"}'
788 $ hg log -l1 -T '{files % "{file}\n"}'
789 a
789 a
790 b
790 b
791 fifth
791 fifth
792 fourth
792 fourth
793 third
793 third
794 $ hg log -l1 -T '{files % "{path}\n"}'
794 $ hg log -l1 -T '{files % "{path}\n"}'
795 a
795 a
796 b
796 b
797 fifth
797 fifth
798 fourth
798 fourth
799 third
799 third
800
800
801 Test files lists on merge commit:
801 Test files lists on merge commit:
802
802
803 $ hg co '.^' -q
803 $ hg co '.^' -q
804 $ touch c
804 $ touch c
805 $ hg add c
805 $ hg add c
806 $ hg ci -qm 'add file'
806 $ hg ci -qm 'add file'
807 $ hg merge 10 -q
807 $ hg merge 10 -q
808 $ hg ci -m 'merge'
808 $ hg ci -m 'merge'
809 $ hg log -l1 -T '{files}\n'
809 $ hg log -l1 -T '{files}\n'
810 a fourth
810 a fourth
811 $ hg log -l1 -T '{file_mods}\n'
811 $ hg log -l1 -T '{file_mods}\n'
812 third
812
813 $ hg log -l1 -T '{file_adds}\n'
813 $ hg log -l1 -T '{file_adds}\n'
814 b fifth
814
815 $ hg log -l1 -T '{file_dels}\n'
815 $ hg log -l1 -T '{file_dels}\n'
816 a fourth
816 a fourth
817
817
818 Test file copies dict:
818 Test file copies dict:
819
819
820 $ hg log -r8 -T '{join(file_copies, " ")}\n'
820 $ hg log -r8 -T '{join(file_copies, " ")}\n'
821 fourth (second)
821 fourth (second)
822 $ hg log -r8 -T '{file_copies % "{name} <- {source}\n"}'
822 $ hg log -r8 -T '{file_copies % "{name} <- {source}\n"}'
823 fourth <- second
823 fourth <- second
824 $ hg log -r8 -T '{file_copies % "{path} <- {source}\n"}'
824 $ hg log -r8 -T '{file_copies % "{path} <- {source}\n"}'
825 fourth <- second
825 fourth <- second
826
826
827 $ hg log -r8 -T '{join(file_copies_switch, " ")}\n'
827 $ hg log -r8 -T '{join(file_copies_switch, " ")}\n'
828
828
829 $ hg log -r8 -C -T '{join(file_copies_switch, " ")}\n'
829 $ hg log -r8 -C -T '{join(file_copies_switch, " ")}\n'
830 fourth (second)
830 fourth (second)
831 $ hg log -r8 -C -T '{file_copies_switch % "{name} <- {source}\n"}'
831 $ hg log -r8 -C -T '{file_copies_switch % "{name} <- {source}\n"}'
832 fourth <- second
832 fourth <- second
833 $ hg log -r8 -C -T '{file_copies_switch % "{path} <- {source}\n"}'
833 $ hg log -r8 -C -T '{file_copies_switch % "{path} <- {source}\n"}'
834 fourth <- second
834 fourth <- second
835
835
836 Test file attributes:
836 Test file attributes:
837
837
838 $ hg log -r10 -T '{files % "{status} {pad(size, 3, left=True)} {path}\n"}'
838 $ hg log -r10 -T '{files % "{status} {pad(size, 3, left=True)} {path}\n"}'
839 R a
839 R a
840 A 0 b
840 A 0 b
841 A 7 fifth
841 A 7 fifth
842 R fourth
842 R fourth
843 M 13 third
843 M 13 third
844
844
845 Test file status including clean ones:
845 Test file status including clean ones:
846
846
847 $ hg log -r9 -T '{files("**") % "{status} {path}\n"}'
847 $ hg log -r9 -T '{files("**") % "{status} {path}\n"}'
848 A a
848 A a
849 C fourth
849 C fourth
850 C third
850 C third
851
851
852 Test index keyword:
852 Test index keyword:
853
853
854 $ hg log -r 10:9 -T '{index + 10}{files % " {index}:{file}"}\n'
854 $ hg log -r 10:9 -T '{index + 10}{files % " {index}:{file}"}\n'
855 10 0:a 1:b 2:fifth 3:fourth 4:third
855 10 0:a 1:b 2:fifth 3:fourth 4:third
856 11 0:a
856 11 0:a
857
857
858 $ hg branches -T '{index} {branch}\n'
858 $ hg branches -T '{index} {branch}\n'
859 0 default
859 0 default
860 1 foo
860 1 foo
861
861
862 p1/p2 keywords:
862 p1/p2 keywords:
863
863
864 $ hg log -r4:7 -GT '{rev} p1:{p1} p2:{p2} p1.rev:{p1.rev} p2.node:{p2.node}\n'
864 $ hg log -r4:7 -GT '{rev} p1:{p1} p2:{p2} p1.rev:{p1.rev} p2.node:{p2.node}\n'
865 o 7 p1:-1:000000000000 p2:-1:000000000000 p1.rev:-1 p2.node:0000000000000000000000000000000000000000
865 o 7 p1:-1:000000000000 p2:-1:000000000000 p1.rev:-1 p2.node:0000000000000000000000000000000000000000
866
866
867 o 6 p1:5:13207e5a10d9 p2:4:bbe44766e73d p1.rev:5 p2.node:bbe44766e73d5f11ed2177f1838de10c53ef3e74
867 o 6 p1:5:13207e5a10d9 p2:4:bbe44766e73d p1.rev:5 p2.node:bbe44766e73d5f11ed2177f1838de10c53ef3e74
868 |\
868 |\
869 | o 5 p1:3:10e46f2dcbf4 p2:-1:000000000000 p1.rev:3 p2.node:0000000000000000000000000000000000000000
869 | o 5 p1:3:10e46f2dcbf4 p2:-1:000000000000 p1.rev:3 p2.node:0000000000000000000000000000000000000000
870 | |
870 | |
871 | ~
871 | ~
872 o 4 p1:3:10e46f2dcbf4 p2:-1:000000000000 p1.rev:3 p2.node:0000000000000000000000000000000000000000
872 o 4 p1:3:10e46f2dcbf4 p2:-1:000000000000 p1.rev:3 p2.node:0000000000000000000000000000000000000000
873 |
873 |
874 ~
874 ~
875
875
876 TODO: no idea what should be displayed as a JSON representation
876 TODO: no idea what should be displayed as a JSON representation
877 $ hg log -r6 -T 'p1:{p1|json}\np2:{p2|json}\n'
877 $ hg log -r6 -T 'p1:{p1|json}\np2:{p2|json}\n'
878 p1:{}
878 p1:{}
879 p2:{}
879 p2:{}
880
880
881 ui verbosity:
881 ui verbosity:
882
882
883 $ hg log -l1 -T '{verbosity}\n'
883 $ hg log -l1 -T '{verbosity}\n'
884
884
885 $ hg log -l1 -T '{verbosity}\n' --debug
885 $ hg log -l1 -T '{verbosity}\n' --debug
886 debug
886 debug
887 $ hg log -l1 -T '{verbosity}\n' --quiet
887 $ hg log -l1 -T '{verbosity}\n' --quiet
888 quiet
888 quiet
889 $ hg log -l1 -T '{verbosity}\n' --verbose
889 $ hg log -l1 -T '{verbosity}\n' --verbose
890 verbose
890 verbose
891
891
892 $ cd ..
892 $ cd ..
893
893
894 latesttag:
894 latesttag:
895
895
896 $ hg init latesttag
896 $ hg init latesttag
897 $ cd latesttag
897 $ cd latesttag
898
898
899 $ echo a > file
899 $ echo a > file
900 $ hg ci -Am a -d '0 0'
900 $ hg ci -Am a -d '0 0'
901 adding file
901 adding file
902
902
903 $ echo b >> file
903 $ echo b >> file
904 $ hg ci -m b -d '1 0'
904 $ hg ci -m b -d '1 0'
905
905
906 $ echo c >> head1
906 $ echo c >> head1
907 $ hg ci -Am h1c -d '2 0'
907 $ hg ci -Am h1c -d '2 0'
908 adding head1
908 adding head1
909
909
910 $ hg update -q 1
910 $ hg update -q 1
911 $ echo d >> head2
911 $ echo d >> head2
912 $ hg ci -Am h2d -d '3 0'
912 $ hg ci -Am h2d -d '3 0'
913 adding head2
913 adding head2
914 created new head
914 created new head
915
915
916 $ echo e >> head2
916 $ echo e >> head2
917 $ hg ci -m h2e -d '4 0'
917 $ hg ci -m h2e -d '4 0'
918
918
919 $ hg merge -q
919 $ hg merge -q
920 $ hg ci -m merge -d '5 -3600'
920 $ hg ci -m merge -d '5 -3600'
921
921
922 No tag set:
922 No tag set:
923
923
924 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
924 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
925 @ 5: null+5
925 @ 5: null+5
926 |\
926 |\
927 | o 4: null+4
927 | o 4: null+4
928 | |
928 | |
929 | o 3: null+3
929 | o 3: null+3
930 | |
930 | |
931 o | 2: null+3
931 o | 2: null+3
932 |/
932 |/
933 o 1: null+2
933 o 1: null+2
934 |
934 |
935 o 0: null+1
935 o 0: null+1
936
936
937
937
938 One common tag: longest path wins for {latesttagdistance}:
938 One common tag: longest path wins for {latesttagdistance}:
939
939
940 $ hg tag -r 1 -m t1 -d '6 0' t1
940 $ hg tag -r 1 -m t1 -d '6 0' t1
941 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
941 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
942 @ 6: t1+4
942 @ 6: t1+4
943 |
943 |
944 o 5: t1+3
944 o 5: t1+3
945 |\
945 |\
946 | o 4: t1+2
946 | o 4: t1+2
947 | |
947 | |
948 | o 3: t1+1
948 | o 3: t1+1
949 | |
949 | |
950 o | 2: t1+1
950 o | 2: t1+1
951 |/
951 |/
952 o 1: t1+0
952 o 1: t1+0
953 |
953 |
954 o 0: null+1
954 o 0: null+1
955
955
956
956
957 One ancestor tag: closest wins:
957 One ancestor tag: closest wins:
958
958
959 $ hg tag -r 2 -m t2 -d '7 0' t2
959 $ hg tag -r 2 -m t2 -d '7 0' t2
960 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
960 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
961 @ 7: t2+3
961 @ 7: t2+3
962 |
962 |
963 o 6: t2+2
963 o 6: t2+2
964 |
964 |
965 o 5: t2+1
965 o 5: t2+1
966 |\
966 |\
967 | o 4: t1+2
967 | o 4: t1+2
968 | |
968 | |
969 | o 3: t1+1
969 | o 3: t1+1
970 | |
970 | |
971 o | 2: t2+0
971 o | 2: t2+0
972 |/
972 |/
973 o 1: t1+0
973 o 1: t1+0
974 |
974 |
975 o 0: null+1
975 o 0: null+1
976
976
977
977
978 Two branch tags: more recent wins if same number of changes:
978 Two branch tags: more recent wins if same number of changes:
979
979
980 $ hg tag -r 3 -m t3 -d '8 0' t3
980 $ hg tag -r 3 -m t3 -d '8 0' t3
981 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
981 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
982 @ 8: t3+5
982 @ 8: t3+5
983 |
983 |
984 o 7: t3+4
984 o 7: t3+4
985 |
985 |
986 o 6: t3+3
986 o 6: t3+3
987 |
987 |
988 o 5: t3+2
988 o 5: t3+2
989 |\
989 |\
990 | o 4: t3+1
990 | o 4: t3+1
991 | |
991 | |
992 | o 3: t3+0
992 | o 3: t3+0
993 | |
993 | |
994 o | 2: t2+0
994 o | 2: t2+0
995 |/
995 |/
996 o 1: t1+0
996 o 1: t1+0
997 |
997 |
998 o 0: null+1
998 o 0: null+1
999
999
1000
1000
1001 Two branch tags: fewest changes wins:
1001 Two branch tags: fewest changes wins:
1002
1002
1003 $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter
1003 $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter
1004 $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1004 $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1005 @ 9: t4+5,6
1005 @ 9: t4+5,6
1006 |
1006 |
1007 o 8: t4+4,5
1007 o 8: t4+4,5
1008 |
1008 |
1009 o 7: t4+3,4
1009 o 7: t4+3,4
1010 |
1010 |
1011 o 6: t4+2,3
1011 o 6: t4+2,3
1012 |
1012 |
1013 o 5: t4+1,2
1013 o 5: t4+1,2
1014 |\
1014 |\
1015 | o 4: t4+0,0
1015 | o 4: t4+0,0
1016 | |
1016 | |
1017 | o 3: t3+0,0
1017 | o 3: t3+0,0
1018 | |
1018 | |
1019 o | 2: t2+0,0
1019 o | 2: t2+0,0
1020 |/
1020 |/
1021 o 1: t1+0,0
1021 o 1: t1+0,0
1022 |
1022 |
1023 o 0: null+1,1
1023 o 0: null+1,1
1024
1024
1025
1025
1026 Merged tag overrides:
1026 Merged tag overrides:
1027
1027
1028 $ hg tag -r 5 -m t5 -d '9 0' t5
1028 $ hg tag -r 5 -m t5 -d '9 0' t5
1029 $ hg tag -r 3 -m at3 -d '10 0' at3
1029 $ hg tag -r 3 -m at3 -d '10 0' at3
1030 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
1030 $ hg log -G --template '{rev}: {latesttag}+{latesttagdistance}\n'
1031 @ 11: t5+6
1031 @ 11: t5+6
1032 |
1032 |
1033 o 10: t5+5
1033 o 10: t5+5
1034 |
1034 |
1035 o 9: t5+4
1035 o 9: t5+4
1036 |
1036 |
1037 o 8: t5+3
1037 o 8: t5+3
1038 |
1038 |
1039 o 7: t5+2
1039 o 7: t5+2
1040 |
1040 |
1041 o 6: t5+1
1041 o 6: t5+1
1042 |
1042 |
1043 o 5: t5+0
1043 o 5: t5+0
1044 |\
1044 |\
1045 | o 4: t4+0
1045 | o 4: t4+0
1046 | |
1046 | |
1047 | o 3: at3:t3+0
1047 | o 3: at3:t3+0
1048 | |
1048 | |
1049 o | 2: t2+0
1049 o | 2: t2+0
1050 |/
1050 |/
1051 o 1: t1+0
1051 o 1: t1+0
1052 |
1052 |
1053 o 0: null+1
1053 o 0: null+1
1054
1054
1055
1055
1056 $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1056 $ hg log -G --template "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1057 @ 11: t5+6,6
1057 @ 11: t5+6,6
1058 |
1058 |
1059 o 10: t5+5,5
1059 o 10: t5+5,5
1060 |
1060 |
1061 o 9: t5+4,4
1061 o 9: t5+4,4
1062 |
1062 |
1063 o 8: t5+3,3
1063 o 8: t5+3,3
1064 |
1064 |
1065 o 7: t5+2,2
1065 o 7: t5+2,2
1066 |
1066 |
1067 o 6: t5+1,1
1067 o 6: t5+1,1
1068 |
1068 |
1069 o 5: t5+0,0
1069 o 5: t5+0,0
1070 |\
1070 |\
1071 | o 4: t4+0,0
1071 | o 4: t4+0,0
1072 | |
1072 | |
1073 | o 3: at3+0,0 t3+0,0
1073 | o 3: at3+0,0 t3+0,0
1074 | |
1074 | |
1075 o | 2: t2+0,0
1075 o | 2: t2+0,0
1076 |/
1076 |/
1077 o 1: t1+0,0
1077 o 1: t1+0,0
1078 |
1078 |
1079 o 0: null+1,1
1079 o 0: null+1,1
1080
1080
1081
1081
1082 Tags of working-directory parents (issue6055):
1082 Tags of working-directory parents (issue6055):
1083
1083
1084 $ hg update -q 3
1084 $ hg update -q 3
1085 $ echo a > head3
1085 $ echo a > head3
1086 $ hg ci -qAm h3a
1086 $ hg ci -qAm h3a
1087 $ hg merge -q 2
1087 $ hg merge -q 2
1088 $ hg log -Gr'::wdir()' -T "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1088 $ hg log -Gr'::wdir()' -T "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1089 o 2147483647: at3+2,3 t3+2,3
1089 o 2147483647: at3+2,3 t3+2,3
1090 |\
1090 |\
1091 | @ 12: at3+1,1 t3+1,1
1091 | @ 12: at3+1,1 t3+1,1
1092 | |
1092 | |
1093 | o 3: at3+0,0 t3+0,0
1093 | o 3: at3+0,0 t3+0,0
1094 | |
1094 | |
1095 @ | 2: t2+0,0
1095 @ | 2: t2+0,0
1096 |/
1096 |/
1097 o 1: t1+0,0
1097 o 1: t1+0,0
1098 |
1098 |
1099 o 0: null+1,1
1099 o 0: null+1,1
1100
1100
1101
1101
1102 $ hg ci -m merge
1102 $ hg ci -m merge
1103 $ hg log -Gr'::.' -T "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1103 $ hg log -Gr'::.' -T "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
1104 @ 13: at3+2,3 t3+2,3
1104 @ 13: at3+2,3 t3+2,3
1105 |\
1105 |\
1106 | o 12: at3+1,1 t3+1,1
1106 | o 12: at3+1,1 t3+1,1
1107 | |
1107 | |
1108 | o 3: at3+0,0 t3+0,0
1108 | o 3: at3+0,0 t3+0,0
1109 | |
1109 | |
1110 o | 2: t2+0,0
1110 o | 2: t2+0,0
1111 |/
1111 |/
1112 o 1: t1+0,0
1112 o 1: t1+0,0
1113 |
1113 |
1114 o 0: null+1,1
1114 o 0: null+1,1
1115
1115
1116
1116
1117 $ cd ..
1117 $ cd ..
1118
1118
1119 Set up repository containing template fragments in commit metadata:
1119 Set up repository containing template fragments in commit metadata:
1120
1120
1121 $ hg init r
1121 $ hg init r
1122 $ cd r
1122 $ cd r
1123 $ echo a > a
1123 $ echo a > a
1124 $ hg ci -Am '{rev}'
1124 $ hg ci -Am '{rev}'
1125 adding a
1125 adding a
1126
1126
1127 $ hg branch -q 'text.{rev}'
1127 $ hg branch -q 'text.{rev}'
1128 $ echo aa >> aa
1128 $ echo aa >> aa
1129 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
1129 $ hg ci -u '{node|short}' -m 'desc to be wrapped desc to be wrapped'
1130
1130
1131 Test termwidth:
1131 Test termwidth:
1132
1132
1133 $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}'
1133 $ COLUMNS=25 hg log -l1 --template '{fill(desc, termwidth, "{node|short}:", "termwidth.{rev}:")}'
1134 bcc7ff960b8e:desc to be
1134 bcc7ff960b8e:desc to be
1135 termwidth.1:wrapped desc
1135 termwidth.1:wrapped desc
1136 termwidth.1:to be wrapped (no-eol)
1136 termwidth.1:to be wrapped (no-eol)
1137
1137
1138 Just one more commit:
1138 Just one more commit:
1139
1139
1140 $ echo b > b
1140 $ echo b > b
1141 $ hg ci -qAm b
1141 $ hg ci -qAm b
1142
1142
1143 Test 'originalnode'
1143 Test 'originalnode'
1144
1144
1145 $ hg log -r 1 -T '{revset("null") % "{node|short} {originalnode|short}"}\n'
1145 $ hg log -r 1 -T '{revset("null") % "{node|short} {originalnode|short}"}\n'
1146 000000000000 bcc7ff960b8e
1146 000000000000 bcc7ff960b8e
1147 $ hg log -r 0 -T '{manifest % "{node} {originalnode}"}\n'
1147 $ hg log -r 0 -T '{manifest % "{node} {originalnode}"}\n'
1148 a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 f7769ec2ab975ad19684098ad1ffd9b81ecc71a1
1148 a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 f7769ec2ab975ad19684098ad1ffd9b81ecc71a1
1149
1149
1150 Test active bookmark templating
1150 Test active bookmark templating
1151
1151
1152 $ hg book foo
1152 $ hg book foo
1153 $ hg book bar
1153 $ hg book bar
1154 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
1154 $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
1155 2 bar* foo
1155 2 bar* foo
1156 1
1156 1
1157 0
1157 0
1158 $ hg log --template "{rev} {activebookmark}\n"
1158 $ hg log --template "{rev} {activebookmark}\n"
1159 2 bar
1159 2 bar
1160 1
1160 1
1161 0
1161 0
1162 $ hg bookmarks --inactive bar
1162 $ hg bookmarks --inactive bar
1163 $ hg log --template "{rev} {activebookmark}\n"
1163 $ hg log --template "{rev} {activebookmark}\n"
1164 2
1164 2
1165 1
1165 1
1166 0
1166 0
1167 $ hg book -r1 baz
1167 $ hg book -r1 baz
1168 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
1168 $ hg log --template "{rev} {join(bookmarks, ' ')}\n"
1169 2 bar foo
1169 2 bar foo
1170 1 baz
1170 1 baz
1171 0
1171 0
1172 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
1172 $ hg log --template "{rev} {ifcontains('foo', bookmarks, 't', 'f')}\n"
1173 2 t
1173 2 t
1174 1 f
1174 1 f
1175 0 f
1175 0 f
1176
1176
1177 Test namespaces dict
1177 Test namespaces dict
1178
1178
1179 $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n'
1179 $ hg --config extensions.revnamesext=$TESTDIR/revnamesext.py log -T '{rev}\n{namespaces % " {namespace} color={colorname} builtin={builtin}\n {join(names, ",")}\n"}\n'
1180 2
1180 2
1181 bookmarks color=bookmark builtin=True
1181 bookmarks color=bookmark builtin=True
1182 bar,foo
1182 bar,foo
1183 tags color=tag builtin=True
1183 tags color=tag builtin=True
1184 tip
1184 tip
1185 branches color=branch builtin=True
1185 branches color=branch builtin=True
1186 text.{rev}
1186 text.{rev}
1187 revnames color=revname builtin=False
1187 revnames color=revname builtin=False
1188 r2
1188 r2
1189
1189
1190 1
1190 1
1191 bookmarks color=bookmark builtin=True
1191 bookmarks color=bookmark builtin=True
1192 baz
1192 baz
1193 tags color=tag builtin=True
1193 tags color=tag builtin=True
1194
1194
1195 branches color=branch builtin=True
1195 branches color=branch builtin=True
1196 text.{rev}
1196 text.{rev}
1197 revnames color=revname builtin=False
1197 revnames color=revname builtin=False
1198 r1
1198 r1
1199
1199
1200 0
1200 0
1201 bookmarks color=bookmark builtin=True
1201 bookmarks color=bookmark builtin=True
1202
1202
1203 tags color=tag builtin=True
1203 tags color=tag builtin=True
1204
1204
1205 branches color=branch builtin=True
1205 branches color=branch builtin=True
1206 default
1206 default
1207 revnames color=revname builtin=False
1207 revnames color=revname builtin=False
1208 r0
1208 r0
1209
1209
1210 $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
1210 $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
1211 bookmarks: bar foo
1211 bookmarks: bar foo
1212 tags: tip
1212 tags: tip
1213 branches: text.{rev}
1213 branches: text.{rev}
1214 $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
1214 $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
1215 bookmarks:
1215 bookmarks:
1216 bar
1216 bar
1217 foo
1217 foo
1218 tags:
1218 tags:
1219 tip
1219 tip
1220 branches:
1220 branches:
1221 text.{rev}
1221 text.{rev}
1222 $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
1222 $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
1223 bar
1223 bar
1224 foo
1224 foo
1225 $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}'
1225 $ hg log -r2 -T '{namespaces.bookmarks % "{bookmark}\n"}'
1226 bar
1226 bar
1227 foo
1227 foo
1228
1228
1229 $ cd ..
1229 $ cd ..
1230
1230
1231 Test 'graphwidth' in 'hg log' on various topologies. The key here is that the
1231 Test 'graphwidth' in 'hg log' on various topologies. The key here is that the
1232 printed graphwidths 3, 5, 7, etc. should all line up in their respective
1232 printed graphwidths 3, 5, 7, etc. should all line up in their respective
1233 columns. We don't care about other aspects of the graph rendering here.
1233 columns. We don't care about other aspects of the graph rendering here.
1234
1234
1235 $ hg init graphwidth
1235 $ hg init graphwidth
1236 $ cd graphwidth
1236 $ cd graphwidth
1237
1237
1238 $ wrappabletext="a a a a a a a a a a a a"
1238 $ wrappabletext="a a a a a a a a a a a a"
1239
1239
1240 $ printf "first\n" > file
1240 $ printf "first\n" > file
1241 $ hg add file
1241 $ hg add file
1242 $ hg commit -m "$wrappabletext"
1242 $ hg commit -m "$wrappabletext"
1243
1243
1244 $ printf "first\nsecond\n" > file
1244 $ printf "first\nsecond\n" > file
1245 $ hg commit -m "$wrappabletext"
1245 $ hg commit -m "$wrappabletext"
1246
1246
1247 $ hg checkout 0
1247 $ hg checkout 0
1248 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1248 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1249 $ printf "third\nfirst\n" > file
1249 $ printf "third\nfirst\n" > file
1250 $ hg commit -m "$wrappabletext"
1250 $ hg commit -m "$wrappabletext"
1251 created new head
1251 created new head
1252
1252
1253 $ hg merge
1253 $ hg merge
1254 merging file
1254 merging file
1255 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1255 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1256 (branch merge, don't forget to commit)
1256 (branch merge, don't forget to commit)
1257
1257
1258 $ hg log --graph -T "{graphwidth}"
1258 $ hg log --graph -T "{graphwidth}"
1259 @ 3
1259 @ 3
1260 |
1260 |
1261 | @ 5
1261 | @ 5
1262 |/
1262 |/
1263 o 3
1263 o 3
1264
1264
1265 $ hg commit -m "$wrappabletext"
1265 $ hg commit -m "$wrappabletext"
1266
1266
1267 $ hg log --graph -T "{graphwidth}"
1267 $ hg log --graph -T "{graphwidth}"
1268 @ 5
1268 @ 5
1269 |\
1269 |\
1270 | o 5
1270 | o 5
1271 | |
1271 | |
1272 o | 5
1272 o | 5
1273 |/
1273 |/
1274 o 3
1274 o 3
1275
1275
1276
1276
1277 $ hg checkout 0
1277 $ hg checkout 0
1278 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1278 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1279 $ printf "third\nfirst\nsecond\n" > file
1279 $ printf "third\nfirst\nsecond\n" > file
1280 $ hg commit -m "$wrappabletext"
1280 $ hg commit -m "$wrappabletext"
1281 created new head
1281 created new head
1282
1282
1283 $ hg log --graph -T "{graphwidth}"
1283 $ hg log --graph -T "{graphwidth}"
1284 @ 3
1284 @ 3
1285 |
1285 |
1286 | o 7
1286 | o 7
1287 | |\
1287 | |\
1288 +---o 7
1288 +---o 7
1289 | |
1289 | |
1290 | o 5
1290 | o 5
1291 |/
1291 |/
1292 o 3
1292 o 3
1293
1293
1294
1294
1295 $ hg log --graph -T "{graphwidth}" -r 3
1295 $ hg log --graph -T "{graphwidth}" -r 3
1296 o 5
1296 o 5
1297 |\
1297 |\
1298 ~ ~
1298 ~ ~
1299
1299
1300 $ hg log --graph -T "{graphwidth}" -r 1
1300 $ hg log --graph -T "{graphwidth}" -r 1
1301 o 3
1301 o 3
1302 |
1302 |
1303 ~
1303 ~
1304
1304
1305 $ hg merge
1305 $ hg merge
1306 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1306 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1307 (branch merge, don't forget to commit)
1307 (branch merge, don't forget to commit)
1308 $ hg commit -m "$wrappabletext"
1308 $ hg commit -m "$wrappabletext"
1309
1309
1310 $ printf "seventh\n" >> file
1310 $ printf "seventh\n" >> file
1311 $ hg commit -m "$wrappabletext"
1311 $ hg commit -m "$wrappabletext"
1312
1312
1313 $ hg log --graph -T "{graphwidth}"
1313 $ hg log --graph -T "{graphwidth}"
1314 @ 3
1314 @ 3
1315 |
1315 |
1316 o 5
1316 o 5
1317 |\
1317 |\
1318 | o 5
1318 | o 5
1319 | |
1319 | |
1320 o | 7
1320 o | 7
1321 |\ \
1321 |\ \
1322 | o | 7
1322 | o | 7
1323 | |/
1323 | |/
1324 o / 5
1324 o / 5
1325 |/
1325 |/
1326 o 3
1326 o 3
1327
1327
1328
1328
1329 The point of graphwidth is to allow wrapping that accounts for the space taken
1329 The point of graphwidth is to allow wrapping that accounts for the space taken
1330 by the graph.
1330 by the graph.
1331
1331
1332 $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}"
1332 $ COLUMNS=10 hg log --graph -T "{fill(desc, termwidth - graphwidth)}"
1333 @ a a a a
1333 @ a a a a
1334 | a a a a
1334 | a a a a
1335 | a a a a
1335 | a a a a
1336 o a a a
1336 o a a a
1337 |\ a a a
1337 |\ a a a
1338 | | a a a
1338 | | a a a
1339 | | a a a
1339 | | a a a
1340 | o a a a
1340 | o a a a
1341 | | a a a
1341 | | a a a
1342 | | a a a
1342 | | a a a
1343 | | a a a
1343 | | a a a
1344 o | a a
1344 o | a a
1345 |\ \ a a
1345 |\ \ a a
1346 | | | a a
1346 | | | a a
1347 | | | a a
1347 | | | a a
1348 | | | a a
1348 | | | a a
1349 | | | a a
1349 | | | a a
1350 | o | a a
1350 | o | a a
1351 | |/ a a
1351 | |/ a a
1352 | | a a
1352 | | a a
1353 | | a a
1353 | | a a
1354 | | a a
1354 | | a a
1355 | | a a
1355 | | a a
1356 o | a a a
1356 o | a a a
1357 |/ a a a
1357 |/ a a a
1358 | a a a
1358 | a a a
1359 | a a a
1359 | a a a
1360 o a a a a
1360 o a a a a
1361 a a a a
1361 a a a a
1362 a a a a
1362 a a a a
1363
1363
1364 Something tricky happens when there are elided nodes; the next drawn row of
1364 Something tricky happens when there are elided nodes; the next drawn row of
1365 edges can be more than one column wider, but the graph width only increases by
1365 edges can be more than one column wider, but the graph width only increases by
1366 one column. The remaining columns are added in between the nodes.
1366 one column. The remaining columns are added in between the nodes.
1367
1367
1368 $ hg log --graph -T "{graphwidth}" -r "0|2|4|5"
1368 $ hg log --graph -T "{graphwidth}" -r "0|2|4|5"
1369 o 5
1369 o 5
1370 |\
1370 |\
1371 | \
1371 | \
1372 | :\
1372 | :\
1373 o : : 7
1373 o : : 7
1374 :/ /
1374 :/ /
1375 : o 5
1375 : o 5
1376 :/
1376 :/
1377 o 3
1377 o 3
1378
1378
1379
1379
1380 $ cd ..
1380 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now