##// END OF EJS Templates
graphmod: remove support for graph lines mixing parent/grandparent styles (BC)...
Kyle Lippincott -
r42498:264a2cbb default
parent child Browse files
Show More
@@ -1,495 +1,479 b''
1 1 # Revision graph generator for Mercurial
2 2 #
3 3 # Copyright 2008 Dirkjan Ochtman <dirkjan@ochtman.nl>
4 4 # Copyright 2007 Joel Rosdahl <joel@rosdahl.net>
5 5 #
6 6 # This software may be used and distributed according to the terms of the
7 7 # GNU General Public License version 2 or any later version.
8 8
9 9 """supports walking the history as DAGs suitable for graphical output
10 10
11 11 The most basic format we use is that of::
12 12
13 13 (id, type, data, [parentids])
14 14
15 15 The node and parent ids are arbitrary integers which identify a node in the
16 16 context of the graph returned. Type is a constant specifying the node type.
17 17 Data depends on type.
18 18 """
19 19
20 20 from __future__ import absolute_import
21 21
22 22 from .node import nullrev
23 23 from . import (
24 24 dagop,
25 25 pycompat,
26 26 smartset,
27 27 util,
28 28 )
29 29
30 30 CHANGESET = 'C'
31 31 PARENT = 'P'
32 32 GRANDPARENT = 'G'
33 33 MISSINGPARENT = 'M'
34 34 # Style of line to draw. None signals a line that ends and is removed at this
35 35 # point. A number prefix means only the last N characters of the current block
36 36 # will use that style, the rest will use the PARENT style. Add a - sign
37 37 # (so making N negative) and all but the first N characters use that style.
38 38 EDGES = {PARENT: '|', GRANDPARENT: ':', MISSINGPARENT: None}
39 39
40 40 def dagwalker(repo, revs):
41 41 """cset DAG generator yielding (id, CHANGESET, ctx, [parentinfo]) tuples
42 42
43 43 This generator function walks through revisions (which should be ordered
44 44 from bigger to lower). It returns a tuple for each node.
45 45
46 46 Each parentinfo entry is a tuple with (edgetype, parentid), where edgetype
47 47 is one of PARENT, GRANDPARENT or MISSINGPARENT. The node and parent ids
48 48 are arbitrary integers which identify a node in the context of the graph
49 49 returned.
50 50
51 51 """
52 52 gpcache = {}
53 53
54 54 for rev in revs:
55 55 ctx = repo[rev]
56 56 # partition into parents in the rev set and missing parents, then
57 57 # augment the lists with markers, to inform graph drawing code about
58 58 # what kind of edge to draw between nodes.
59 59 pset = set(p.rev() for p in ctx.parents() if p.rev() in revs)
60 60 mpars = [p.rev() for p in ctx.parents()
61 61 if p.rev() != nullrev and p.rev() not in pset]
62 62 parents = [(PARENT, p) for p in sorted(pset)]
63 63
64 64 for mpar in mpars:
65 65 gp = gpcache.get(mpar)
66 66 if gp is None:
67 67 # precompute slow query as we know reachableroots() goes
68 68 # through all revs (issue4782)
69 69 if not isinstance(revs, smartset.baseset):
70 70 revs = smartset.baseset(revs)
71 71 gp = gpcache[mpar] = sorted(set(dagop.reachableroots(
72 72 repo, revs, [mpar])))
73 73 if not gp:
74 74 parents.append((MISSINGPARENT, mpar))
75 75 pset.add(mpar)
76 76 else:
77 77 parents.extend((GRANDPARENT, g) for g in gp if g not in pset)
78 78 pset.update(gp)
79 79
80 80 yield (ctx.rev(), CHANGESET, ctx, parents)
81 81
82 82 def nodes(repo, nodes):
83 83 """cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples
84 84
85 85 This generator function walks the given nodes. It only returns parents
86 86 that are in nodes, too.
87 87 """
88 88 include = set(nodes)
89 89 for node in nodes:
90 90 ctx = repo[node]
91 91 parents = set((PARENT, p.rev()) for p in ctx.parents()
92 92 if p.node() in include)
93 93 yield (ctx.rev(), CHANGESET, ctx, sorted(parents))
94 94
95 95 def colored(dag, repo):
96 96 """annotates a DAG with colored edge information
97 97
98 98 For each DAG node this function emits tuples::
99 99
100 100 (id, type, data, (col, color), [(col, nextcol, color)])
101 101
102 102 with the following new elements:
103 103
104 104 - Tuple (col, color) with column and color index for the current node
105 105 - A list of tuples indicating the edges between the current node and its
106 106 parents.
107 107 """
108 108 seen = []
109 109 colors = {}
110 110 newcolor = 1
111 111 config = {}
112 112
113 113 for key, val in repo.ui.configitems('graph'):
114 114 if '.' in key:
115 115 branch, setting = key.rsplit('.', 1)
116 116 # Validation
117 117 if setting == "width" and val.isdigit():
118 118 config.setdefault(branch, {})[setting] = int(val)
119 119 elif setting == "color" and val.isalnum():
120 120 config.setdefault(branch, {})[setting] = val
121 121
122 122 if config:
123 123 getconf = util.lrucachefunc(
124 124 lambda rev: config.get(repo[rev].branch(), {}))
125 125 else:
126 126 getconf = lambda rev: {}
127 127
128 128 for (cur, type, data, parents) in dag:
129 129
130 130 # Compute seen and next
131 131 if cur not in seen:
132 132 seen.append(cur) # new head
133 133 colors[cur] = newcolor
134 134 newcolor += 1
135 135
136 136 col = seen.index(cur)
137 137 color = colors.pop(cur)
138 138 next = seen[:]
139 139
140 140 # Add parents to next
141 141 addparents = [p for pt, p in parents if p not in next]
142 142 next[col:col + 1] = addparents
143 143
144 144 # Set colors for the parents
145 145 for i, p in enumerate(addparents):
146 146 if not i:
147 147 colors[p] = color
148 148 else:
149 149 colors[p] = newcolor
150 150 newcolor += 1
151 151
152 152 # Add edges to the graph
153 153 edges = []
154 154 for ecol, eid in enumerate(seen):
155 155 if eid in next:
156 156 bconf = getconf(eid)
157 157 edges.append((
158 158 ecol, next.index(eid), colors[eid],
159 159 bconf.get('width', -1),
160 160 bconf.get('color', '')))
161 161 elif eid == cur:
162 162 for ptype, p in parents:
163 163 bconf = getconf(p)
164 164 edges.append((
165 165 ecol, next.index(p), color,
166 166 bconf.get('width', -1),
167 167 bconf.get('color', '')))
168 168
169 169 # Yield and move on
170 170 yield (cur, type, data, (col, color), edges)
171 171 seen = next
172 172
173 173 def asciiedges(type, char, state, rev, parents):
174 174 """adds edge info to changelog DAG walk suitable for ascii()"""
175 175 seen = state['seen']
176 176 if rev not in seen:
177 177 seen.append(rev)
178 178 nodeidx = seen.index(rev)
179 179
180 180 knownparents = []
181 181 newparents = []
182 182 for ptype, parent in parents:
183 183 if parent == rev:
184 184 # self reference (should only be seen in null rev)
185 185 continue
186 186 if parent in seen:
187 187 knownparents.append(parent)
188 188 else:
189 189 newparents.append(parent)
190 190 state['edges'][parent] = state['styles'].get(ptype, '|')
191 191
192 192 ncols = len(seen)
193 193 width = 1 + ncols * 2
194 194 nextseen = seen[:]
195 195 nextseen[nodeidx:nodeidx + 1] = newparents
196 196 edges = [(nodeidx, nextseen.index(p)) for p in knownparents]
197 197
198 198 seen[:] = nextseen
199 199 while len(newparents) > 2:
200 200 # ascii() only knows how to add or remove a single column between two
201 201 # calls. Nodes with more than two parents break this constraint so we
202 202 # introduce intermediate expansion lines to grow the active node list
203 203 # slowly.
204 204 edges.append((nodeidx, nodeidx))
205 205 edges.append((nodeidx, nodeidx + 1))
206 206 nmorecols = 1
207 207 width += 2
208 208 yield (type, char, width, (nodeidx, edges, ncols, nmorecols))
209 209 char = '\\'
210 210 nodeidx += 1
211 211 ncols += 1
212 212 edges = []
213 213 del newparents[0]
214 214
215 215 if len(newparents) > 0:
216 216 edges.append((nodeidx, nodeidx))
217 217 if len(newparents) > 1:
218 218 edges.append((nodeidx, nodeidx + 1))
219 219 nmorecols = len(nextseen) - ncols
220 220 if nmorecols > 0:
221 221 width += 2
222 222 # remove current node from edge characters, no longer needed
223 223 state['edges'].pop(rev, None)
224 224 yield (type, char, width, (nodeidx, edges, ncols, nmorecols))
225 225
226 226 def _fixlongrightedges(edges):
227 227 for (i, (start, end)) in enumerate(edges):
228 228 if end > start:
229 229 edges[i] = (start, end + 1)
230 230
231 231 def _getnodelineedgestail(
232 232 echars, idx, pidx, ncols, coldiff, pdiff, fix_tail):
233 233 if fix_tail and coldiff == pdiff and coldiff != 0:
234 234 # Still going in the same non-vertical direction.
235 235 if coldiff == -1:
236 236 start = max(idx + 1, pidx)
237 237 tail = echars[idx * 2:(start - 1) * 2]
238 238 tail.extend(["/", " "] * (ncols - start))
239 239 return tail
240 240 else:
241 241 return ["\\", " "] * (ncols - idx - 1)
242 242 else:
243 243 remainder = (ncols - idx - 1)
244 244 return echars[-(remainder * 2):] if remainder > 0 else []
245 245
246 246 def _drawedges(echars, edges, nodeline, interline):
247 247 for (start, end) in edges:
248 248 if start == end + 1:
249 249 interline[2 * end + 1] = "/"
250 250 elif start == end - 1:
251 251 interline[2 * start + 1] = "\\"
252 252 elif start == end:
253 253 interline[2 * start] = echars[2 * start]
254 254 else:
255 255 if 2 * end >= len(nodeline):
256 256 continue
257 257 nodeline[2 * end] = "+"
258 258 if start > end:
259 259 (start, end) = (end, start)
260 260 for i in range(2 * start + 1, 2 * end):
261 261 if nodeline[i] != "+":
262 262 nodeline[i] = "-"
263 263
264 264 def _getpaddingline(echars, idx, ncols, edges):
265 265 # all edges up to the current node
266 266 line = echars[:idx * 2]
267 267 # an edge for the current node, if there is one
268 268 if (idx, idx - 1) in edges or (idx, idx) in edges:
269 269 # (idx, idx - 1) (idx, idx)
270 270 # | | | | | | | |
271 271 # +---o | | o---+
272 272 # | | X | | X | |
273 273 # | |/ / | |/ /
274 274 # | | | | | |
275 275 line.extend(echars[idx * 2:(idx + 1) * 2])
276 276 else:
277 277 line.extend([' ', ' '])
278 278 # all edges to the right of the current node
279 279 remainder = ncols - idx - 1
280 280 if remainder > 0:
281 281 line.extend(echars[-(remainder * 2):])
282 282 return line
283 283
284 284 def _drawendinglines(lines, extra, edgemap, seen, state):
285 285 """Draw ending lines for missing parent edges
286 286
287 287 None indicates an edge that ends at between this node and the next
288 288 Replace with a short line ending in ~ and add / lines to any edges to
289 289 the right.
290 290
291 291 """
292 292 if None not in edgemap.values():
293 293 return
294 294
295 295 # Check for more edges to the right of our ending edges.
296 296 # We need enough space to draw adjustment lines for these.
297 297 edgechars = extra[::2]
298 298 while edgechars and edgechars[-1] is None:
299 299 edgechars.pop()
300 300 shift_size = max((edgechars.count(None) * 2) - 1, 0)
301 301 minlines = 3 if not state['graphshorten'] else 2
302 302 while len(lines) < minlines + shift_size:
303 303 lines.append(extra[:])
304 304
305 305 if shift_size:
306 306 empties = []
307 307 toshift = []
308 308 first_empty = extra.index(None)
309 309 for i, c in enumerate(extra[first_empty::2], first_empty // 2):
310 310 if c is None:
311 311 empties.append(i * 2)
312 312 else:
313 313 toshift.append(i * 2)
314 314 targets = list(range(first_empty, first_empty + len(toshift) * 2, 2))
315 315 positions = toshift[:]
316 316 for line in lines[-shift_size:]:
317 317 line[first_empty:] = [' '] * (len(line) - first_empty)
318 318 for i in range(len(positions)):
319 319 pos = positions[i] - 1
320 320 positions[i] = max(pos, targets[i])
321 321 line[pos] = '/' if pos > targets[i] else extra[toshift[i]]
322 322
323 323 map = {1: '|', 2: '~'} if not state['graphshorten'] else {1: '~'}
324 324 for i, line in enumerate(lines):
325 325 if None not in line:
326 326 continue
327 327 line[:] = [c or map.get(i, ' ') for c in line]
328 328
329 329 # remove edges that ended
330 330 remove = [p for p, c in edgemap.items() if c is None]
331 331 for parent in remove:
332 332 del edgemap[parent]
333 333 seen.remove(parent)
334 334
335 335 def asciistate():
336 336 """returns the initial value for the "state" argument to ascii()"""
337 337 return {
338 338 'seen': [],
339 339 'edges': {},
340 340 'lastcoldiff': 0,
341 341 'lastindex': 0,
342 342 'styles': EDGES.copy(),
343 343 'graphshorten': False,
344 344 }
345 345
346 346 def outputgraph(ui, graph):
347 347 """outputs an ASCII graph of a DAG
348 348
349 349 this is a helper function for 'ascii' below.
350 350
351 351 takes the following arguments:
352 352
353 353 - ui to write to
354 354 - graph data: list of { graph nodes/edges, text }
355 355
356 356 this function can be monkey-patched by extensions to alter graph display
357 357 without needing to mimic all of the edge-fixup logic in ascii()
358 358 """
359 359 for (ln, logstr) in graph:
360 360 ui.write((ln + logstr).rstrip() + "\n")
361 361
362 362 def ascii(ui, state, type, char, text, coldata):
363 363 """prints an ASCII graph of the DAG
364 364
365 365 takes the following arguments (one call per node in the graph):
366 366
367 367 - ui to write to
368 368 - Somewhere to keep the needed state in (init to asciistate())
369 369 - Column of the current node in the set of ongoing edges.
370 370 - Type indicator of node data, usually 'C' for changesets.
371 371 - Payload: (char, lines):
372 372 - Character to use as node's symbol.
373 373 - List of lines to display as the node's text.
374 374 - Edges; a list of (col, next_col) indicating the edges between
375 375 the current node and its parents.
376 376 - Number of columns (ongoing edges) in the current revision.
377 377 - The difference between the number of columns (ongoing edges)
378 378 in the next revision and the number of columns (ongoing edges)
379 379 in the current revision. That is: -1 means one column removed;
380 380 0 means no columns added or removed; 1 means one column added.
381 381 """
382 382 idx, edges, ncols, coldiff = coldata
383 383 assert -2 < coldiff < 2
384 384
385 385 edgemap, seen = state['edges'], state['seen']
386 386 # Be tolerant of history issues; make sure we have at least ncols + coldiff
387 387 # elements to work with. See test-glog.t for broken history test cases.
388 388 echars = [c for p in seen for c in (edgemap.get(p, '|'), ' ')]
389 389 echars.extend(('|', ' ') * max(ncols + coldiff - len(seen), 0))
390 390
391 391 if coldiff == -1:
392 392 # Transform
393 393 #
394 394 # | | | | | |
395 395 # o | | into o---+
396 396 # |X / |/ /
397 397 # | | | |
398 398 _fixlongrightedges(edges)
399 399
400 400 # add_padding_line says whether to rewrite
401 401 #
402 402 # | | | | | | | |
403 403 # | o---+ into | o---+
404 404 # | / / | | | # <--- padding line
405 405 # o | | | / /
406 406 # o | |
407 407 add_padding_line = (len(text) > 2 and coldiff == -1 and
408 408 [x for (x, y) in edges if x + 1 < y])
409 409
410 410 # fix_nodeline_tail says whether to rewrite
411 411 #
412 412 # | | o | | | | o | |
413 413 # | | |/ / | | |/ /
414 414 # | o | | into | o / / # <--- fixed nodeline tail
415 415 # | |/ / | |/ /
416 416 # o | | o | |
417 417 fix_nodeline_tail = len(text) <= 2 and not add_padding_line
418 418
419 419 # nodeline is the line containing the node character (typically o)
420 420 nodeline = echars[:idx * 2]
421 421 nodeline.extend([char, " "])
422 422
423 423 nodeline.extend(
424 424 _getnodelineedgestail(
425 425 echars, idx, state['lastindex'], ncols, coldiff,
426 426 state['lastcoldiff'], fix_nodeline_tail))
427 427
428 428 # shift_interline is the line containing the non-vertical
429 429 # edges between this entry and the next
430 430 shift_interline = echars[:idx * 2]
431 431 for i in pycompat.xrange(2 + coldiff):
432 432 shift_interline.append(' ')
433 433 count = ncols - idx - 1
434 434 if coldiff == -1:
435 435 for i in pycompat.xrange(count):
436 436 shift_interline.extend(['/', ' '])
437 437 elif coldiff == 0:
438 438 shift_interline.extend(echars[(idx + 1) * 2:ncols * 2])
439 439 else:
440 440 for i in pycompat.xrange(count):
441 441 shift_interline.extend(['\\', ' '])
442 442
443 443 # draw edges from the current node to its parents
444 444 _drawedges(echars, edges, nodeline, shift_interline)
445 445
446 446 # lines is the list of all graph lines to print
447 447 lines = [nodeline]
448 448 if add_padding_line:
449 449 lines.append(_getpaddingline(echars, idx, ncols, edges))
450 450
451 451 # If 'graphshorten' config, only draw shift_interline
452 452 # when there is any non vertical flow in graph.
453 453 if state['graphshorten']:
454 454 if any(c in br'\/' for c in shift_interline if c):
455 455 lines.append(shift_interline)
456 456 # Else, no 'graphshorten' config so draw shift_interline.
457 457 else:
458 458 lines.append(shift_interline)
459 459
460 460 # make sure that there are as many graph lines as there are
461 461 # log strings
462 462 extra_interline = echars[:(ncols + coldiff) * 2]
463 463 if len(lines) < len(text):
464 464 while len(lines) < len(text):
465 465 lines.append(extra_interline[:])
466 466
467 467 _drawendinglines(lines, extra_interline, edgemap, seen, state)
468 468
469 469 while len(text) < len(lines):
470 470 text.append("")
471 471
472 if any(len(char) > 1 for char in edgemap.values()):
473 # limit drawing an edge to the first or last N lines of the current
474 # section the rest of the edge is drawn like a parent line.
475 parent = state['styles'][PARENT][-1:]
476 def _drawgp(char, i):
477 # should a grandparent character be drawn for this line?
478 if len(char) < 2:
479 return True
480 num = int(char[:-1])
481 # either skip first num lines or take last num lines, based on sign
482 return -num <= i if num < 0 else (len(lines) - i) <= num
483 for i, line in enumerate(lines):
484 line[:] = [c[-1:] if _drawgp(c, i) else parent for c in line]
485 edgemap.update(
486 (e, (c if len(c) < 2 else parent)) for e, c in edgemap.items())
487
488 472 # print lines
489 473 indentation_level = max(ncols, ncols + coldiff)
490 474 lines = ["%-*s " % (2 * indentation_level, "".join(line)) for line in lines]
491 475 outputgraph(ui, zip(lines, text))
492 476
493 477 # ... and start over
494 478 state['lastcoldiff'] = coldiff
495 479 state['lastindex'] = idx
@@ -1,3447 +1,3450 b''
1 1 @ (34) head
2 2 |
3 3 | o (33) head
4 4 | |
5 5 o | (32) expand
6 6 |\ \
7 7 | o \ (31) expand
8 8 | |\ \
9 9 | | o \ (30) expand
10 10 | | |\ \
11 11 | | | o | (29) regular commit
12 12 | | | | |
13 13 | | o | | (28) merge zero known
14 14 | | |\ \ \
15 15 o | | | | | (27) collapse
16 16 |/ / / / /
17 17 | | o---+ (26) merge one known; far right
18 18 | | | | |
19 19 +---o | | (25) merge one known; far left
20 20 | | | | |
21 21 | | o | | (24) merge one known; immediate right
22 22 | | |\| |
23 23 | | o | | (23) merge one known; immediate left
24 24 | |/| | |
25 25 +---o---+ (22) merge two known; one far left, one far right
26 26 | | / /
27 27 o | | | (21) expand
28 28 |\ \ \ \
29 29 | o---+-+ (20) merge two known; two far right
30 30 | / / /
31 31 o | | | (19) expand
32 32 |\ \ \ \
33 33 +---+---o (18) merge two known; two far left
34 34 | | | |
35 35 | o | | (17) expand
36 36 | |\ \ \
37 37 | | o---+ (16) merge two known; one immediate right, one near right
38 38 | | |/ /
39 39 o | | | (15) expand
40 40 |\ \ \ \
41 41 | o-----+ (14) merge two known; one immediate right, one far right
42 42 | |/ / /
43 43 o | | | (13) expand
44 44 |\ \ \ \
45 45 +---o | | (12) merge two known; one immediate right, one far left
46 46 | | |/ /
47 47 | o | | (11) expand
48 48 | |\ \ \
49 49 | | o---+ (10) merge two known; one immediate left, one near right
50 50 | |/ / /
51 51 o | | | (9) expand
52 52 |\ \ \ \
53 53 | o-----+ (8) merge two known; one immediate left, one far right
54 54 |/ / / /
55 55 o | | | (7) expand
56 56 |\ \ \ \
57 57 +---o | | (6) merge two known; one immediate left, one far left
58 58 | |/ / /
59 59 | o | | (5) expand
60 60 | |\ \ \
61 61 | | o | | (4) merge two known; one immediate left, one immediate right
62 62 | |/|/ /
63 63 | o / / (3) collapse
64 64 |/ / /
65 65 o / / (2) collapse
66 66 |/ /
67 67 o / (1) collapse
68 68 |/
69 69 o (0) root
70 70
71 71
72 72 $ commit()
73 73 > {
74 74 > rev=$1
75 75 > msg=$2
76 76 > shift 2
77 77 > if [ "$#" -gt 0 ]; then
78 78 > hg debugsetparents "$@"
79 79 > fi
80 80 > echo $rev > a
81 81 > hg commit -Aqd "$rev 0" -m "($rev) $msg"
82 82 > }
83 83
84 84 $ echo "[extensions]" >> $HGRCPATH
85 85 $ echo "printrevset=$TESTDIR/printrevset.py" >> $HGRCPATH
86 86
87 87 $ hg init repo
88 88 $ cd repo
89 89
90 90 Empty repo:
91 91
92 92 $ hg log -G
93 93
94 94
95 95 Building DAG:
96 96
97 97 $ commit 0 "root"
98 98 $ commit 1 "collapse" 0
99 99 $ commit 2 "collapse" 1
100 100 $ commit 3 "collapse" 2
101 101 $ commit 4 "merge two known; one immediate left, one immediate right" 1 3
102 102 $ commit 5 "expand" 3 4
103 103 $ commit 6 "merge two known; one immediate left, one far left" 2 5
104 104 $ commit 7 "expand" 2 5
105 105 $ commit 8 "merge two known; one immediate left, one far right" 0 7
106 106 $ commit 9 "expand" 7 8
107 107 $ commit 10 "merge two known; one immediate left, one near right" 0 6
108 108 $ commit 11 "expand" 6 10
109 109 $ commit 12 "merge two known; one immediate right, one far left" 1 9
110 110 $ commit 13 "expand" 9 11
111 111 $ commit 14 "merge two known; one immediate right, one far right" 0 12
112 112 $ commit 15 "expand" 13 14
113 113 $ commit 16 "merge two known; one immediate right, one near right" 0 1
114 114 $ commit 17 "expand" 12 16
115 115 $ commit 18 "merge two known; two far left" 1 15
116 116 $ commit 19 "expand" 15 17
117 117 $ commit 20 "merge two known; two far right" 0 18
118 118 $ commit 21 "expand" 19 20
119 119 $ commit 22 "merge two known; one far left, one far right" 18 21
120 120 $ commit 23 "merge one known; immediate left" 1 22
121 121 $ commit 24 "merge one known; immediate right" 0 23
122 122 $ commit 25 "merge one known; far left" 21 24
123 123 $ commit 26 "merge one known; far right" 18 25
124 124 $ commit 27 "collapse" 21
125 125 $ commit 28 "merge zero known" 1 26
126 126 $ commit 29 "regular commit" 0
127 127 $ commit 30 "expand" 28 29
128 128 $ commit 31 "expand" 21 30
129 129 $ commit 32 "expand" 27 31
130 130 $ commit 33 "head" 18
131 131 $ commit 34 "head" 32
132 132
133 133
134 134 $ hg log -G -q
135 135 @ 34:fea3ac5810e0
136 136 |
137 137 | o 33:68608f5145f9
138 138 | |
139 139 o | 32:d06dffa21a31
140 140 |\ \
141 141 | o \ 31:621d83e11f67
142 142 | |\ \
143 143 | | o \ 30:6e11cd4b648f
144 144 | | |\ \
145 145 | | | o | 29:cd9bb2be7593
146 146 | | | | |
147 147 | | o | | 28:44ecd0b9ae99
148 148 | | |\ \ \
149 149 o | | | | | 27:886ed638191b
150 150 |/ / / / /
151 151 | | o---+ 26:7f25b6c2f0b9
152 152 | | | | |
153 153 +---o | | 25:91da8ed57247
154 154 | | | | |
155 155 | | o | | 24:a9c19a3d96b7
156 156 | | |\| |
157 157 | | o | | 23:a01cddf0766d
158 158 | |/| | |
159 159 +---o---+ 22:e0d9cccacb5d
160 160 | | / /
161 161 o | | | 21:d42a756af44d
162 162 |\ \ \ \
163 163 | o---+-+ 20:d30ed6450e32
164 164 | / / /
165 165 o | | | 19:31ddc2c1573b
166 166 |\ \ \ \
167 167 +---+---o 18:1aa84d96232a
168 168 | | | |
169 169 | o | | 17:44765d7c06e0
170 170 | |\ \ \
171 171 | | o---+ 16:3677d192927d
172 172 | | |/ /
173 173 o | | | 15:1dda3f72782d
174 174 |\ \ \ \
175 175 | o-----+ 14:8eac370358ef
176 176 | |/ / /
177 177 o | | | 13:22d8966a97e3
178 178 |\ \ \ \
179 179 +---o | | 12:86b91144a6e9
180 180 | | |/ /
181 181 | o | | 11:832d76e6bdf2
182 182 | |\ \ \
183 183 | | o---+ 10:74c64d036d72
184 184 | |/ / /
185 185 o | | | 9:7010c0af0a35
186 186 |\ \ \ \
187 187 | o-----+ 8:7a0b11f71937
188 188 |/ / / /
189 189 o | | | 7:b632bb1b1224
190 190 |\ \ \ \
191 191 +---o | | 6:b105a072e251
192 192 | |/ / /
193 193 | o | | 5:4409d547b708
194 194 | |\ \ \
195 195 | | o | | 4:26a8bac39d9f
196 196 | |/|/ /
197 197 | o / / 3:27eef8ed80b4
198 198 |/ / /
199 199 o / / 2:3d9a33b8d1e1
200 200 |/ /
201 201 o / 1:6db2ef61d156
202 202 |/
203 203 o 0:e6eb3150255d
204 204
205 205
206 206 $ hg log -G
207 207 @ changeset: 34:fea3ac5810e0
208 208 | tag: tip
209 209 | parent: 32:d06dffa21a31
210 210 | user: test
211 211 | date: Thu Jan 01 00:00:34 1970 +0000
212 212 | summary: (34) head
213 213 |
214 214 | o changeset: 33:68608f5145f9
215 215 | | parent: 18:1aa84d96232a
216 216 | | user: test
217 217 | | date: Thu Jan 01 00:00:33 1970 +0000
218 218 | | summary: (33) head
219 219 | |
220 220 o | changeset: 32:d06dffa21a31
221 221 |\ \ parent: 27:886ed638191b
222 222 | | | parent: 31:621d83e11f67
223 223 | | | user: test
224 224 | | | date: Thu Jan 01 00:00:32 1970 +0000
225 225 | | | summary: (32) expand
226 226 | | |
227 227 | o | changeset: 31:621d83e11f67
228 228 | |\ \ parent: 21:d42a756af44d
229 229 | | | | parent: 30:6e11cd4b648f
230 230 | | | | user: test
231 231 | | | | date: Thu Jan 01 00:00:31 1970 +0000
232 232 | | | | summary: (31) expand
233 233 | | | |
234 234 | | o | changeset: 30:6e11cd4b648f
235 235 | | |\ \ parent: 28:44ecd0b9ae99
236 236 | | | | | parent: 29:cd9bb2be7593
237 237 | | | | | user: test
238 238 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
239 239 | | | | | summary: (30) expand
240 240 | | | | |
241 241 | | | o | changeset: 29:cd9bb2be7593
242 242 | | | | | parent: 0:e6eb3150255d
243 243 | | | | | user: test
244 244 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
245 245 | | | | | summary: (29) regular commit
246 246 | | | | |
247 247 | | o | | changeset: 28:44ecd0b9ae99
248 248 | | |\ \ \ parent: 1:6db2ef61d156
249 249 | | | | | | parent: 26:7f25b6c2f0b9
250 250 | | | | | | user: test
251 251 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
252 252 | | | | | | summary: (28) merge zero known
253 253 | | | | | |
254 254 o | | | | | changeset: 27:886ed638191b
255 255 |/ / / / / parent: 21:d42a756af44d
256 256 | | | | | user: test
257 257 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
258 258 | | | | | summary: (27) collapse
259 259 | | | | |
260 260 | | o---+ changeset: 26:7f25b6c2f0b9
261 261 | | | | | parent: 18:1aa84d96232a
262 262 | | | | | parent: 25:91da8ed57247
263 263 | | | | | user: test
264 264 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
265 265 | | | | | summary: (26) merge one known; far right
266 266 | | | | |
267 267 +---o | | changeset: 25:91da8ed57247
268 268 | | | | | parent: 21:d42a756af44d
269 269 | | | | | parent: 24:a9c19a3d96b7
270 270 | | | | | user: test
271 271 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
272 272 | | | | | summary: (25) merge one known; far left
273 273 | | | | |
274 274 | | o | | changeset: 24:a9c19a3d96b7
275 275 | | |\| | parent: 0:e6eb3150255d
276 276 | | | | | parent: 23:a01cddf0766d
277 277 | | | | | user: test
278 278 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
279 279 | | | | | summary: (24) merge one known; immediate right
280 280 | | | | |
281 281 | | o | | changeset: 23:a01cddf0766d
282 282 | |/| | | parent: 1:6db2ef61d156
283 283 | | | | | parent: 22:e0d9cccacb5d
284 284 | | | | | user: test
285 285 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
286 286 | | | | | summary: (23) merge one known; immediate left
287 287 | | | | |
288 288 +---o---+ changeset: 22:e0d9cccacb5d
289 289 | | | | parent: 18:1aa84d96232a
290 290 | | / / parent: 21:d42a756af44d
291 291 | | | | user: test
292 292 | | | | date: Thu Jan 01 00:00:22 1970 +0000
293 293 | | | | summary: (22) merge two known; one far left, one far right
294 294 | | | |
295 295 o | | | changeset: 21:d42a756af44d
296 296 |\ \ \ \ parent: 19:31ddc2c1573b
297 297 | | | | | parent: 20:d30ed6450e32
298 298 | | | | | user: test
299 299 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
300 300 | | | | | summary: (21) expand
301 301 | | | | |
302 302 | o---+-+ changeset: 20:d30ed6450e32
303 303 | | | | parent: 0:e6eb3150255d
304 304 | / / / parent: 18:1aa84d96232a
305 305 | | | | user: test
306 306 | | | | date: Thu Jan 01 00:00:20 1970 +0000
307 307 | | | | summary: (20) merge two known; two far right
308 308 | | | |
309 309 o | | | changeset: 19:31ddc2c1573b
310 310 |\ \ \ \ parent: 15:1dda3f72782d
311 311 | | | | | parent: 17:44765d7c06e0
312 312 | | | | | user: test
313 313 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
314 314 | | | | | summary: (19) expand
315 315 | | | | |
316 316 +---+---o changeset: 18:1aa84d96232a
317 317 | | | | parent: 1:6db2ef61d156
318 318 | | | | parent: 15:1dda3f72782d
319 319 | | | | user: test
320 320 | | | | date: Thu Jan 01 00:00:18 1970 +0000
321 321 | | | | summary: (18) merge two known; two far left
322 322 | | | |
323 323 | o | | changeset: 17:44765d7c06e0
324 324 | |\ \ \ parent: 12:86b91144a6e9
325 325 | | | | | parent: 16:3677d192927d
326 326 | | | | | user: test
327 327 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
328 328 | | | | | summary: (17) expand
329 329 | | | | |
330 330 | | o---+ changeset: 16:3677d192927d
331 331 | | | | | parent: 0:e6eb3150255d
332 332 | | |/ / parent: 1:6db2ef61d156
333 333 | | | | user: test
334 334 | | | | date: Thu Jan 01 00:00:16 1970 +0000
335 335 | | | | summary: (16) merge two known; one immediate right, one near right
336 336 | | | |
337 337 o | | | changeset: 15:1dda3f72782d
338 338 |\ \ \ \ parent: 13:22d8966a97e3
339 339 | | | | | parent: 14:8eac370358ef
340 340 | | | | | user: test
341 341 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
342 342 | | | | | summary: (15) expand
343 343 | | | | |
344 344 | o-----+ changeset: 14:8eac370358ef
345 345 | | | | | parent: 0:e6eb3150255d
346 346 | |/ / / parent: 12:86b91144a6e9
347 347 | | | | user: test
348 348 | | | | date: Thu Jan 01 00:00:14 1970 +0000
349 349 | | | | summary: (14) merge two known; one immediate right, one far right
350 350 | | | |
351 351 o | | | changeset: 13:22d8966a97e3
352 352 |\ \ \ \ parent: 9:7010c0af0a35
353 353 | | | | | parent: 11:832d76e6bdf2
354 354 | | | | | user: test
355 355 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
356 356 | | | | | summary: (13) expand
357 357 | | | | |
358 358 +---o | | changeset: 12:86b91144a6e9
359 359 | | |/ / parent: 1:6db2ef61d156
360 360 | | | | parent: 9:7010c0af0a35
361 361 | | | | user: test
362 362 | | | | date: Thu Jan 01 00:00:12 1970 +0000
363 363 | | | | summary: (12) merge two known; one immediate right, one far left
364 364 | | | |
365 365 | o | | changeset: 11:832d76e6bdf2
366 366 | |\ \ \ parent: 6:b105a072e251
367 367 | | | | | parent: 10:74c64d036d72
368 368 | | | | | user: test
369 369 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
370 370 | | | | | summary: (11) expand
371 371 | | | | |
372 372 | | o---+ changeset: 10:74c64d036d72
373 373 | | | | | parent: 0:e6eb3150255d
374 374 | |/ / / parent: 6:b105a072e251
375 375 | | | | user: test
376 376 | | | | date: Thu Jan 01 00:00:10 1970 +0000
377 377 | | | | summary: (10) merge two known; one immediate left, one near right
378 378 | | | |
379 379 o | | | changeset: 9:7010c0af0a35
380 380 |\ \ \ \ parent: 7:b632bb1b1224
381 381 | | | | | parent: 8:7a0b11f71937
382 382 | | | | | user: test
383 383 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
384 384 | | | | | summary: (9) expand
385 385 | | | | |
386 386 | o-----+ changeset: 8:7a0b11f71937
387 387 | | | | | parent: 0:e6eb3150255d
388 388 |/ / / / parent: 7:b632bb1b1224
389 389 | | | | user: test
390 390 | | | | date: Thu Jan 01 00:00:08 1970 +0000
391 391 | | | | summary: (8) merge two known; one immediate left, one far right
392 392 | | | |
393 393 o | | | changeset: 7:b632bb1b1224
394 394 |\ \ \ \ parent: 2:3d9a33b8d1e1
395 395 | | | | | parent: 5:4409d547b708
396 396 | | | | | user: test
397 397 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
398 398 | | | | | summary: (7) expand
399 399 | | | | |
400 400 +---o | | changeset: 6:b105a072e251
401 401 | |/ / / parent: 2:3d9a33b8d1e1
402 402 | | | | parent: 5:4409d547b708
403 403 | | | | user: test
404 404 | | | | date: Thu Jan 01 00:00:06 1970 +0000
405 405 | | | | summary: (6) merge two known; one immediate left, one far left
406 406 | | | |
407 407 | o | | changeset: 5:4409d547b708
408 408 | |\ \ \ parent: 3:27eef8ed80b4
409 409 | | | | | parent: 4:26a8bac39d9f
410 410 | | | | | user: test
411 411 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
412 412 | | | | | summary: (5) expand
413 413 | | | | |
414 414 | | o | | changeset: 4:26a8bac39d9f
415 415 | |/|/ / parent: 1:6db2ef61d156
416 416 | | | | parent: 3:27eef8ed80b4
417 417 | | | | user: test
418 418 | | | | date: Thu Jan 01 00:00:04 1970 +0000
419 419 | | | | summary: (4) merge two known; one immediate left, one immediate right
420 420 | | | |
421 421 | o | | changeset: 3:27eef8ed80b4
422 422 |/ / / user: test
423 423 | | | date: Thu Jan 01 00:00:03 1970 +0000
424 424 | | | summary: (3) collapse
425 425 | | |
426 426 o | | changeset: 2:3d9a33b8d1e1
427 427 |/ / user: test
428 428 | | date: Thu Jan 01 00:00:02 1970 +0000
429 429 | | summary: (2) collapse
430 430 | |
431 431 o | changeset: 1:6db2ef61d156
432 432 |/ user: test
433 433 | date: Thu Jan 01 00:00:01 1970 +0000
434 434 | summary: (1) collapse
435 435 |
436 436 o changeset: 0:e6eb3150255d
437 437 user: test
438 438 date: Thu Jan 01 00:00:00 1970 +0000
439 439 summary: (0) root
440 440
441 441
442 442 File glog:
443 443 $ hg log -G a
444 444 @ changeset: 34:fea3ac5810e0
445 445 | tag: tip
446 446 | parent: 32:d06dffa21a31
447 447 | user: test
448 448 | date: Thu Jan 01 00:00:34 1970 +0000
449 449 | summary: (34) head
450 450 |
451 451 | o changeset: 33:68608f5145f9
452 452 | | parent: 18:1aa84d96232a
453 453 | | user: test
454 454 | | date: Thu Jan 01 00:00:33 1970 +0000
455 455 | | summary: (33) head
456 456 | |
457 457 o | changeset: 32:d06dffa21a31
458 458 |\ \ parent: 27:886ed638191b
459 459 | | | parent: 31:621d83e11f67
460 460 | | | user: test
461 461 | | | date: Thu Jan 01 00:00:32 1970 +0000
462 462 | | | summary: (32) expand
463 463 | | |
464 464 | o | changeset: 31:621d83e11f67
465 465 | |\ \ parent: 21:d42a756af44d
466 466 | | | | parent: 30:6e11cd4b648f
467 467 | | | | user: test
468 468 | | | | date: Thu Jan 01 00:00:31 1970 +0000
469 469 | | | | summary: (31) expand
470 470 | | | |
471 471 | | o | changeset: 30:6e11cd4b648f
472 472 | | |\ \ parent: 28:44ecd0b9ae99
473 473 | | | | | parent: 29:cd9bb2be7593
474 474 | | | | | user: test
475 475 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
476 476 | | | | | summary: (30) expand
477 477 | | | | |
478 478 | | | o | changeset: 29:cd9bb2be7593
479 479 | | | | | parent: 0:e6eb3150255d
480 480 | | | | | user: test
481 481 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
482 482 | | | | | summary: (29) regular commit
483 483 | | | | |
484 484 | | o | | changeset: 28:44ecd0b9ae99
485 485 | | |\ \ \ parent: 1:6db2ef61d156
486 486 | | | | | | parent: 26:7f25b6c2f0b9
487 487 | | | | | | user: test
488 488 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
489 489 | | | | | | summary: (28) merge zero known
490 490 | | | | | |
491 491 o | | | | | changeset: 27:886ed638191b
492 492 |/ / / / / parent: 21:d42a756af44d
493 493 | | | | | user: test
494 494 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
495 495 | | | | | summary: (27) collapse
496 496 | | | | |
497 497 | | o---+ changeset: 26:7f25b6c2f0b9
498 498 | | | | | parent: 18:1aa84d96232a
499 499 | | | | | parent: 25:91da8ed57247
500 500 | | | | | user: test
501 501 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
502 502 | | | | | summary: (26) merge one known; far right
503 503 | | | | |
504 504 +---o | | changeset: 25:91da8ed57247
505 505 | | | | | parent: 21:d42a756af44d
506 506 | | | | | parent: 24:a9c19a3d96b7
507 507 | | | | | user: test
508 508 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
509 509 | | | | | summary: (25) merge one known; far left
510 510 | | | | |
511 511 | | o | | changeset: 24:a9c19a3d96b7
512 512 | | |\| | parent: 0:e6eb3150255d
513 513 | | | | | parent: 23:a01cddf0766d
514 514 | | | | | user: test
515 515 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
516 516 | | | | | summary: (24) merge one known; immediate right
517 517 | | | | |
518 518 | | o | | changeset: 23:a01cddf0766d
519 519 | |/| | | parent: 1:6db2ef61d156
520 520 | | | | | parent: 22:e0d9cccacb5d
521 521 | | | | | user: test
522 522 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
523 523 | | | | | summary: (23) merge one known; immediate left
524 524 | | | | |
525 525 +---o---+ changeset: 22:e0d9cccacb5d
526 526 | | | | parent: 18:1aa84d96232a
527 527 | | / / parent: 21:d42a756af44d
528 528 | | | | user: test
529 529 | | | | date: Thu Jan 01 00:00:22 1970 +0000
530 530 | | | | summary: (22) merge two known; one far left, one far right
531 531 | | | |
532 532 o | | | changeset: 21:d42a756af44d
533 533 |\ \ \ \ parent: 19:31ddc2c1573b
534 534 | | | | | parent: 20:d30ed6450e32
535 535 | | | | | user: test
536 536 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
537 537 | | | | | summary: (21) expand
538 538 | | | | |
539 539 | o---+-+ changeset: 20:d30ed6450e32
540 540 | | | | parent: 0:e6eb3150255d
541 541 | / / / parent: 18:1aa84d96232a
542 542 | | | | user: test
543 543 | | | | date: Thu Jan 01 00:00:20 1970 +0000
544 544 | | | | summary: (20) merge two known; two far right
545 545 | | | |
546 546 o | | | changeset: 19:31ddc2c1573b
547 547 |\ \ \ \ parent: 15:1dda3f72782d
548 548 | | | | | parent: 17:44765d7c06e0
549 549 | | | | | user: test
550 550 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
551 551 | | | | | summary: (19) expand
552 552 | | | | |
553 553 +---+---o changeset: 18:1aa84d96232a
554 554 | | | | parent: 1:6db2ef61d156
555 555 | | | | parent: 15:1dda3f72782d
556 556 | | | | user: test
557 557 | | | | date: Thu Jan 01 00:00:18 1970 +0000
558 558 | | | | summary: (18) merge two known; two far left
559 559 | | | |
560 560 | o | | changeset: 17:44765d7c06e0
561 561 | |\ \ \ parent: 12:86b91144a6e9
562 562 | | | | | parent: 16:3677d192927d
563 563 | | | | | user: test
564 564 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
565 565 | | | | | summary: (17) expand
566 566 | | | | |
567 567 | | o---+ changeset: 16:3677d192927d
568 568 | | | | | parent: 0:e6eb3150255d
569 569 | | |/ / parent: 1:6db2ef61d156
570 570 | | | | user: test
571 571 | | | | date: Thu Jan 01 00:00:16 1970 +0000
572 572 | | | | summary: (16) merge two known; one immediate right, one near right
573 573 | | | |
574 574 o | | | changeset: 15:1dda3f72782d
575 575 |\ \ \ \ parent: 13:22d8966a97e3
576 576 | | | | | parent: 14:8eac370358ef
577 577 | | | | | user: test
578 578 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
579 579 | | | | | summary: (15) expand
580 580 | | | | |
581 581 | o-----+ changeset: 14:8eac370358ef
582 582 | | | | | parent: 0:e6eb3150255d
583 583 | |/ / / parent: 12:86b91144a6e9
584 584 | | | | user: test
585 585 | | | | date: Thu Jan 01 00:00:14 1970 +0000
586 586 | | | | summary: (14) merge two known; one immediate right, one far right
587 587 | | | |
588 588 o | | | changeset: 13:22d8966a97e3
589 589 |\ \ \ \ parent: 9:7010c0af0a35
590 590 | | | | | parent: 11:832d76e6bdf2
591 591 | | | | | user: test
592 592 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
593 593 | | | | | summary: (13) expand
594 594 | | | | |
595 595 +---o | | changeset: 12:86b91144a6e9
596 596 | | |/ / parent: 1:6db2ef61d156
597 597 | | | | parent: 9:7010c0af0a35
598 598 | | | | user: test
599 599 | | | | date: Thu Jan 01 00:00:12 1970 +0000
600 600 | | | | summary: (12) merge two known; one immediate right, one far left
601 601 | | | |
602 602 | o | | changeset: 11:832d76e6bdf2
603 603 | |\ \ \ parent: 6:b105a072e251
604 604 | | | | | parent: 10:74c64d036d72
605 605 | | | | | user: test
606 606 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
607 607 | | | | | summary: (11) expand
608 608 | | | | |
609 609 | | o---+ changeset: 10:74c64d036d72
610 610 | | | | | parent: 0:e6eb3150255d
611 611 | |/ / / parent: 6:b105a072e251
612 612 | | | | user: test
613 613 | | | | date: Thu Jan 01 00:00:10 1970 +0000
614 614 | | | | summary: (10) merge two known; one immediate left, one near right
615 615 | | | |
616 616 o | | | changeset: 9:7010c0af0a35
617 617 |\ \ \ \ parent: 7:b632bb1b1224
618 618 | | | | | parent: 8:7a0b11f71937
619 619 | | | | | user: test
620 620 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
621 621 | | | | | summary: (9) expand
622 622 | | | | |
623 623 | o-----+ changeset: 8:7a0b11f71937
624 624 | | | | | parent: 0:e6eb3150255d
625 625 |/ / / / parent: 7:b632bb1b1224
626 626 | | | | user: test
627 627 | | | | date: Thu Jan 01 00:00:08 1970 +0000
628 628 | | | | summary: (8) merge two known; one immediate left, one far right
629 629 | | | |
630 630 o | | | changeset: 7:b632bb1b1224
631 631 |\ \ \ \ parent: 2:3d9a33b8d1e1
632 632 | | | | | parent: 5:4409d547b708
633 633 | | | | | user: test
634 634 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
635 635 | | | | | summary: (7) expand
636 636 | | | | |
637 637 +---o | | changeset: 6:b105a072e251
638 638 | |/ / / parent: 2:3d9a33b8d1e1
639 639 | | | | parent: 5:4409d547b708
640 640 | | | | user: test
641 641 | | | | date: Thu Jan 01 00:00:06 1970 +0000
642 642 | | | | summary: (6) merge two known; one immediate left, one far left
643 643 | | | |
644 644 | o | | changeset: 5:4409d547b708
645 645 | |\ \ \ parent: 3:27eef8ed80b4
646 646 | | | | | parent: 4:26a8bac39d9f
647 647 | | | | | user: test
648 648 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
649 649 | | | | | summary: (5) expand
650 650 | | | | |
651 651 | | o | | changeset: 4:26a8bac39d9f
652 652 | |/|/ / parent: 1:6db2ef61d156
653 653 | | | | parent: 3:27eef8ed80b4
654 654 | | | | user: test
655 655 | | | | date: Thu Jan 01 00:00:04 1970 +0000
656 656 | | | | summary: (4) merge two known; one immediate left, one immediate right
657 657 | | | |
658 658 | o | | changeset: 3:27eef8ed80b4
659 659 |/ / / user: test
660 660 | | | date: Thu Jan 01 00:00:03 1970 +0000
661 661 | | | summary: (3) collapse
662 662 | | |
663 663 o | | changeset: 2:3d9a33b8d1e1
664 664 |/ / user: test
665 665 | | date: Thu Jan 01 00:00:02 1970 +0000
666 666 | | summary: (2) collapse
667 667 | |
668 668 o | changeset: 1:6db2ef61d156
669 669 |/ user: test
670 670 | date: Thu Jan 01 00:00:01 1970 +0000
671 671 | summary: (1) collapse
672 672 |
673 673 o changeset: 0:e6eb3150255d
674 674 user: test
675 675 date: Thu Jan 01 00:00:00 1970 +0000
676 676 summary: (0) root
677 677
678 678
679 679 File glog per revset:
680 680
681 681 $ hg log -G -r 'file("a")'
682 682 @ changeset: 34:fea3ac5810e0
683 683 | tag: tip
684 684 | parent: 32:d06dffa21a31
685 685 | user: test
686 686 | date: Thu Jan 01 00:00:34 1970 +0000
687 687 | summary: (34) head
688 688 |
689 689 | o changeset: 33:68608f5145f9
690 690 | | parent: 18:1aa84d96232a
691 691 | | user: test
692 692 | | date: Thu Jan 01 00:00:33 1970 +0000
693 693 | | summary: (33) head
694 694 | |
695 695 o | changeset: 32:d06dffa21a31
696 696 |\ \ parent: 27:886ed638191b
697 697 | | | parent: 31:621d83e11f67
698 698 | | | user: test
699 699 | | | date: Thu Jan 01 00:00:32 1970 +0000
700 700 | | | summary: (32) expand
701 701 | | |
702 702 | o | changeset: 31:621d83e11f67
703 703 | |\ \ parent: 21:d42a756af44d
704 704 | | | | parent: 30:6e11cd4b648f
705 705 | | | | user: test
706 706 | | | | date: Thu Jan 01 00:00:31 1970 +0000
707 707 | | | | summary: (31) expand
708 708 | | | |
709 709 | | o | changeset: 30:6e11cd4b648f
710 710 | | |\ \ parent: 28:44ecd0b9ae99
711 711 | | | | | parent: 29:cd9bb2be7593
712 712 | | | | | user: test
713 713 | | | | | date: Thu Jan 01 00:00:30 1970 +0000
714 714 | | | | | summary: (30) expand
715 715 | | | | |
716 716 | | | o | changeset: 29:cd9bb2be7593
717 717 | | | | | parent: 0:e6eb3150255d
718 718 | | | | | user: test
719 719 | | | | | date: Thu Jan 01 00:00:29 1970 +0000
720 720 | | | | | summary: (29) regular commit
721 721 | | | | |
722 722 | | o | | changeset: 28:44ecd0b9ae99
723 723 | | |\ \ \ parent: 1:6db2ef61d156
724 724 | | | | | | parent: 26:7f25b6c2f0b9
725 725 | | | | | | user: test
726 726 | | | | | | date: Thu Jan 01 00:00:28 1970 +0000
727 727 | | | | | | summary: (28) merge zero known
728 728 | | | | | |
729 729 o | | | | | changeset: 27:886ed638191b
730 730 |/ / / / / parent: 21:d42a756af44d
731 731 | | | | | user: test
732 732 | | | | | date: Thu Jan 01 00:00:27 1970 +0000
733 733 | | | | | summary: (27) collapse
734 734 | | | | |
735 735 | | o---+ changeset: 26:7f25b6c2f0b9
736 736 | | | | | parent: 18:1aa84d96232a
737 737 | | | | | parent: 25:91da8ed57247
738 738 | | | | | user: test
739 739 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
740 740 | | | | | summary: (26) merge one known; far right
741 741 | | | | |
742 742 +---o | | changeset: 25:91da8ed57247
743 743 | | | | | parent: 21:d42a756af44d
744 744 | | | | | parent: 24:a9c19a3d96b7
745 745 | | | | | user: test
746 746 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
747 747 | | | | | summary: (25) merge one known; far left
748 748 | | | | |
749 749 | | o | | changeset: 24:a9c19a3d96b7
750 750 | | |\| | parent: 0:e6eb3150255d
751 751 | | | | | parent: 23:a01cddf0766d
752 752 | | | | | user: test
753 753 | | | | | date: Thu Jan 01 00:00:24 1970 +0000
754 754 | | | | | summary: (24) merge one known; immediate right
755 755 | | | | |
756 756 | | o | | changeset: 23:a01cddf0766d
757 757 | |/| | | parent: 1:6db2ef61d156
758 758 | | | | | parent: 22:e0d9cccacb5d
759 759 | | | | | user: test
760 760 | | | | | date: Thu Jan 01 00:00:23 1970 +0000
761 761 | | | | | summary: (23) merge one known; immediate left
762 762 | | | | |
763 763 +---o---+ changeset: 22:e0d9cccacb5d
764 764 | | | | parent: 18:1aa84d96232a
765 765 | | / / parent: 21:d42a756af44d
766 766 | | | | user: test
767 767 | | | | date: Thu Jan 01 00:00:22 1970 +0000
768 768 | | | | summary: (22) merge two known; one far left, one far right
769 769 | | | |
770 770 o | | | changeset: 21:d42a756af44d
771 771 |\ \ \ \ parent: 19:31ddc2c1573b
772 772 | | | | | parent: 20:d30ed6450e32
773 773 | | | | | user: test
774 774 | | | | | date: Thu Jan 01 00:00:21 1970 +0000
775 775 | | | | | summary: (21) expand
776 776 | | | | |
777 777 | o---+-+ changeset: 20:d30ed6450e32
778 778 | | | | parent: 0:e6eb3150255d
779 779 | / / / parent: 18:1aa84d96232a
780 780 | | | | user: test
781 781 | | | | date: Thu Jan 01 00:00:20 1970 +0000
782 782 | | | | summary: (20) merge two known; two far right
783 783 | | | |
784 784 o | | | changeset: 19:31ddc2c1573b
785 785 |\ \ \ \ parent: 15:1dda3f72782d
786 786 | | | | | parent: 17:44765d7c06e0
787 787 | | | | | user: test
788 788 | | | | | date: Thu Jan 01 00:00:19 1970 +0000
789 789 | | | | | summary: (19) expand
790 790 | | | | |
791 791 +---+---o changeset: 18:1aa84d96232a
792 792 | | | | parent: 1:6db2ef61d156
793 793 | | | | parent: 15:1dda3f72782d
794 794 | | | | user: test
795 795 | | | | date: Thu Jan 01 00:00:18 1970 +0000
796 796 | | | | summary: (18) merge two known; two far left
797 797 | | | |
798 798 | o | | changeset: 17:44765d7c06e0
799 799 | |\ \ \ parent: 12:86b91144a6e9
800 800 | | | | | parent: 16:3677d192927d
801 801 | | | | | user: test
802 802 | | | | | date: Thu Jan 01 00:00:17 1970 +0000
803 803 | | | | | summary: (17) expand
804 804 | | | | |
805 805 | | o---+ changeset: 16:3677d192927d
806 806 | | | | | parent: 0:e6eb3150255d
807 807 | | |/ / parent: 1:6db2ef61d156
808 808 | | | | user: test
809 809 | | | | date: Thu Jan 01 00:00:16 1970 +0000
810 810 | | | | summary: (16) merge two known; one immediate right, one near right
811 811 | | | |
812 812 o | | | changeset: 15:1dda3f72782d
813 813 |\ \ \ \ parent: 13:22d8966a97e3
814 814 | | | | | parent: 14:8eac370358ef
815 815 | | | | | user: test
816 816 | | | | | date: Thu Jan 01 00:00:15 1970 +0000
817 817 | | | | | summary: (15) expand
818 818 | | | | |
819 819 | o-----+ changeset: 14:8eac370358ef
820 820 | | | | | parent: 0:e6eb3150255d
821 821 | |/ / / parent: 12:86b91144a6e9
822 822 | | | | user: test
823 823 | | | | date: Thu Jan 01 00:00:14 1970 +0000
824 824 | | | | summary: (14) merge two known; one immediate right, one far right
825 825 | | | |
826 826 o | | | changeset: 13:22d8966a97e3
827 827 |\ \ \ \ parent: 9:7010c0af0a35
828 828 | | | | | parent: 11:832d76e6bdf2
829 829 | | | | | user: test
830 830 | | | | | date: Thu Jan 01 00:00:13 1970 +0000
831 831 | | | | | summary: (13) expand
832 832 | | | | |
833 833 +---o | | changeset: 12:86b91144a6e9
834 834 | | |/ / parent: 1:6db2ef61d156
835 835 | | | | parent: 9:7010c0af0a35
836 836 | | | | user: test
837 837 | | | | date: Thu Jan 01 00:00:12 1970 +0000
838 838 | | | | summary: (12) merge two known; one immediate right, one far left
839 839 | | | |
840 840 | o | | changeset: 11:832d76e6bdf2
841 841 | |\ \ \ parent: 6:b105a072e251
842 842 | | | | | parent: 10:74c64d036d72
843 843 | | | | | user: test
844 844 | | | | | date: Thu Jan 01 00:00:11 1970 +0000
845 845 | | | | | summary: (11) expand
846 846 | | | | |
847 847 | | o---+ changeset: 10:74c64d036d72
848 848 | | | | | parent: 0:e6eb3150255d
849 849 | |/ / / parent: 6:b105a072e251
850 850 | | | | user: test
851 851 | | | | date: Thu Jan 01 00:00:10 1970 +0000
852 852 | | | | summary: (10) merge two known; one immediate left, one near right
853 853 | | | |
854 854 o | | | changeset: 9:7010c0af0a35
855 855 |\ \ \ \ parent: 7:b632bb1b1224
856 856 | | | | | parent: 8:7a0b11f71937
857 857 | | | | | user: test
858 858 | | | | | date: Thu Jan 01 00:00:09 1970 +0000
859 859 | | | | | summary: (9) expand
860 860 | | | | |
861 861 | o-----+ changeset: 8:7a0b11f71937
862 862 | | | | | parent: 0:e6eb3150255d
863 863 |/ / / / parent: 7:b632bb1b1224
864 864 | | | | user: test
865 865 | | | | date: Thu Jan 01 00:00:08 1970 +0000
866 866 | | | | summary: (8) merge two known; one immediate left, one far right
867 867 | | | |
868 868 o | | | changeset: 7:b632bb1b1224
869 869 |\ \ \ \ parent: 2:3d9a33b8d1e1
870 870 | | | | | parent: 5:4409d547b708
871 871 | | | | | user: test
872 872 | | | | | date: Thu Jan 01 00:00:07 1970 +0000
873 873 | | | | | summary: (7) expand
874 874 | | | | |
875 875 +---o | | changeset: 6:b105a072e251
876 876 | |/ / / parent: 2:3d9a33b8d1e1
877 877 | | | | parent: 5:4409d547b708
878 878 | | | | user: test
879 879 | | | | date: Thu Jan 01 00:00:06 1970 +0000
880 880 | | | | summary: (6) merge two known; one immediate left, one far left
881 881 | | | |
882 882 | o | | changeset: 5:4409d547b708
883 883 | |\ \ \ parent: 3:27eef8ed80b4
884 884 | | | | | parent: 4:26a8bac39d9f
885 885 | | | | | user: test
886 886 | | | | | date: Thu Jan 01 00:00:05 1970 +0000
887 887 | | | | | summary: (5) expand
888 888 | | | | |
889 889 | | o | | changeset: 4:26a8bac39d9f
890 890 | |/|/ / parent: 1:6db2ef61d156
891 891 | | | | parent: 3:27eef8ed80b4
892 892 | | | | user: test
893 893 | | | | date: Thu Jan 01 00:00:04 1970 +0000
894 894 | | | | summary: (4) merge two known; one immediate left, one immediate right
895 895 | | | |
896 896 | o | | changeset: 3:27eef8ed80b4
897 897 |/ / / user: test
898 898 | | | date: Thu Jan 01 00:00:03 1970 +0000
899 899 | | | summary: (3) collapse
900 900 | | |
901 901 o | | changeset: 2:3d9a33b8d1e1
902 902 |/ / user: test
903 903 | | date: Thu Jan 01 00:00:02 1970 +0000
904 904 | | summary: (2) collapse
905 905 | |
906 906 o | changeset: 1:6db2ef61d156
907 907 |/ user: test
908 908 | date: Thu Jan 01 00:00:01 1970 +0000
909 909 | summary: (1) collapse
910 910 |
911 911 o changeset: 0:e6eb3150255d
912 912 user: test
913 913 date: Thu Jan 01 00:00:00 1970 +0000
914 914 summary: (0) root
915 915
916 916
917 917
918 918 File glog per revset (only merges):
919 919
920 920 $ hg log -G -r 'file("a")' -m
921 921 o changeset: 32:d06dffa21a31
922 922 |\ parent: 27:886ed638191b
923 923 | : parent: 31:621d83e11f67
924 924 | : user: test
925 925 | : date: Thu Jan 01 00:00:32 1970 +0000
926 926 | : summary: (32) expand
927 927 | :
928 928 o : changeset: 31:621d83e11f67
929 929 |\: parent: 21:d42a756af44d
930 930 | : parent: 30:6e11cd4b648f
931 931 | : user: test
932 932 | : date: Thu Jan 01 00:00:31 1970 +0000
933 933 | : summary: (31) expand
934 934 | :
935 935 o : changeset: 30:6e11cd4b648f
936 936 |\ \ parent: 28:44ecd0b9ae99
937 937 | ~ : parent: 29:cd9bb2be7593
938 938 | : user: test
939 939 | : date: Thu Jan 01 00:00:30 1970 +0000
940 940 | : summary: (30) expand
941 941 | /
942 942 o : changeset: 28:44ecd0b9ae99
943 943 |\ \ parent: 1:6db2ef61d156
944 944 | ~ : parent: 26:7f25b6c2f0b9
945 945 | : user: test
946 946 | : date: Thu Jan 01 00:00:28 1970 +0000
947 947 | : summary: (28) merge zero known
948 948 | /
949 949 o : changeset: 26:7f25b6c2f0b9
950 950 |\ \ parent: 18:1aa84d96232a
951 951 | | : parent: 25:91da8ed57247
952 952 | | : user: test
953 953 | | : date: Thu Jan 01 00:00:26 1970 +0000
954 954 | | : summary: (26) merge one known; far right
955 955 | | :
956 956 | o : changeset: 25:91da8ed57247
957 957 | |\: parent: 21:d42a756af44d
958 958 | | : parent: 24:a9c19a3d96b7
959 959 | | : user: test
960 960 | | : date: Thu Jan 01 00:00:25 1970 +0000
961 961 | | : summary: (25) merge one known; far left
962 962 | | :
963 963 | o : changeset: 24:a9c19a3d96b7
964 964 | |\ \ parent: 0:e6eb3150255d
965 965 | | ~ : parent: 23:a01cddf0766d
966 966 | | : user: test
967 967 | | : date: Thu Jan 01 00:00:24 1970 +0000
968 968 | | : summary: (24) merge one known; immediate right
969 969 | | /
970 970 | o : changeset: 23:a01cddf0766d
971 971 | |\ \ parent: 1:6db2ef61d156
972 972 | | ~ : parent: 22:e0d9cccacb5d
973 973 | | : user: test
974 974 | | : date: Thu Jan 01 00:00:23 1970 +0000
975 975 | | : summary: (23) merge one known; immediate left
976 976 | | /
977 977 | o : changeset: 22:e0d9cccacb5d
978 978 |/:/ parent: 18:1aa84d96232a
979 979 | : parent: 21:d42a756af44d
980 980 | : user: test
981 981 | : date: Thu Jan 01 00:00:22 1970 +0000
982 982 | : summary: (22) merge two known; one far left, one far right
983 983 | :
984 984 | o changeset: 21:d42a756af44d
985 985 | |\ parent: 19:31ddc2c1573b
986 986 | | | parent: 20:d30ed6450e32
987 987 | | | user: test
988 988 | | | date: Thu Jan 01 00:00:21 1970 +0000
989 989 | | | summary: (21) expand
990 990 | | |
991 991 +---o changeset: 20:d30ed6450e32
992 992 | | | parent: 0:e6eb3150255d
993 993 | | ~ parent: 18:1aa84d96232a
994 994 | | user: test
995 995 | | date: Thu Jan 01 00:00:20 1970 +0000
996 996 | | summary: (20) merge two known; two far right
997 997 | |
998 998 | o changeset: 19:31ddc2c1573b
999 999 | |\ parent: 15:1dda3f72782d
1000 1000 | | | parent: 17:44765d7c06e0
1001 1001 | | | user: test
1002 1002 | | | date: Thu Jan 01 00:00:19 1970 +0000
1003 1003 | | | summary: (19) expand
1004 1004 | | |
1005 1005 o | | changeset: 18:1aa84d96232a
1006 1006 |\| | parent: 1:6db2ef61d156
1007 1007 ~ | | parent: 15:1dda3f72782d
1008 1008 | | user: test
1009 1009 | | date: Thu Jan 01 00:00:18 1970 +0000
1010 1010 | | summary: (18) merge two known; two far left
1011 1011 / /
1012 1012 | o changeset: 17:44765d7c06e0
1013 1013 | |\ parent: 12:86b91144a6e9
1014 1014 | | | parent: 16:3677d192927d
1015 1015 | | | user: test
1016 1016 | | | date: Thu Jan 01 00:00:17 1970 +0000
1017 1017 | | | summary: (17) expand
1018 1018 | | |
1019 1019 | | o changeset: 16:3677d192927d
1020 1020 | | |\ parent: 0:e6eb3150255d
1021 1021 | | ~ ~ parent: 1:6db2ef61d156
1022 1022 | | user: test
1023 1023 | | date: Thu Jan 01 00:00:16 1970 +0000
1024 1024 | | summary: (16) merge two known; one immediate right, one near right
1025 1025 | |
1026 1026 o | changeset: 15:1dda3f72782d
1027 1027 |\ \ parent: 13:22d8966a97e3
1028 1028 | | | parent: 14:8eac370358ef
1029 1029 | | | user: test
1030 1030 | | | date: Thu Jan 01 00:00:15 1970 +0000
1031 1031 | | | summary: (15) expand
1032 1032 | | |
1033 1033 | o | changeset: 14:8eac370358ef
1034 1034 | |\| parent: 0:e6eb3150255d
1035 1035 | ~ | parent: 12:86b91144a6e9
1036 1036 | | user: test
1037 1037 | | date: Thu Jan 01 00:00:14 1970 +0000
1038 1038 | | summary: (14) merge two known; one immediate right, one far right
1039 1039 | /
1040 1040 o | changeset: 13:22d8966a97e3
1041 1041 |\ \ parent: 9:7010c0af0a35
1042 1042 | | | parent: 11:832d76e6bdf2
1043 1043 | | | user: test
1044 1044 | | | date: Thu Jan 01 00:00:13 1970 +0000
1045 1045 | | | summary: (13) expand
1046 1046 | | |
1047 1047 +---o changeset: 12:86b91144a6e9
1048 1048 | | | parent: 1:6db2ef61d156
1049 1049 | | ~ parent: 9:7010c0af0a35
1050 1050 | | user: test
1051 1051 | | date: Thu Jan 01 00:00:12 1970 +0000
1052 1052 | | summary: (12) merge two known; one immediate right, one far left
1053 1053 | |
1054 1054 | o changeset: 11:832d76e6bdf2
1055 1055 | |\ parent: 6:b105a072e251
1056 1056 | | | parent: 10:74c64d036d72
1057 1057 | | | user: test
1058 1058 | | | date: Thu Jan 01 00:00:11 1970 +0000
1059 1059 | | | summary: (11) expand
1060 1060 | | |
1061 1061 | | o changeset: 10:74c64d036d72
1062 1062 | |/| parent: 0:e6eb3150255d
1063 1063 | | ~ parent: 6:b105a072e251
1064 1064 | | user: test
1065 1065 | | date: Thu Jan 01 00:00:10 1970 +0000
1066 1066 | | summary: (10) merge two known; one immediate left, one near right
1067 1067 | |
1068 1068 o | changeset: 9:7010c0af0a35
1069 1069 |\ \ parent: 7:b632bb1b1224
1070 1070 | | | parent: 8:7a0b11f71937
1071 1071 | | | user: test
1072 1072 | | | date: Thu Jan 01 00:00:09 1970 +0000
1073 1073 | | | summary: (9) expand
1074 1074 | | |
1075 1075 | o | changeset: 8:7a0b11f71937
1076 1076 |/| | parent: 0:e6eb3150255d
1077 1077 | ~ | parent: 7:b632bb1b1224
1078 1078 | | user: test
1079 1079 | | date: Thu Jan 01 00:00:08 1970 +0000
1080 1080 | | summary: (8) merge two known; one immediate left, one far right
1081 1081 | /
1082 1082 o | changeset: 7:b632bb1b1224
1083 1083 |\ \ parent: 2:3d9a33b8d1e1
1084 1084 | ~ | parent: 5:4409d547b708
1085 1085 | | user: test
1086 1086 | | date: Thu Jan 01 00:00:07 1970 +0000
1087 1087 | | summary: (7) expand
1088 1088 | /
1089 1089 | o changeset: 6:b105a072e251
1090 1090 |/| parent: 2:3d9a33b8d1e1
1091 1091 | ~ parent: 5:4409d547b708
1092 1092 | user: test
1093 1093 | date: Thu Jan 01 00:00:06 1970 +0000
1094 1094 | summary: (6) merge two known; one immediate left, one far left
1095 1095 |
1096 1096 o changeset: 5:4409d547b708
1097 1097 |\ parent: 3:27eef8ed80b4
1098 1098 | ~ parent: 4:26a8bac39d9f
1099 1099 | user: test
1100 1100 | date: Thu Jan 01 00:00:05 1970 +0000
1101 1101 | summary: (5) expand
1102 1102 |
1103 1103 o changeset: 4:26a8bac39d9f
1104 1104 |\ parent: 1:6db2ef61d156
1105 1105 ~ ~ parent: 3:27eef8ed80b4
1106 1106 user: test
1107 1107 date: Thu Jan 01 00:00:04 1970 +0000
1108 1108 summary: (4) merge two known; one immediate left, one immediate right
1109 1109
1110 1110
1111 1111
1112 1112 Empty revision range - display nothing:
1113 1113 $ hg log -G -r 1..0
1114 1114
1115 1115 $ cd ..
1116 1116
1117 1117 #if no-outer-repo
1118 1118
1119 1119 From outer space:
1120 1120 $ hg log -G -l1 repo
1121 1121 @ changeset: 34:fea3ac5810e0
1122 1122 | tag: tip
1123 1123 ~ parent: 32:d06dffa21a31
1124 1124 user: test
1125 1125 date: Thu Jan 01 00:00:34 1970 +0000
1126 1126 summary: (34) head
1127 1127
1128 1128 $ hg log -G -l1 repo/a
1129 1129 @ changeset: 34:fea3ac5810e0
1130 1130 | tag: tip
1131 1131 ~ parent: 32:d06dffa21a31
1132 1132 user: test
1133 1133 date: Thu Jan 01 00:00:34 1970 +0000
1134 1134 summary: (34) head
1135 1135
1136 1136 $ hg log -G -l1 repo/missing
1137 1137
1138 1138 #endif
1139 1139
1140 1140 File log with revs != cset revs:
1141 1141 $ hg init flog
1142 1142 $ cd flog
1143 1143 $ echo one >one
1144 1144 $ hg add one
1145 1145 $ hg commit -mone
1146 1146 $ echo two >two
1147 1147 $ hg add two
1148 1148 $ hg commit -mtwo
1149 1149 $ echo more >two
1150 1150 $ hg commit -mmore
1151 1151 $ hg log -G two
1152 1152 @ changeset: 2:12c28321755b
1153 1153 | tag: tip
1154 1154 | user: test
1155 1155 | date: Thu Jan 01 00:00:00 1970 +0000
1156 1156 | summary: more
1157 1157 |
1158 1158 o changeset: 1:5ac72c0599bf
1159 1159 | user: test
1160 1160 ~ date: Thu Jan 01 00:00:00 1970 +0000
1161 1161 summary: two
1162 1162
1163 1163
1164 1164 Issue1896: File log with explicit style
1165 1165 $ hg log -G --style=default one
1166 1166 o changeset: 0:3d578b4a1f53
1167 1167 user: test
1168 1168 date: Thu Jan 01 00:00:00 1970 +0000
1169 1169 summary: one
1170 1170
1171 1171 Issue2395: glog --style header and footer
1172 1172 $ hg log -G --style=xml one
1173 1173 <?xml version="1.0"?>
1174 1174 <log>
1175 1175 o <logentry revision="0" node="3d578b4a1f537d5fcf7301bfa9c0b97adfaa6fb1">
1176 1176 <author email="test">test</author>
1177 1177 <date>1970-01-01T00:00:00+00:00</date>
1178 1178 <msg xml:space="preserve">one</msg>
1179 1179 </logentry>
1180 1180 </log>
1181 1181
1182 1182 $ cd ..
1183 1183
1184 1184 Incoming and outgoing:
1185 1185
1186 1186 $ hg clone -U -r31 repo repo2
1187 1187 adding changesets
1188 1188 adding manifests
1189 1189 adding file changes
1190 1190 added 31 changesets with 31 changes to 1 files
1191 1191 new changesets e6eb3150255d:621d83e11f67
1192 1192 $ cd repo2
1193 1193
1194 1194 $ hg incoming --graph ../repo
1195 1195 comparing with ../repo
1196 1196 searching for changes
1197 1197 o changeset: 34:fea3ac5810e0
1198 1198 | tag: tip
1199 1199 | parent: 32:d06dffa21a31
1200 1200 | user: test
1201 1201 | date: Thu Jan 01 00:00:34 1970 +0000
1202 1202 | summary: (34) head
1203 1203 |
1204 1204 | o changeset: 33:68608f5145f9
1205 1205 | parent: 18:1aa84d96232a
1206 1206 | user: test
1207 1207 | date: Thu Jan 01 00:00:33 1970 +0000
1208 1208 | summary: (33) head
1209 1209 |
1210 1210 o changeset: 32:d06dffa21a31
1211 1211 | parent: 27:886ed638191b
1212 1212 | parent: 31:621d83e11f67
1213 1213 | user: test
1214 1214 | date: Thu Jan 01 00:00:32 1970 +0000
1215 1215 | summary: (32) expand
1216 1216 |
1217 1217 o changeset: 27:886ed638191b
1218 1218 parent: 21:d42a756af44d
1219 1219 user: test
1220 1220 date: Thu Jan 01 00:00:27 1970 +0000
1221 1221 summary: (27) collapse
1222 1222
1223 1223 $ cd ..
1224 1224
1225 1225 $ hg -R repo outgoing --graph repo2
1226 1226 comparing with repo2
1227 1227 searching for changes
1228 1228 @ changeset: 34:fea3ac5810e0
1229 1229 | tag: tip
1230 1230 | parent: 32:d06dffa21a31
1231 1231 | user: test
1232 1232 | date: Thu Jan 01 00:00:34 1970 +0000
1233 1233 | summary: (34) head
1234 1234 |
1235 1235 | o changeset: 33:68608f5145f9
1236 1236 | parent: 18:1aa84d96232a
1237 1237 | user: test
1238 1238 | date: Thu Jan 01 00:00:33 1970 +0000
1239 1239 | summary: (33) head
1240 1240 |
1241 1241 o changeset: 32:d06dffa21a31
1242 1242 | parent: 27:886ed638191b
1243 1243 | parent: 31:621d83e11f67
1244 1244 | user: test
1245 1245 | date: Thu Jan 01 00:00:32 1970 +0000
1246 1246 | summary: (32) expand
1247 1247 |
1248 1248 o changeset: 27:886ed638191b
1249 1249 parent: 21:d42a756af44d
1250 1250 user: test
1251 1251 date: Thu Jan 01 00:00:27 1970 +0000
1252 1252 summary: (27) collapse
1253 1253
1254 1254
1255 1255 File + limit with revs != cset revs:
1256 1256 $ cd repo
1257 1257 $ touch b
1258 1258 $ hg ci -Aqm0
1259 1259 $ hg log -G -l2 a
1260 1260 o changeset: 34:fea3ac5810e0
1261 1261 | parent: 32:d06dffa21a31
1262 1262 ~ user: test
1263 1263 date: Thu Jan 01 00:00:34 1970 +0000
1264 1264 summary: (34) head
1265 1265
1266 1266 o changeset: 33:68608f5145f9
1267 1267 | parent: 18:1aa84d96232a
1268 1268 ~ user: test
1269 1269 date: Thu Jan 01 00:00:33 1970 +0000
1270 1270 summary: (33) head
1271 1271
1272 1272
1273 1273 File + limit + -ra:b, (b - a) < limit:
1274 1274 $ hg log -G -l3000 -r32:tip a
1275 1275 o changeset: 34:fea3ac5810e0
1276 1276 | parent: 32:d06dffa21a31
1277 1277 | user: test
1278 1278 | date: Thu Jan 01 00:00:34 1970 +0000
1279 1279 | summary: (34) head
1280 1280 |
1281 1281 | o changeset: 33:68608f5145f9
1282 1282 | | parent: 18:1aa84d96232a
1283 1283 | ~ user: test
1284 1284 | date: Thu Jan 01 00:00:33 1970 +0000
1285 1285 | summary: (33) head
1286 1286 |
1287 1287 o changeset: 32:d06dffa21a31
1288 1288 |\ parent: 27:886ed638191b
1289 1289 ~ ~ parent: 31:621d83e11f67
1290 1290 user: test
1291 1291 date: Thu Jan 01 00:00:32 1970 +0000
1292 1292 summary: (32) expand
1293 1293
1294 1294
1295 1295 Point out a common and an uncommon unshown parent
1296 1296
1297 1297 $ hg log -G -r 'rev(8) or rev(9)'
1298 1298 o changeset: 9:7010c0af0a35
1299 1299 |\ parent: 7:b632bb1b1224
1300 1300 | ~ parent: 8:7a0b11f71937
1301 1301 | user: test
1302 1302 | date: Thu Jan 01 00:00:09 1970 +0000
1303 1303 | summary: (9) expand
1304 1304 |
1305 1305 o changeset: 8:7a0b11f71937
1306 1306 |\ parent: 0:e6eb3150255d
1307 1307 ~ ~ parent: 7:b632bb1b1224
1308 1308 user: test
1309 1309 date: Thu Jan 01 00:00:08 1970 +0000
1310 1310 summary: (8) merge two known; one immediate left, one far right
1311 1311
1312 1312
1313 1313 File + limit + -ra:b, b < tip:
1314 1314
1315 1315 $ hg log -G -l1 -r32:34 a
1316 1316 o changeset: 34:fea3ac5810e0
1317 1317 | parent: 32:d06dffa21a31
1318 1318 ~ user: test
1319 1319 date: Thu Jan 01 00:00:34 1970 +0000
1320 1320 summary: (34) head
1321 1321
1322 1322
1323 1323 file(File) + limit + -ra:b, b < tip:
1324 1324
1325 1325 $ hg log -G -l1 -r32:34 -r 'file("a")'
1326 1326 o changeset: 34:fea3ac5810e0
1327 1327 | parent: 32:d06dffa21a31
1328 1328 ~ user: test
1329 1329 date: Thu Jan 01 00:00:34 1970 +0000
1330 1330 summary: (34) head
1331 1331
1332 1332
1333 1333 limit(file(File) and a::b), b < tip:
1334 1334
1335 1335 $ hg log -G -r 'limit(file("a") and 32::34, 1)'
1336 1336 o changeset: 32:d06dffa21a31
1337 1337 |\ parent: 27:886ed638191b
1338 1338 ~ ~ parent: 31:621d83e11f67
1339 1339 user: test
1340 1340 date: Thu Jan 01 00:00:32 1970 +0000
1341 1341 summary: (32) expand
1342 1342
1343 1343
1344 1344 File + limit + -ra:b, b < tip:
1345 1345
1346 1346 $ hg log -G -r 'limit(file("a") and 34::32, 1)'
1347 1347
1348 1348 File + limit + -ra:b, b < tip, (b - a) < limit:
1349 1349
1350 1350 $ hg log -G -l10 -r33:34 a
1351 1351 o changeset: 34:fea3ac5810e0
1352 1352 | parent: 32:d06dffa21a31
1353 1353 ~ user: test
1354 1354 date: Thu Jan 01 00:00:34 1970 +0000
1355 1355 summary: (34) head
1356 1356
1357 1357 o changeset: 33:68608f5145f9
1358 1358 | parent: 18:1aa84d96232a
1359 1359 ~ user: test
1360 1360 date: Thu Jan 01 00:00:33 1970 +0000
1361 1361 summary: (33) head
1362 1362
1363 1363
1364 1364 Do not crash or produce strange graphs if history is buggy
1365 1365
1366 1366 $ hg branch branch
1367 1367 marked working directory as branch branch
1368 1368 (branches are permanent and global, did you want a bookmark?)
1369 1369 $ commit 36 "buggy merge: identical parents" 35 35
1370 1370 $ hg log -G -l5
1371 1371 @ changeset: 36:08a19a744424
1372 1372 | branch: branch
1373 1373 | tag: tip
1374 1374 | parent: 35:9159c3644c5e
1375 1375 | parent: 35:9159c3644c5e
1376 1376 | user: test
1377 1377 | date: Thu Jan 01 00:00:36 1970 +0000
1378 1378 | summary: (36) buggy merge: identical parents
1379 1379 |
1380 1380 o changeset: 35:9159c3644c5e
1381 1381 | user: test
1382 1382 | date: Thu Jan 01 00:00:00 1970 +0000
1383 1383 | summary: 0
1384 1384 |
1385 1385 o changeset: 34:fea3ac5810e0
1386 1386 | parent: 32:d06dffa21a31
1387 1387 | user: test
1388 1388 | date: Thu Jan 01 00:00:34 1970 +0000
1389 1389 | summary: (34) head
1390 1390 |
1391 1391 | o changeset: 33:68608f5145f9
1392 1392 | | parent: 18:1aa84d96232a
1393 1393 | ~ user: test
1394 1394 | date: Thu Jan 01 00:00:33 1970 +0000
1395 1395 | summary: (33) head
1396 1396 |
1397 1397 o changeset: 32:d06dffa21a31
1398 1398 |\ parent: 27:886ed638191b
1399 1399 ~ ~ parent: 31:621d83e11f67
1400 1400 user: test
1401 1401 date: Thu Jan 01 00:00:32 1970 +0000
1402 1402 summary: (32) expand
1403 1403
1404 1404
1405 1405 Test log -G options
1406 1406
1407 1407 $ testlog() {
1408 1408 > hg log -G --print-revset "$@"
1409 1409 > hg log --template 'nodetag {rev}\n' "$@" | grep nodetag \
1410 1410 > | sed 's/.*nodetag/nodetag/' > log.nodes
1411 1411 > hg log -G --template 'nodetag {rev}\n' "$@" | grep nodetag \
1412 1412 > | sed 's/.*nodetag/nodetag/' > glog.nodes
1413 1413 > (cmp log.nodes glog.nodes || diff -u log.nodes glog.nodes) \
1414 1414 > | grep '^[-+@ ]' || :
1415 1415 > }
1416 1416
1417 1417 glog always reorders nodes which explains the difference with log
1418 1418
1419 1419 $ testlog -r 27 -r 25 -r 21 -r 34 -r 32 -r 31
1420 1420 ['27', '25', '21', '34', '32', '31']
1421 1421 []
1422 1422 <baseset- [21, 25, 27, 31, 32, 34]>
1423 1423 --- log.nodes * (glob)
1424 1424 +++ glog.nodes * (glob)
1425 1425 @@ -1,6 +1,6 @@
1426 1426 -nodetag 27
1427 1427 -nodetag 25
1428 1428 -nodetag 21
1429 1429 nodetag 34
1430 1430 nodetag 32
1431 1431 nodetag 31
1432 1432 +nodetag 27
1433 1433 +nodetag 25
1434 1434 +nodetag 21
1435 1435 $ testlog -u test -u not-a-user
1436 1436 []
1437 1437 (or
1438 1438 (list
1439 1439 (func
1440 1440 (symbol 'user')
1441 1441 (string 'test'))
1442 1442 (func
1443 1443 (symbol 'user')
1444 1444 (string 'not-a-user'))))
1445 1445 <filteredset
1446 1446 <spanset- 0:37>,
1447 1447 <addset
1448 1448 <filteredset
1449 1449 <fullreposet+ 0:37>,
1450 1450 <user 'test'>>,
1451 1451 <filteredset
1452 1452 <fullreposet+ 0:37>,
1453 1453 <user 'not-a-user'>>>>
1454 1454 $ testlog -b not-a-branch
1455 1455 abort: unknown revision 'not-a-branch'!
1456 1456 abort: unknown revision 'not-a-branch'!
1457 1457 abort: unknown revision 'not-a-branch'!
1458 1458 $ testlog -b 35 -b 36 --only-branch branch
1459 1459 []
1460 1460 (or
1461 1461 (list
1462 1462 (func
1463 1463 (symbol 'branch')
1464 1464 (string 'default'))
1465 1465 (or
1466 1466 (list
1467 1467 (func
1468 1468 (symbol 'branch')
1469 1469 (string 'branch'))
1470 1470 (func
1471 1471 (symbol 'branch')
1472 1472 (string 'branch'))))))
1473 1473 <filteredset
1474 1474 <spanset- 0:37>,
1475 1475 <addset
1476 1476 <filteredset
1477 1477 <fullreposet+ 0:37>,
1478 1478 <branch 'default'>>,
1479 1479 <addset
1480 1480 <filteredset
1481 1481 <fullreposet+ 0:37>,
1482 1482 <branch 'branch'>>,
1483 1483 <filteredset
1484 1484 <fullreposet+ 0:37>,
1485 1485 <branch 'branch'>>>>>
1486 1486 $ testlog -k expand -k merge
1487 1487 []
1488 1488 (or
1489 1489 (list
1490 1490 (func
1491 1491 (symbol 'keyword')
1492 1492 (string 'expand'))
1493 1493 (func
1494 1494 (symbol 'keyword')
1495 1495 (string 'merge'))))
1496 1496 <filteredset
1497 1497 <spanset- 0:37>,
1498 1498 <addset
1499 1499 <filteredset
1500 1500 <fullreposet+ 0:37>,
1501 1501 <keyword 'expand'>>,
1502 1502 <filteredset
1503 1503 <fullreposet+ 0:37>,
1504 1504 <keyword 'merge'>>>>
1505 1505 $ testlog --only-merges
1506 1506 []
1507 1507 (func
1508 1508 (symbol 'merge')
1509 1509 None)
1510 1510 <filteredset
1511 1511 <spanset- 0:37>,
1512 1512 <merge>>
1513 1513 $ testlog --no-merges
1514 1514 []
1515 1515 (not
1516 1516 (func
1517 1517 (symbol 'merge')
1518 1518 None))
1519 1519 <filteredset
1520 1520 <spanset- 0:37>,
1521 1521 <not
1522 1522 <filteredset
1523 1523 <spanset- 0:37>,
1524 1524 <merge>>>>
1525 1525 $ testlog --date '2 0 to 4 0'
1526 1526 []
1527 1527 (func
1528 1528 (symbol 'date')
1529 1529 (string '2 0 to 4 0'))
1530 1530 <filteredset
1531 1531 <spanset- 0:37>,
1532 1532 <date '2 0 to 4 0'>>
1533 1533 $ hg log -G -d 'brace ) in a date'
1534 1534 hg: parse error: invalid date: 'brace ) in a date'
1535 1535 [255]
1536 1536 $ testlog --prune 31 --prune 32
1537 1537 []
1538 1538 (not
1539 1539 (or
1540 1540 (list
1541 1541 (func
1542 1542 (symbol 'ancestors')
1543 1543 (string '31'))
1544 1544 (func
1545 1545 (symbol 'ancestors')
1546 1546 (string '32')))))
1547 1547 <filteredset
1548 1548 <spanset- 0:37>,
1549 1549 <not
1550 1550 <addset
1551 1551 <filteredset
1552 1552 <spanset- 0:37>,
1553 1553 <generatorsetdesc+>>,
1554 1554 <filteredset
1555 1555 <spanset- 0:37>,
1556 1556 <generatorsetdesc+>>>>>
1557 1557
1558 1558 Dedicated repo for --follow and paths filtering. The g is crafted to
1559 1559 have 2 filelog topological heads in a linear changeset graph.
1560 1560
1561 1561 $ cd ..
1562 1562 $ hg init follow
1563 1563 $ cd follow
1564 1564 $ testlog --follow
1565 1565 []
1566 1566 []
1567 1567 <baseset []>
1568 1568 $ testlog -rnull
1569 1569 ['null']
1570 1570 []
1571 1571 <baseset [-1]>
1572 1572 $ echo a > a
1573 1573 $ echo aa > aa
1574 1574 $ echo f > f
1575 1575 $ hg ci -Am "add a" a aa f
1576 1576 $ hg cp a b
1577 1577 $ hg cp f g
1578 1578 $ hg ci -m "copy a b"
1579 1579 $ mkdir dir
1580 1580 $ hg mv b dir
1581 1581 $ echo g >> g
1582 1582 $ echo f >> f
1583 1583 $ hg ci -m "mv b dir/b"
1584 1584 $ hg mv a b
1585 1585 $ hg cp -f f g
1586 1586 $ echo a > d
1587 1587 $ hg add d
1588 1588 $ hg ci -m "mv a b; add d"
1589 1589 $ hg mv dir/b e
1590 1590 $ hg ci -m "mv dir/b e"
1591 1591 $ hg log -G --template '({rev}) {desc|firstline}\n'
1592 1592 @ (4) mv dir/b e
1593 1593 |
1594 1594 o (3) mv a b; add d
1595 1595 |
1596 1596 o (2) mv b dir/b
1597 1597 |
1598 1598 o (1) copy a b
1599 1599 |
1600 1600 o (0) add a
1601 1601
1602 1602
1603 1603 $ testlog a
1604 1604 []
1605 1605 (func
1606 1606 (symbol 'filelog')
1607 1607 (string 'a'))
1608 1608 <filteredset
1609 1609 <spanset- 0:5>, set([0])>
1610 1610 $ testlog a b
1611 1611 []
1612 1612 (or
1613 1613 (list
1614 1614 (func
1615 1615 (symbol 'filelog')
1616 1616 (string 'a'))
1617 1617 (func
1618 1618 (symbol 'filelog')
1619 1619 (string 'b'))))
1620 1620 <filteredset
1621 1621 <spanset- 0:5>,
1622 1622 <addset
1623 1623 <baseset+ [0]>,
1624 1624 <baseset+ [1]>>>
1625 1625
1626 1626 Test falling back to slow path for non-existing files
1627 1627
1628 1628 $ testlog a c
1629 1629 []
1630 1630 (func
1631 1631 (symbol '_matchfiles')
1632 1632 (list
1633 1633 (string 'r:')
1634 1634 (string 'd:relpath')
1635 1635 (string 'p:a')
1636 1636 (string 'p:c')))
1637 1637 <filteredset
1638 1638 <spanset- 0:5>,
1639 1639 <matchfiles patterns=['a', 'c'], include=[] exclude=[], default='relpath', rev=2147483647>>
1640 1640
1641 1641 Test multiple --include/--exclude/paths
1642 1642
1643 1643 $ testlog --include a --include e --exclude b --exclude e a e
1644 1644 []
1645 1645 (func
1646 1646 (symbol '_matchfiles')
1647 1647 (list
1648 1648 (string 'r:')
1649 1649 (string 'd:relpath')
1650 1650 (string 'p:a')
1651 1651 (string 'p:e')
1652 1652 (string 'i:a')
1653 1653 (string 'i:e')
1654 1654 (string 'x:b')
1655 1655 (string 'x:e')))
1656 1656 <filteredset
1657 1657 <spanset- 0:5>,
1658 1658 <matchfiles patterns=['a', 'e'], include=['a', 'e'] exclude=['b', 'e'], default='relpath', rev=2147483647>>
1659 1659
1660 1660 Test glob expansion of pats
1661 1661
1662 1662 $ expandglobs=`"$PYTHON" -c "import mercurial.util; \
1663 1663 > print(mercurial.util.expandglobs and 'true' or 'false')"`
1664 1664 $ if [ $expandglobs = "true" ]; then
1665 1665 > testlog 'a*';
1666 1666 > else
1667 1667 > testlog a*;
1668 1668 > fi;
1669 1669 []
1670 1670 (func
1671 1671 (symbol 'filelog')
1672 1672 (string 'aa'))
1673 1673 <filteredset
1674 1674 <spanset- 0:5>, set([0])>
1675 1675
1676 1676 Test --follow on a non-existent directory
1677 1677
1678 1678 $ testlog -f dir
1679 1679 abort: cannot follow file not in parent revision: "dir"
1680 1680 abort: cannot follow file not in parent revision: "dir"
1681 1681 abort: cannot follow file not in parent revision: "dir"
1682 1682
1683 1683 Test --follow on a directory
1684 1684
1685 1685 $ hg up -q '.^'
1686 1686 $ testlog -f dir
1687 1687 []
1688 1688 (func
1689 1689 (symbol '_matchfiles')
1690 1690 (list
1691 1691 (string 'r:')
1692 1692 (string 'd:relpath')
1693 1693 (string 'p:dir')))
1694 1694 <filteredset
1695 1695 <generatorsetdesc->,
1696 1696 <matchfiles patterns=['dir'], include=[] exclude=[], default='relpath', rev=2147483647>>
1697 1697 $ hg up -q tip
1698 1698
1699 1699 Test --follow on file not in parent revision
1700 1700
1701 1701 $ testlog -f a
1702 1702 abort: cannot follow file not in parent revision: "a"
1703 1703 abort: cannot follow file not in parent revision: "a"
1704 1704 abort: cannot follow file not in parent revision: "a"
1705 1705
1706 1706 Test --follow and patterns
1707 1707
1708 1708 $ testlog -f 'glob:*'
1709 1709 []
1710 1710 (func
1711 1711 (symbol '_matchfiles')
1712 1712 (list
1713 1713 (string 'r:')
1714 1714 (string 'd:relpath')
1715 1715 (string 'p:glob:*')))
1716 1716 <filteredset
1717 1717 <generatorsetdesc->,
1718 1718 <matchfiles patterns=['glob:*'], include=[] exclude=[], default='relpath', rev=2147483647>>
1719 1719
1720 1720 Test --follow on a single rename
1721 1721
1722 1722 $ hg up -q 2
1723 1723 $ testlog -f a
1724 1724 []
1725 1725 []
1726 1726 <generatorsetdesc->
1727 1727
1728 1728 Test --follow and multiple renames
1729 1729
1730 1730 $ hg up -q tip
1731 1731 $ testlog -f e
1732 1732 []
1733 1733 []
1734 1734 <generatorsetdesc->
1735 1735
1736 1736 Test --follow and multiple filelog heads
1737 1737
1738 1738 $ hg up -q 2
1739 1739 $ testlog -f g
1740 1740 []
1741 1741 []
1742 1742 <generatorsetdesc->
1743 1743 $ cat log.nodes
1744 1744 nodetag 2
1745 1745 nodetag 1
1746 1746 nodetag 0
1747 1747 $ hg up -q tip
1748 1748 $ testlog -f g
1749 1749 []
1750 1750 []
1751 1751 <generatorsetdesc->
1752 1752 $ cat log.nodes
1753 1753 nodetag 3
1754 1754 nodetag 2
1755 1755 nodetag 0
1756 1756
1757 1757 Test --follow and multiple files
1758 1758
1759 1759 $ testlog -f g e
1760 1760 []
1761 1761 []
1762 1762 <generatorsetdesc->
1763 1763 $ cat log.nodes
1764 1764 nodetag 4
1765 1765 nodetag 3
1766 1766 nodetag 2
1767 1767 nodetag 1
1768 1768 nodetag 0
1769 1769
1770 1770 Test --follow null parent
1771 1771
1772 1772 $ hg up -q null
1773 1773 $ testlog -f
1774 1774 []
1775 1775 []
1776 1776 <baseset []>
1777 1777
1778 1778 Test --follow-first
1779 1779
1780 1780 $ hg up -q 3
1781 1781 $ echo ee > e
1782 1782 $ hg ci -Am "add another e" e
1783 1783 created new head
1784 1784 $ hg merge --tool internal:other 4
1785 1785 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
1786 1786 (branch merge, don't forget to commit)
1787 1787 $ echo merge > e
1788 1788 $ hg ci -m "merge 5 and 4"
1789 1789 $ testlog --follow-first
1790 1790 []
1791 1791 []
1792 1792 <generatorsetdesc->
1793 1793
1794 1794 Cannot compare with log --follow-first FILE as it never worked
1795 1795
1796 1796 $ hg log -G --print-revset --follow-first e
1797 1797 []
1798 1798 []
1799 1799 <generatorsetdesc->
1800 1800 $ hg log -G --follow-first e --template '{rev} {desc|firstline}\n'
1801 1801 @ 6 merge 5 and 4
1802 1802 |\
1803 1803 | ~
1804 1804 o 5 add another e
1805 1805 |
1806 1806 ~
1807 1807
1808 1808 Test --copies
1809 1809
1810 1810 $ hg log -G --copies --template "{rev} {desc|firstline} \
1811 1811 > copies: {file_copies_switch}\n"
1812 1812 @ 6 merge 5 and 4 copies:
1813 1813 |\
1814 1814 | o 5 add another e copies:
1815 1815 | |
1816 1816 o | 4 mv dir/b e copies: e (dir/b)
1817 1817 |/
1818 1818 o 3 mv a b; add d copies: b (a)g (f)
1819 1819 |
1820 1820 o 2 mv b dir/b copies: dir/b (b)
1821 1821 |
1822 1822 o 1 copy a b copies: b (a)g (f)
1823 1823 |
1824 1824 o 0 add a copies:
1825 1825
1826 1826 Test "set:..." and parent revision
1827 1827
1828 1828 $ hg up -q 4
1829 1829 $ testlog "set:copied()"
1830 1830 []
1831 1831 (func
1832 1832 (symbol '_matchfiles')
1833 1833 (list
1834 1834 (string 'r:')
1835 1835 (string 'd:relpath')
1836 1836 (string 'p:set:copied()')))
1837 1837 <filteredset
1838 1838 <spanset- 0:7>,
1839 1839 <matchfiles patterns=['set:copied()'], include=[] exclude=[], default='relpath', rev=2147483647>>
1840 1840 $ testlog --include "set:copied()"
1841 1841 []
1842 1842 (func
1843 1843 (symbol '_matchfiles')
1844 1844 (list
1845 1845 (string 'r:')
1846 1846 (string 'd:relpath')
1847 1847 (string 'i:set:copied()')))
1848 1848 <filteredset
1849 1849 <spanset- 0:7>,
1850 1850 <matchfiles patterns=[], include=['set:copied()'] exclude=[], default='relpath', rev=2147483647>>
1851 1851 $ testlog -r "sort(file('set:copied()'), -rev)"
1852 1852 ['sort(file(\'set:copied()\'), -rev)']
1853 1853 []
1854 1854 <filteredset
1855 1855 <fullreposet- 0:7>,
1856 1856 <matchfiles patterns=['set:copied()'], include=[] exclude=[], default='glob', rev=None>>
1857 1857
1858 1858 Test --removed
1859 1859
1860 1860 $ testlog --removed
1861 1861 []
1862 1862 []
1863 1863 <spanset- 0:7>
1864 1864 $ testlog --removed a
1865 1865 []
1866 1866 (func
1867 1867 (symbol '_matchfiles')
1868 1868 (list
1869 1869 (string 'r:')
1870 1870 (string 'd:relpath')
1871 1871 (string 'p:a')))
1872 1872 <filteredset
1873 1873 <spanset- 0:7>,
1874 1874 <matchfiles patterns=['a'], include=[] exclude=[], default='relpath', rev=2147483647>>
1875 1875 $ testlog --removed --follow a
1876 1876 []
1877 1877 (func
1878 1878 (symbol '_matchfiles')
1879 1879 (list
1880 1880 (string 'r:')
1881 1881 (string 'd:relpath')
1882 1882 (string 'p:a')))
1883 1883 <filteredset
1884 1884 <generatorsetdesc->,
1885 1885 <matchfiles patterns=['a'], include=[] exclude=[], default='relpath', rev=2147483647>>
1886 1886
1887 1887 Test --patch and --stat with --follow and --follow-first
1888 1888
1889 1889 $ hg up -q 3
1890 1890 $ hg log -G --git --patch b
1891 1891 o changeset: 1:216d4c92cf98
1892 1892 | user: test
1893 1893 ~ date: Thu Jan 01 00:00:00 1970 +0000
1894 1894 summary: copy a b
1895 1895
1896 1896 diff --git a/a b/b
1897 1897 copy from a
1898 1898 copy to b
1899 1899
1900 1900
1901 1901 $ hg log -G --git --stat b
1902 1902 o changeset: 1:216d4c92cf98
1903 1903 | user: test
1904 1904 ~ date: Thu Jan 01 00:00:00 1970 +0000
1905 1905 summary: copy a b
1906 1906
1907 1907 b | 0
1908 1908 1 files changed, 0 insertions(+), 0 deletions(-)
1909 1909
1910 1910
1911 1911 $ hg log -G --git --patch --follow b
1912 1912 o changeset: 1:216d4c92cf98
1913 1913 | user: test
1914 1914 | date: Thu Jan 01 00:00:00 1970 +0000
1915 1915 | summary: copy a b
1916 1916 |
1917 1917 | diff --git a/a b/b
1918 1918 | copy from a
1919 1919 | copy to b
1920 1920 |
1921 1921 o changeset: 0:f8035bb17114
1922 1922 user: test
1923 1923 date: Thu Jan 01 00:00:00 1970 +0000
1924 1924 summary: add a
1925 1925
1926 1926 diff --git a/a b/a
1927 1927 new file mode 100644
1928 1928 --- /dev/null
1929 1929 +++ b/a
1930 1930 @@ -0,0 +1,1 @@
1931 1931 +a
1932 1932
1933 1933
1934 1934 $ hg log -G --git --stat --follow b
1935 1935 o changeset: 1:216d4c92cf98
1936 1936 | user: test
1937 1937 | date: Thu Jan 01 00:00:00 1970 +0000
1938 1938 | summary: copy a b
1939 1939 |
1940 1940 | b | 0
1941 1941 | 1 files changed, 0 insertions(+), 0 deletions(-)
1942 1942 |
1943 1943 o changeset: 0:f8035bb17114
1944 1944 user: test
1945 1945 date: Thu Jan 01 00:00:00 1970 +0000
1946 1946 summary: add a
1947 1947
1948 1948 a | 1 +
1949 1949 1 files changed, 1 insertions(+), 0 deletions(-)
1950 1950
1951 1951
1952 1952 $ hg up -q 6
1953 1953 $ hg log -G --git --patch --follow-first e
1954 1954 @ changeset: 6:fc281d8ff18d
1955 1955 |\ tag: tip
1956 1956 | ~ parent: 5:99b31f1c2782
1957 1957 | parent: 4:17d952250a9d
1958 1958 | user: test
1959 1959 | date: Thu Jan 01 00:00:00 1970 +0000
1960 1960 | summary: merge 5 and 4
1961 1961 |
1962 1962 | diff --git a/e b/e
1963 1963 | --- a/e
1964 1964 | +++ b/e
1965 1965 | @@ -1,1 +1,1 @@
1966 1966 | -ee
1967 1967 | +merge
1968 1968 |
1969 1969 o changeset: 5:99b31f1c2782
1970 1970 | parent: 3:5918b8d165d1
1971 1971 ~ user: test
1972 1972 date: Thu Jan 01 00:00:00 1970 +0000
1973 1973 summary: add another e
1974 1974
1975 1975 diff --git a/e b/e
1976 1976 new file mode 100644
1977 1977 --- /dev/null
1978 1978 +++ b/e
1979 1979 @@ -0,0 +1,1 @@
1980 1980 +ee
1981 1981
1982 1982
1983 1983 Test old-style --rev
1984 1984
1985 1985 $ hg tag 'foo-bar'
1986 1986 $ testlog -r 'foo-bar'
1987 1987 ['foo-bar']
1988 1988 []
1989 1989 <baseset [6]>
1990 1990
1991 1991 Test --follow and forward --rev
1992 1992
1993 1993 $ hg up -q 6
1994 1994 $ echo g > g
1995 1995 $ hg ci -Am 'add g' g
1996 1996 created new head
1997 1997 $ hg up -q 2
1998 1998 $ hg log -G --template "{rev} {desc|firstline}\n"
1999 1999 o 8 add g
2000 2000 |
2001 2001 | o 7 Added tag foo-bar for changeset fc281d8ff18d
2002 2002 |/
2003 2003 o 6 merge 5 and 4
2004 2004 |\
2005 2005 | o 5 add another e
2006 2006 | |
2007 2007 o | 4 mv dir/b e
2008 2008 |/
2009 2009 o 3 mv a b; add d
2010 2010 |
2011 2011 @ 2 mv b dir/b
2012 2012 |
2013 2013 o 1 copy a b
2014 2014 |
2015 2015 o 0 add a
2016 2016
2017 2017 $ hg archive -r 7 archive
2018 2018 $ grep changessincelatesttag archive/.hg_archival.txt
2019 2019 changessincelatesttag: 1
2020 2020 $ rm -r archive
2021 2021
2022 2022 changessincelatesttag with no prior tag
2023 2023 $ hg archive -r 4 archive
2024 2024 $ grep changessincelatesttag archive/.hg_archival.txt
2025 2025 changessincelatesttag: 5
2026 2026
2027 2027 $ hg export 'all()'
2028 2028 # HG changeset patch
2029 2029 # User test
2030 2030 # Date 0 0
2031 2031 # Thu Jan 01 00:00:00 1970 +0000
2032 2032 # Node ID f8035bb17114da16215af3436ec5222428ace8ee
2033 2033 # Parent 0000000000000000000000000000000000000000
2034 2034 add a
2035 2035
2036 2036 diff -r 000000000000 -r f8035bb17114 a
2037 2037 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2038 2038 +++ b/a Thu Jan 01 00:00:00 1970 +0000
2039 2039 @@ -0,0 +1,1 @@
2040 2040 +a
2041 2041 diff -r 000000000000 -r f8035bb17114 aa
2042 2042 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2043 2043 +++ b/aa Thu Jan 01 00:00:00 1970 +0000
2044 2044 @@ -0,0 +1,1 @@
2045 2045 +aa
2046 2046 diff -r 000000000000 -r f8035bb17114 f
2047 2047 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2048 2048 +++ b/f Thu Jan 01 00:00:00 1970 +0000
2049 2049 @@ -0,0 +1,1 @@
2050 2050 +f
2051 2051 # HG changeset patch
2052 2052 # User test
2053 2053 # Date 0 0
2054 2054 # Thu Jan 01 00:00:00 1970 +0000
2055 2055 # Node ID 216d4c92cf98ff2b4641d508b76b529f3d424c92
2056 2056 # Parent f8035bb17114da16215af3436ec5222428ace8ee
2057 2057 copy a b
2058 2058
2059 2059 diff -r f8035bb17114 -r 216d4c92cf98 b
2060 2060 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2061 2061 +++ b/b Thu Jan 01 00:00:00 1970 +0000
2062 2062 @@ -0,0 +1,1 @@
2063 2063 +a
2064 2064 diff -r f8035bb17114 -r 216d4c92cf98 g
2065 2065 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2066 2066 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2067 2067 @@ -0,0 +1,1 @@
2068 2068 +f
2069 2069 # HG changeset patch
2070 2070 # User test
2071 2071 # Date 0 0
2072 2072 # Thu Jan 01 00:00:00 1970 +0000
2073 2073 # Node ID bb573313a9e8349099b6ea2b2fb1fc7f424446f3
2074 2074 # Parent 216d4c92cf98ff2b4641d508b76b529f3d424c92
2075 2075 mv b dir/b
2076 2076
2077 2077 diff -r 216d4c92cf98 -r bb573313a9e8 b
2078 2078 --- a/b Thu Jan 01 00:00:00 1970 +0000
2079 2079 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2080 2080 @@ -1,1 +0,0 @@
2081 2081 -a
2082 2082 diff -r 216d4c92cf98 -r bb573313a9e8 dir/b
2083 2083 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2084 2084 +++ b/dir/b Thu Jan 01 00:00:00 1970 +0000
2085 2085 @@ -0,0 +1,1 @@
2086 2086 +a
2087 2087 diff -r 216d4c92cf98 -r bb573313a9e8 f
2088 2088 --- a/f Thu Jan 01 00:00:00 1970 +0000
2089 2089 +++ b/f Thu Jan 01 00:00:00 1970 +0000
2090 2090 @@ -1,1 +1,2 @@
2091 2091 f
2092 2092 +f
2093 2093 diff -r 216d4c92cf98 -r bb573313a9e8 g
2094 2094 --- a/g Thu Jan 01 00:00:00 1970 +0000
2095 2095 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2096 2096 @@ -1,1 +1,2 @@
2097 2097 f
2098 2098 +g
2099 2099 # HG changeset patch
2100 2100 # User test
2101 2101 # Date 0 0
2102 2102 # Thu Jan 01 00:00:00 1970 +0000
2103 2103 # Node ID 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2104 2104 # Parent bb573313a9e8349099b6ea2b2fb1fc7f424446f3
2105 2105 mv a b; add d
2106 2106
2107 2107 diff -r bb573313a9e8 -r 5918b8d165d1 a
2108 2108 --- a/a Thu Jan 01 00:00:00 1970 +0000
2109 2109 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2110 2110 @@ -1,1 +0,0 @@
2111 2111 -a
2112 2112 diff -r bb573313a9e8 -r 5918b8d165d1 b
2113 2113 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2114 2114 +++ b/b Thu Jan 01 00:00:00 1970 +0000
2115 2115 @@ -0,0 +1,1 @@
2116 2116 +a
2117 2117 diff -r bb573313a9e8 -r 5918b8d165d1 d
2118 2118 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2119 2119 +++ b/d Thu Jan 01 00:00:00 1970 +0000
2120 2120 @@ -0,0 +1,1 @@
2121 2121 +a
2122 2122 diff -r bb573313a9e8 -r 5918b8d165d1 g
2123 2123 --- a/g Thu Jan 01 00:00:00 1970 +0000
2124 2124 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2125 2125 @@ -1,2 +1,2 @@
2126 2126 f
2127 2127 -g
2128 2128 +f
2129 2129 # HG changeset patch
2130 2130 # User test
2131 2131 # Date 0 0
2132 2132 # Thu Jan 01 00:00:00 1970 +0000
2133 2133 # Node ID 17d952250a9d03cc3dc77b199ab60e959b9b0260
2134 2134 # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2135 2135 mv dir/b e
2136 2136
2137 2137 diff -r 5918b8d165d1 -r 17d952250a9d dir/b
2138 2138 --- a/dir/b Thu Jan 01 00:00:00 1970 +0000
2139 2139 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2140 2140 @@ -1,1 +0,0 @@
2141 2141 -a
2142 2142 diff -r 5918b8d165d1 -r 17d952250a9d e
2143 2143 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2144 2144 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2145 2145 @@ -0,0 +1,1 @@
2146 2146 +a
2147 2147 # HG changeset patch
2148 2148 # User test
2149 2149 # Date 0 0
2150 2150 # Thu Jan 01 00:00:00 1970 +0000
2151 2151 # Node ID 99b31f1c2782e2deb1723cef08930f70fc84b37b
2152 2152 # Parent 5918b8d165d1364e78a66d02e66caa0133c5d1ed
2153 2153 add another e
2154 2154
2155 2155 diff -r 5918b8d165d1 -r 99b31f1c2782 e
2156 2156 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2157 2157 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2158 2158 @@ -0,0 +1,1 @@
2159 2159 +ee
2160 2160 # HG changeset patch
2161 2161 # User test
2162 2162 # Date 0 0
2163 2163 # Thu Jan 01 00:00:00 1970 +0000
2164 2164 # Node ID fc281d8ff18d999ad6497b3d27390bcd695dcc73
2165 2165 # Parent 99b31f1c2782e2deb1723cef08930f70fc84b37b
2166 2166 # Parent 17d952250a9d03cc3dc77b199ab60e959b9b0260
2167 2167 merge 5 and 4
2168 2168
2169 2169 diff -r 99b31f1c2782 -r fc281d8ff18d dir/b
2170 2170 --- a/dir/b Thu Jan 01 00:00:00 1970 +0000
2171 2171 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2172 2172 @@ -1,1 +0,0 @@
2173 2173 -a
2174 2174 diff -r 99b31f1c2782 -r fc281d8ff18d e
2175 2175 --- a/e Thu Jan 01 00:00:00 1970 +0000
2176 2176 +++ b/e Thu Jan 01 00:00:00 1970 +0000
2177 2177 @@ -1,1 +1,1 @@
2178 2178 -ee
2179 2179 +merge
2180 2180 # HG changeset patch
2181 2181 # User test
2182 2182 # Date 0 0
2183 2183 # Thu Jan 01 00:00:00 1970 +0000
2184 2184 # Node ID 02dbb8e276b8ab7abfd07cab50c901647e75c2dd
2185 2185 # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73
2186 2186 Added tag foo-bar for changeset fc281d8ff18d
2187 2187
2188 2188 diff -r fc281d8ff18d -r 02dbb8e276b8 .hgtags
2189 2189 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2190 2190 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2191 2191 @@ -0,0 +1,1 @@
2192 2192 +fc281d8ff18d999ad6497b3d27390bcd695dcc73 foo-bar
2193 2193 # HG changeset patch
2194 2194 # User test
2195 2195 # Date 0 0
2196 2196 # Thu Jan 01 00:00:00 1970 +0000
2197 2197 # Node ID 24c2e826ddebf80f9dcd60b856bdb8e6715c5449
2198 2198 # Parent fc281d8ff18d999ad6497b3d27390bcd695dcc73
2199 2199 add g
2200 2200
2201 2201 diff -r fc281d8ff18d -r 24c2e826ddeb g
2202 2202 --- a/g Thu Jan 01 00:00:00 1970 +0000
2203 2203 +++ b/g Thu Jan 01 00:00:00 1970 +0000
2204 2204 @@ -1,2 +1,1 @@
2205 2205 -f
2206 2206 -f
2207 2207 +g
2208 2208 $ testlog --follow -r6 -r8 -r5 -r7 -r4
2209 2209 ['6', '8', '5', '7', '4']
2210 2210 []
2211 2211 <generatorsetdesc->
2212 2212
2213 2213 Test --follow-first and forward --rev
2214 2214
2215 2215 $ testlog --follow-first -r6 -r8 -r5 -r7 -r4
2216 2216 ['6', '8', '5', '7', '4']
2217 2217 []
2218 2218 <generatorsetdesc->
2219 2219
2220 2220 Test --follow and backward --rev
2221 2221
2222 2222 $ testlog --follow -r6 -r5 -r7 -r8 -r4
2223 2223 ['6', '5', '7', '8', '4']
2224 2224 []
2225 2225 <generatorsetdesc->
2226 2226
2227 2227 Test --follow-first and backward --rev
2228 2228
2229 2229 $ testlog --follow-first -r6 -r5 -r7 -r8 -r4
2230 2230 ['6', '5', '7', '8', '4']
2231 2231 []
2232 2232 <generatorsetdesc->
2233 2233
2234 2234 Test --follow with --rev of graphlog extension
2235 2235
2236 2236 $ hg --config extensions.graphlog= glog -qfr1
2237 2237 o 1:216d4c92cf98
2238 2238 |
2239 2239 o 0:f8035bb17114
2240 2240
2241 2241
2242 2242 Test subdir
2243 2243
2244 2244 $ hg up -q 3
2245 2245 $ cd dir
2246 2246 $ testlog .
2247 2247 []
2248 2248 (func
2249 2249 (symbol '_matchfiles')
2250 2250 (list
2251 2251 (string 'r:')
2252 2252 (string 'd:relpath')
2253 2253 (string 'p:.')))
2254 2254 <filteredset
2255 2255 <spanset- 0:9>,
2256 2256 <matchfiles patterns=['.'], include=[] exclude=[], default='relpath', rev=2147483647>>
2257 2257 $ testlog ../b
2258 2258 []
2259 2259 (func
2260 2260 (symbol 'filelog')
2261 2261 (string '../b'))
2262 2262 <filteredset
2263 2263 <spanset- 0:9>, set([1])>
2264 2264 $ testlog -f ../b
2265 2265 []
2266 2266 []
2267 2267 <generatorsetdesc->
2268 2268 $ cd ..
2269 2269
2270 2270 Test --hidden
2271 2271 (enable obsolete)
2272 2272
2273 2273 $ cat >> $HGRCPATH << EOF
2274 2274 > [experimental]
2275 2275 > evolution.createmarkers=True
2276 2276 > EOF
2277 2277
2278 2278 $ hg debugobsolete `hg id --debug -i -r 8`
2279 2279 obsoleted 1 changesets
2280 2280 $ testlog
2281 2281 []
2282 2282 []
2283 2283 <spanset- 0:9>
2284 2284 $ testlog --hidden
2285 2285 []
2286 2286 []
2287 2287 <spanset- 0:9>
2288 2288 $ hg log -G --template '{rev} {desc}\n'
2289 2289 o 7 Added tag foo-bar for changeset fc281d8ff18d
2290 2290 |
2291 2291 o 6 merge 5 and 4
2292 2292 |\
2293 2293 | o 5 add another e
2294 2294 | |
2295 2295 o | 4 mv dir/b e
2296 2296 |/
2297 2297 @ 3 mv a b; add d
2298 2298 |
2299 2299 o 2 mv b dir/b
2300 2300 |
2301 2301 o 1 copy a b
2302 2302 |
2303 2303 o 0 add a
2304 2304
2305 2305
2306 2306 A template without trailing newline should do something sane
2307 2307
2308 2308 $ hg log -G -r ::2 --template '{rev} {desc}'
2309 2309 o 2 mv b dir/b
2310 2310 |
2311 2311 o 1 copy a b
2312 2312 |
2313 2313 o 0 add a
2314 2314
2315 2315
2316 2316 Extra newlines must be preserved
2317 2317
2318 2318 $ hg log -G -r ::2 --template '\n{rev} {desc}\n\n'
2319 2319 o
2320 2320 | 2 mv b dir/b
2321 2321 |
2322 2322 o
2323 2323 | 1 copy a b
2324 2324 |
2325 2325 o
2326 2326 0 add a
2327 2327
2328 2328
2329 2329 The almost-empty template should do something sane too ...
2330 2330
2331 2331 $ hg log -G -r ::2 --template '\n'
2332 2332 o
2333 2333 |
2334 2334 o
2335 2335 |
2336 2336 o
2337 2337
2338 2338
2339 2339 issue3772
2340 2340
2341 2341 $ hg log -G -r :null
2342 2342 o changeset: 0:f8035bb17114
2343 2343 | user: test
2344 2344 | date: Thu Jan 01 00:00:00 1970 +0000
2345 2345 | summary: add a
2346 2346 |
2347 2347 o changeset: -1:000000000000
2348 2348 user:
2349 2349 date: Thu Jan 01 00:00:00 1970 +0000
2350 2350
2351 2351 $ hg log -G -r null:null
2352 2352 o changeset: -1:000000000000
2353 2353 user:
2354 2354 date: Thu Jan 01 00:00:00 1970 +0000
2355 2355
2356 2356
2357 2357 should not draw line down to null due to the magic of fullreposet
2358 2358
2359 2359 $ hg log -G -r 'all()' | tail -6
2360 2360 |
2361 2361 o changeset: 0:f8035bb17114
2362 2362 user: test
2363 2363 date: Thu Jan 01 00:00:00 1970 +0000
2364 2364 summary: add a
2365 2365
2366 2366
2367 2367 $ hg log -G -r 'branch(default)' | tail -6
2368 2368 |
2369 2369 o changeset: 0:f8035bb17114
2370 2370 user: test
2371 2371 date: Thu Jan 01 00:00:00 1970 +0000
2372 2372 summary: add a
2373 2373
2374 2374
2375 2375 working-directory revision
2376 2376
2377 2377 $ hg log -G -qr '. + wdir()'
2378 2378 o 2147483647:ffffffffffff
2379 2379 |
2380 2380 @ 3:5918b8d165d1
2381 2381 |
2382 2382 ~
2383 2383
2384 2384 node template with changesetprinter:
2385 2385
2386 2386 $ hg log -Gqr 5:7 --config ui.graphnodetemplate='"{rev}"'
2387 2387 7 7:02dbb8e276b8
2388 2388 |
2389 2389 6 6:fc281d8ff18d
2390 2390 |\
2391 2391 | ~
2392 2392 5 5:99b31f1c2782
2393 2393 |
2394 2394 ~
2395 2395
2396 2396 node template with changesettemplater (shared cache variable):
2397 2397
2398 2398 $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \
2399 2399 > --config ui.graphnodetemplate='{ifeq(latesttagdistance, 0, "#", graphnode)}'
2400 2400 o 7 foo-bar+1
2401 2401 |
2402 2402 # 6 foo-bar+0
2403 2403 |\
2404 2404 | ~
2405 2405 o 5 null+5
2406 2406 |
2407 2407 ~
2408 2408
2409 2409 label() should just work in node template:
2410 2410
2411 2411 $ hg log -Gqr 7 --config extensions.color= --color=debug \
2412 2412 > --config ui.graphnodetemplate='{label("branch.{branch}", rev)}'
2413 2413 [branch.default|7] [log.node|7:02dbb8e276b8]
2414 2414 |
2415 2415 ~
2416 2416
2417 2417 $ cd ..
2418 2418
2419 2419 change graph edge styling
2420 2420
2421 2421 $ cd repo
2422 2422 $ cat << EOF >> $HGRCPATH
2423 2423 > [experimental]
2424 2424 > graphstyle.parent = |
2425 2425 > graphstyle.grandparent = :
2426 2426 > graphstyle.missing =
2427 2427 > EOF
2428 2428 $ hg log -G -r 'file("a")' -m
2429 2429 @ changeset: 36:08a19a744424
2430 2430 : branch: branch
2431 2431 : tag: tip
2432 2432 : parent: 35:9159c3644c5e
2433 2433 : parent: 35:9159c3644c5e
2434 2434 : user: test
2435 2435 : date: Thu Jan 01 00:00:36 1970 +0000
2436 2436 : summary: (36) buggy merge: identical parents
2437 2437 :
2438 2438 o changeset: 32:d06dffa21a31
2439 2439 |\ parent: 27:886ed638191b
2440 2440 | : parent: 31:621d83e11f67
2441 2441 | : user: test
2442 2442 | : date: Thu Jan 01 00:00:32 1970 +0000
2443 2443 | : summary: (32) expand
2444 2444 | :
2445 2445 o : changeset: 31:621d83e11f67
2446 2446 |\: parent: 21:d42a756af44d
2447 2447 | : parent: 30:6e11cd4b648f
2448 2448 | : user: test
2449 2449 | : date: Thu Jan 01 00:00:31 1970 +0000
2450 2450 | : summary: (31) expand
2451 2451 | :
2452 2452 o : changeset: 30:6e11cd4b648f
2453 2453 |\ \ parent: 28:44ecd0b9ae99
2454 2454 | ~ : parent: 29:cd9bb2be7593
2455 2455 | : user: test
2456 2456 | : date: Thu Jan 01 00:00:30 1970 +0000
2457 2457 | : summary: (30) expand
2458 2458 | /
2459 2459 o : changeset: 28:44ecd0b9ae99
2460 2460 |\ \ parent: 1:6db2ef61d156
2461 2461 | ~ : parent: 26:7f25b6c2f0b9
2462 2462 | : user: test
2463 2463 | : date: Thu Jan 01 00:00:28 1970 +0000
2464 2464 | : summary: (28) merge zero known
2465 2465 | /
2466 2466 o : changeset: 26:7f25b6c2f0b9
2467 2467 |\ \ parent: 18:1aa84d96232a
2468 2468 | | : parent: 25:91da8ed57247
2469 2469 | | : user: test
2470 2470 | | : date: Thu Jan 01 00:00:26 1970 +0000
2471 2471 | | : summary: (26) merge one known; far right
2472 2472 | | :
2473 2473 | o : changeset: 25:91da8ed57247
2474 2474 | |\: parent: 21:d42a756af44d
2475 2475 | | : parent: 24:a9c19a3d96b7
2476 2476 | | : user: test
2477 2477 | | : date: Thu Jan 01 00:00:25 1970 +0000
2478 2478 | | : summary: (25) merge one known; far left
2479 2479 | | :
2480 2480 | o : changeset: 24:a9c19a3d96b7
2481 2481 | |\ \ parent: 0:e6eb3150255d
2482 2482 | | ~ : parent: 23:a01cddf0766d
2483 2483 | | : user: test
2484 2484 | | : date: Thu Jan 01 00:00:24 1970 +0000
2485 2485 | | : summary: (24) merge one known; immediate right
2486 2486 | | /
2487 2487 | o : changeset: 23:a01cddf0766d
2488 2488 | |\ \ parent: 1:6db2ef61d156
2489 2489 | | ~ : parent: 22:e0d9cccacb5d
2490 2490 | | : user: test
2491 2491 | | : date: Thu Jan 01 00:00:23 1970 +0000
2492 2492 | | : summary: (23) merge one known; immediate left
2493 2493 | | /
2494 2494 | o : changeset: 22:e0d9cccacb5d
2495 2495 |/:/ parent: 18:1aa84d96232a
2496 2496 | : parent: 21:d42a756af44d
2497 2497 | : user: test
2498 2498 | : date: Thu Jan 01 00:00:22 1970 +0000
2499 2499 | : summary: (22) merge two known; one far left, one far right
2500 2500 | :
2501 2501 | o changeset: 21:d42a756af44d
2502 2502 | |\ parent: 19:31ddc2c1573b
2503 2503 | | | parent: 20:d30ed6450e32
2504 2504 | | | user: test
2505 2505 | | | date: Thu Jan 01 00:00:21 1970 +0000
2506 2506 | | | summary: (21) expand
2507 2507 | | |
2508 2508 +---o changeset: 20:d30ed6450e32
2509 2509 | | | parent: 0:e6eb3150255d
2510 2510 | | ~ parent: 18:1aa84d96232a
2511 2511 | | user: test
2512 2512 | | date: Thu Jan 01 00:00:20 1970 +0000
2513 2513 | | summary: (20) merge two known; two far right
2514 2514 | |
2515 2515 | o changeset: 19:31ddc2c1573b
2516 2516 | |\ parent: 15:1dda3f72782d
2517 2517 | | | parent: 17:44765d7c06e0
2518 2518 | | | user: test
2519 2519 | | | date: Thu Jan 01 00:00:19 1970 +0000
2520 2520 | | | summary: (19) expand
2521 2521 | | |
2522 2522 o | | changeset: 18:1aa84d96232a
2523 2523 |\| | parent: 1:6db2ef61d156
2524 2524 ~ | | parent: 15:1dda3f72782d
2525 2525 | | user: test
2526 2526 | | date: Thu Jan 01 00:00:18 1970 +0000
2527 2527 | | summary: (18) merge two known; two far left
2528 2528 / /
2529 2529 | o changeset: 17:44765d7c06e0
2530 2530 | |\ parent: 12:86b91144a6e9
2531 2531 | | | parent: 16:3677d192927d
2532 2532 | | | user: test
2533 2533 | | | date: Thu Jan 01 00:00:17 1970 +0000
2534 2534 | | | summary: (17) expand
2535 2535 | | |
2536 2536 | | o changeset: 16:3677d192927d
2537 2537 | | |\ parent: 0:e6eb3150255d
2538 2538 | | ~ ~ parent: 1:6db2ef61d156
2539 2539 | | user: test
2540 2540 | | date: Thu Jan 01 00:00:16 1970 +0000
2541 2541 | | summary: (16) merge two known; one immediate right, one near right
2542 2542 | |
2543 2543 o | changeset: 15:1dda3f72782d
2544 2544 |\ \ parent: 13:22d8966a97e3
2545 2545 | | | parent: 14:8eac370358ef
2546 2546 | | | user: test
2547 2547 | | | date: Thu Jan 01 00:00:15 1970 +0000
2548 2548 | | | summary: (15) expand
2549 2549 | | |
2550 2550 | o | changeset: 14:8eac370358ef
2551 2551 | |\| parent: 0:e6eb3150255d
2552 2552 | ~ | parent: 12:86b91144a6e9
2553 2553 | | user: test
2554 2554 | | date: Thu Jan 01 00:00:14 1970 +0000
2555 2555 | | summary: (14) merge two known; one immediate right, one far right
2556 2556 | /
2557 2557 o | changeset: 13:22d8966a97e3
2558 2558 |\ \ parent: 9:7010c0af0a35
2559 2559 | | | parent: 11:832d76e6bdf2
2560 2560 | | | user: test
2561 2561 | | | date: Thu Jan 01 00:00:13 1970 +0000
2562 2562 | | | summary: (13) expand
2563 2563 | | |
2564 2564 +---o changeset: 12:86b91144a6e9
2565 2565 | | | parent: 1:6db2ef61d156
2566 2566 | | ~ parent: 9:7010c0af0a35
2567 2567 | | user: test
2568 2568 | | date: Thu Jan 01 00:00:12 1970 +0000
2569 2569 | | summary: (12) merge two known; one immediate right, one far left
2570 2570 | |
2571 2571 | o changeset: 11:832d76e6bdf2
2572 2572 | |\ parent: 6:b105a072e251
2573 2573 | | | parent: 10:74c64d036d72
2574 2574 | | | user: test
2575 2575 | | | date: Thu Jan 01 00:00:11 1970 +0000
2576 2576 | | | summary: (11) expand
2577 2577 | | |
2578 2578 | | o changeset: 10:74c64d036d72
2579 2579 | |/| parent: 0:e6eb3150255d
2580 2580 | | ~ parent: 6:b105a072e251
2581 2581 | | user: test
2582 2582 | | date: Thu Jan 01 00:00:10 1970 +0000
2583 2583 | | summary: (10) merge two known; one immediate left, one near right
2584 2584 | |
2585 2585 o | changeset: 9:7010c0af0a35
2586 2586 |\ \ parent: 7:b632bb1b1224
2587 2587 | | | parent: 8:7a0b11f71937
2588 2588 | | | user: test
2589 2589 | | | date: Thu Jan 01 00:00:09 1970 +0000
2590 2590 | | | summary: (9) expand
2591 2591 | | |
2592 2592 | o | changeset: 8:7a0b11f71937
2593 2593 |/| | parent: 0:e6eb3150255d
2594 2594 | ~ | parent: 7:b632bb1b1224
2595 2595 | | user: test
2596 2596 | | date: Thu Jan 01 00:00:08 1970 +0000
2597 2597 | | summary: (8) merge two known; one immediate left, one far right
2598 2598 | /
2599 2599 o | changeset: 7:b632bb1b1224
2600 2600 |\ \ parent: 2:3d9a33b8d1e1
2601 2601 | ~ | parent: 5:4409d547b708
2602 2602 | | user: test
2603 2603 | | date: Thu Jan 01 00:00:07 1970 +0000
2604 2604 | | summary: (7) expand
2605 2605 | /
2606 2606 | o changeset: 6:b105a072e251
2607 2607 |/| parent: 2:3d9a33b8d1e1
2608 2608 | ~ parent: 5:4409d547b708
2609 2609 | user: test
2610 2610 | date: Thu Jan 01 00:00:06 1970 +0000
2611 2611 | summary: (6) merge two known; one immediate left, one far left
2612 2612 |
2613 2613 o changeset: 5:4409d547b708
2614 2614 |\ parent: 3:27eef8ed80b4
2615 2615 | ~ parent: 4:26a8bac39d9f
2616 2616 | user: test
2617 2617 | date: Thu Jan 01 00:00:05 1970 +0000
2618 2618 | summary: (5) expand
2619 2619 |
2620 2620 o changeset: 4:26a8bac39d9f
2621 2621 |\ parent: 1:6db2ef61d156
2622 2622 ~ ~ parent: 3:27eef8ed80b4
2623 2623 user: test
2624 2624 date: Thu Jan 01 00:00:04 1970 +0000
2625 2625 summary: (4) merge two known; one immediate left, one immediate right
2626 2626
2627 2627
2628 2628 Setting HGPLAIN ignores graphmod styling:
2629 2629
2630 2630 $ HGPLAIN=1 hg log -G -r 'file("a")' -m
2631 2631 @ changeset: 36:08a19a744424
2632 2632 | branch: branch
2633 2633 | tag: tip
2634 2634 | parent: 35:9159c3644c5e
2635 2635 | parent: 35:9159c3644c5e
2636 2636 | user: test
2637 2637 | date: Thu Jan 01 00:00:36 1970 +0000
2638 2638 | summary: (36) buggy merge: identical parents
2639 2639 |
2640 2640 o changeset: 32:d06dffa21a31
2641 2641 |\ parent: 27:886ed638191b
2642 2642 | | parent: 31:621d83e11f67
2643 2643 | | user: test
2644 2644 | | date: Thu Jan 01 00:00:32 1970 +0000
2645 2645 | | summary: (32) expand
2646 2646 | |
2647 2647 o | changeset: 31:621d83e11f67
2648 2648 |\| parent: 21:d42a756af44d
2649 2649 | | parent: 30:6e11cd4b648f
2650 2650 | | user: test
2651 2651 | | date: Thu Jan 01 00:00:31 1970 +0000
2652 2652 | | summary: (31) expand
2653 2653 | |
2654 2654 o | changeset: 30:6e11cd4b648f
2655 2655 |\ \ parent: 28:44ecd0b9ae99
2656 2656 | | | parent: 29:cd9bb2be7593
2657 2657 | | | user: test
2658 2658 | | | date: Thu Jan 01 00:00:30 1970 +0000
2659 2659 | | | summary: (30) expand
2660 2660 | | |
2661 2661 o | | changeset: 28:44ecd0b9ae99
2662 2662 |\ \ \ parent: 1:6db2ef61d156
2663 2663 | | | | parent: 26:7f25b6c2f0b9
2664 2664 | | | | user: test
2665 2665 | | | | date: Thu Jan 01 00:00:28 1970 +0000
2666 2666 | | | | summary: (28) merge zero known
2667 2667 | | | |
2668 2668 o | | | changeset: 26:7f25b6c2f0b9
2669 2669 |\ \ \ \ parent: 18:1aa84d96232a
2670 2670 | | | | | parent: 25:91da8ed57247
2671 2671 | | | | | user: test
2672 2672 | | | | | date: Thu Jan 01 00:00:26 1970 +0000
2673 2673 | | | | | summary: (26) merge one known; far right
2674 2674 | | | | |
2675 2675 | o-----+ changeset: 25:91da8ed57247
2676 2676 | | | | | parent: 21:d42a756af44d
2677 2677 | | | | | parent: 24:a9c19a3d96b7
2678 2678 | | | | | user: test
2679 2679 | | | | | date: Thu Jan 01 00:00:25 1970 +0000
2680 2680 | | | | | summary: (25) merge one known; far left
2681 2681 | | | | |
2682 2682 | o | | | changeset: 24:a9c19a3d96b7
2683 2683 | |\ \ \ \ parent: 0:e6eb3150255d
2684 2684 | | | | | | parent: 23:a01cddf0766d
2685 2685 | | | | | | user: test
2686 2686 | | | | | | date: Thu Jan 01 00:00:24 1970 +0000
2687 2687 | | | | | | summary: (24) merge one known; immediate right
2688 2688 | | | | | |
2689 2689 | o---+ | | changeset: 23:a01cddf0766d
2690 2690 | | | | | | parent: 1:6db2ef61d156
2691 2691 | | | | | | parent: 22:e0d9cccacb5d
2692 2692 | | | | | | user: test
2693 2693 | | | | | | date: Thu Jan 01 00:00:23 1970 +0000
2694 2694 | | | | | | summary: (23) merge one known; immediate left
2695 2695 | | | | | |
2696 2696 | o-------+ changeset: 22:e0d9cccacb5d
2697 2697 | | | | | | parent: 18:1aa84d96232a
2698 2698 |/ / / / / parent: 21:d42a756af44d
2699 2699 | | | | | user: test
2700 2700 | | | | | date: Thu Jan 01 00:00:22 1970 +0000
2701 2701 | | | | | summary: (22) merge two known; one far left, one far right
2702 2702 | | | | |
2703 2703 | | | | o changeset: 21:d42a756af44d
2704 2704 | | | | |\ parent: 19:31ddc2c1573b
2705 2705 | | | | | | parent: 20:d30ed6450e32
2706 2706 | | | | | | user: test
2707 2707 | | | | | | date: Thu Jan 01 00:00:21 1970 +0000
2708 2708 | | | | | | summary: (21) expand
2709 2709 | | | | | |
2710 2710 +-+-------o changeset: 20:d30ed6450e32
2711 2711 | | | | | parent: 0:e6eb3150255d
2712 2712 | | | | | parent: 18:1aa84d96232a
2713 2713 | | | | | user: test
2714 2714 | | | | | date: Thu Jan 01 00:00:20 1970 +0000
2715 2715 | | | | | summary: (20) merge two known; two far right
2716 2716 | | | | |
2717 2717 | | | | o changeset: 19:31ddc2c1573b
2718 2718 | | | | |\ parent: 15:1dda3f72782d
2719 2719 | | | | | | parent: 17:44765d7c06e0
2720 2720 | | | | | | user: test
2721 2721 | | | | | | date: Thu Jan 01 00:00:19 1970 +0000
2722 2722 | | | | | | summary: (19) expand
2723 2723 | | | | | |
2724 2724 o---+---+ | changeset: 18:1aa84d96232a
2725 2725 | | | | | parent: 1:6db2ef61d156
2726 2726 / / / / / parent: 15:1dda3f72782d
2727 2727 | | | | | user: test
2728 2728 | | | | | date: Thu Jan 01 00:00:18 1970 +0000
2729 2729 | | | | | summary: (18) merge two known; two far left
2730 2730 | | | | |
2731 2731 | | | | o changeset: 17:44765d7c06e0
2732 2732 | | | | |\ parent: 12:86b91144a6e9
2733 2733 | | | | | | parent: 16:3677d192927d
2734 2734 | | | | | | user: test
2735 2735 | | | | | | date: Thu Jan 01 00:00:17 1970 +0000
2736 2736 | | | | | | summary: (17) expand
2737 2737 | | | | | |
2738 2738 +-+-------o changeset: 16:3677d192927d
2739 2739 | | | | | parent: 0:e6eb3150255d
2740 2740 | | | | | parent: 1:6db2ef61d156
2741 2741 | | | | | user: test
2742 2742 | | | | | date: Thu Jan 01 00:00:16 1970 +0000
2743 2743 | | | | | summary: (16) merge two known; one immediate right, one near right
2744 2744 | | | | |
2745 2745 | | | o | changeset: 15:1dda3f72782d
2746 2746 | | | |\ \ parent: 13:22d8966a97e3
2747 2747 | | | | | | parent: 14:8eac370358ef
2748 2748 | | | | | | user: test
2749 2749 | | | | | | date: Thu Jan 01 00:00:15 1970 +0000
2750 2750 | | | | | | summary: (15) expand
2751 2751 | | | | | |
2752 2752 +-------o | changeset: 14:8eac370358ef
2753 2753 | | | | |/ parent: 0:e6eb3150255d
2754 2754 | | | | | parent: 12:86b91144a6e9
2755 2755 | | | | | user: test
2756 2756 | | | | | date: Thu Jan 01 00:00:14 1970 +0000
2757 2757 | | | | | summary: (14) merge two known; one immediate right, one far right
2758 2758 | | | | |
2759 2759 | | | o | changeset: 13:22d8966a97e3
2760 2760 | | | |\ \ parent: 9:7010c0af0a35
2761 2761 | | | | | | parent: 11:832d76e6bdf2
2762 2762 | | | | | | user: test
2763 2763 | | | | | | date: Thu Jan 01 00:00:13 1970 +0000
2764 2764 | | | | | | summary: (13) expand
2765 2765 | | | | | |
2766 2766 | +---+---o changeset: 12:86b91144a6e9
2767 2767 | | | | | parent: 1:6db2ef61d156
2768 2768 | | | | | parent: 9:7010c0af0a35
2769 2769 | | | | | user: test
2770 2770 | | | | | date: Thu Jan 01 00:00:12 1970 +0000
2771 2771 | | | | | summary: (12) merge two known; one immediate right, one far left
2772 2772 | | | | |
2773 2773 | | | | o changeset: 11:832d76e6bdf2
2774 2774 | | | | |\ parent: 6:b105a072e251
2775 2775 | | | | | | parent: 10:74c64d036d72
2776 2776 | | | | | | user: test
2777 2777 | | | | | | date: Thu Jan 01 00:00:11 1970 +0000
2778 2778 | | | | | | summary: (11) expand
2779 2779 | | | | | |
2780 2780 +---------o changeset: 10:74c64d036d72
2781 2781 | | | | |/ parent: 0:e6eb3150255d
2782 2782 | | | | | parent: 6:b105a072e251
2783 2783 | | | | | user: test
2784 2784 | | | | | date: Thu Jan 01 00:00:10 1970 +0000
2785 2785 | | | | | summary: (10) merge two known; one immediate left, one near right
2786 2786 | | | | |
2787 2787 | | | o | changeset: 9:7010c0af0a35
2788 2788 | | | |\ \ parent: 7:b632bb1b1224
2789 2789 | | | | | | parent: 8:7a0b11f71937
2790 2790 | | | | | | user: test
2791 2791 | | | | | | date: Thu Jan 01 00:00:09 1970 +0000
2792 2792 | | | | | | summary: (9) expand
2793 2793 | | | | | |
2794 2794 +-------o | changeset: 8:7a0b11f71937
2795 2795 | | | |/ / parent: 0:e6eb3150255d
2796 2796 | | | | | parent: 7:b632bb1b1224
2797 2797 | | | | | user: test
2798 2798 | | | | | date: Thu Jan 01 00:00:08 1970 +0000
2799 2799 | | | | | summary: (8) merge two known; one immediate left, one far right
2800 2800 | | | | |
2801 2801 | | | o | changeset: 7:b632bb1b1224
2802 2802 | | | |\ \ parent: 2:3d9a33b8d1e1
2803 2803 | | | | | | parent: 5:4409d547b708
2804 2804 | | | | | | user: test
2805 2805 | | | | | | date: Thu Jan 01 00:00:07 1970 +0000
2806 2806 | | | | | | summary: (7) expand
2807 2807 | | | | | |
2808 2808 | | | +---o changeset: 6:b105a072e251
2809 2809 | | | | |/ parent: 2:3d9a33b8d1e1
2810 2810 | | | | | parent: 5:4409d547b708
2811 2811 | | | | | user: test
2812 2812 | | | | | date: Thu Jan 01 00:00:06 1970 +0000
2813 2813 | | | | | summary: (6) merge two known; one immediate left, one far left
2814 2814 | | | | |
2815 2815 | | | o | changeset: 5:4409d547b708
2816 2816 | | | |\ \ parent: 3:27eef8ed80b4
2817 2817 | | | | | | parent: 4:26a8bac39d9f
2818 2818 | | | | | | user: test
2819 2819 | | | | | | date: Thu Jan 01 00:00:05 1970 +0000
2820 2820 | | | | | | summary: (5) expand
2821 2821 | | | | | |
2822 2822 | +---o | | changeset: 4:26a8bac39d9f
2823 2823 | | | |/ / parent: 1:6db2ef61d156
2824 2824 | | | | | parent: 3:27eef8ed80b4
2825 2825 | | | | | user: test
2826 2826 | | | | | date: Thu Jan 01 00:00:04 1970 +0000
2827 2827 | | | | | summary: (4) merge two known; one immediate left, one immediate right
2828 2828 | | | | |
2829 2829
2830 2830 .. unless HGPLAINEXCEPT=graph is set:
2831 2831
2832 2832 $ HGPLAIN=1 HGPLAINEXCEPT=graph hg log -G -r 'file("a")' -m
2833 2833 @ changeset: 36:08a19a744424
2834 2834 : branch: branch
2835 2835 : tag: tip
2836 2836 : parent: 35:9159c3644c5e
2837 2837 : parent: 35:9159c3644c5e
2838 2838 : user: test
2839 2839 : date: Thu Jan 01 00:00:36 1970 +0000
2840 2840 : summary: (36) buggy merge: identical parents
2841 2841 :
2842 2842 o changeset: 32:d06dffa21a31
2843 2843 |\ parent: 27:886ed638191b
2844 2844 | : parent: 31:621d83e11f67
2845 2845 | : user: test
2846 2846 | : date: Thu Jan 01 00:00:32 1970 +0000
2847 2847 | : summary: (32) expand
2848 2848 | :
2849 2849 o : changeset: 31:621d83e11f67
2850 2850 |\: parent: 21:d42a756af44d
2851 2851 | : parent: 30:6e11cd4b648f
2852 2852 | : user: test
2853 2853 | : date: Thu Jan 01 00:00:31 1970 +0000
2854 2854 | : summary: (31) expand
2855 2855 | :
2856 2856 o : changeset: 30:6e11cd4b648f
2857 2857 |\ \ parent: 28:44ecd0b9ae99
2858 2858 | ~ : parent: 29:cd9bb2be7593
2859 2859 | : user: test
2860 2860 | : date: Thu Jan 01 00:00:30 1970 +0000
2861 2861 | : summary: (30) expand
2862 2862 | /
2863 2863 o : changeset: 28:44ecd0b9ae99
2864 2864 |\ \ parent: 1:6db2ef61d156
2865 2865 | ~ : parent: 26:7f25b6c2f0b9
2866 2866 | : user: test
2867 2867 | : date: Thu Jan 01 00:00:28 1970 +0000
2868 2868 | : summary: (28) merge zero known
2869 2869 | /
2870 2870 o : changeset: 26:7f25b6c2f0b9
2871 2871 |\ \ parent: 18:1aa84d96232a
2872 2872 | | : parent: 25:91da8ed57247
2873 2873 | | : user: test
2874 2874 | | : date: Thu Jan 01 00:00:26 1970 +0000
2875 2875 | | : summary: (26) merge one known; far right
2876 2876 | | :
2877 2877 | o : changeset: 25:91da8ed57247
2878 2878 | |\: parent: 21:d42a756af44d
2879 2879 | | : parent: 24:a9c19a3d96b7
2880 2880 | | : user: test
2881 2881 | | : date: Thu Jan 01 00:00:25 1970 +0000
2882 2882 | | : summary: (25) merge one known; far left
2883 2883 | | :
2884 2884 | o : changeset: 24:a9c19a3d96b7
2885 2885 | |\ \ parent: 0:e6eb3150255d
2886 2886 | | ~ : parent: 23:a01cddf0766d
2887 2887 | | : user: test
2888 2888 | | : date: Thu Jan 01 00:00:24 1970 +0000
2889 2889 | | : summary: (24) merge one known; immediate right
2890 2890 | | /
2891 2891 | o : changeset: 23:a01cddf0766d
2892 2892 | |\ \ parent: 1:6db2ef61d156
2893 2893 | | ~ : parent: 22:e0d9cccacb5d
2894 2894 | | : user: test
2895 2895 | | : date: Thu Jan 01 00:00:23 1970 +0000
2896 2896 | | : summary: (23) merge one known; immediate left
2897 2897 | | /
2898 2898 | o : changeset: 22:e0d9cccacb5d
2899 2899 |/:/ parent: 18:1aa84d96232a
2900 2900 | : parent: 21:d42a756af44d
2901 2901 | : user: test
2902 2902 | : date: Thu Jan 01 00:00:22 1970 +0000
2903 2903 | : summary: (22) merge two known; one far left, one far right
2904 2904 | :
2905 2905 | o changeset: 21:d42a756af44d
2906 2906 | |\ parent: 19:31ddc2c1573b
2907 2907 | | | parent: 20:d30ed6450e32
2908 2908 | | | user: test
2909 2909 | | | date: Thu Jan 01 00:00:21 1970 +0000
2910 2910 | | | summary: (21) expand
2911 2911 | | |
2912 2912 +---o changeset: 20:d30ed6450e32
2913 2913 | | | parent: 0:e6eb3150255d
2914 2914 | | ~ parent: 18:1aa84d96232a
2915 2915 | | user: test
2916 2916 | | date: Thu Jan 01 00:00:20 1970 +0000
2917 2917 | | summary: (20) merge two known; two far right
2918 2918 | |
2919 2919 | o changeset: 19:31ddc2c1573b
2920 2920 | |\ parent: 15:1dda3f72782d
2921 2921 | | | parent: 17:44765d7c06e0
2922 2922 | | | user: test
2923 2923 | | | date: Thu Jan 01 00:00:19 1970 +0000
2924 2924 | | | summary: (19) expand
2925 2925 | | |
2926 2926 o | | changeset: 18:1aa84d96232a
2927 2927 |\| | parent: 1:6db2ef61d156
2928 2928 ~ | | parent: 15:1dda3f72782d
2929 2929 | | user: test
2930 2930 | | date: Thu Jan 01 00:00:18 1970 +0000
2931 2931 | | summary: (18) merge two known; two far left
2932 2932 / /
2933 2933 | o changeset: 17:44765d7c06e0
2934 2934 | |\ parent: 12:86b91144a6e9
2935 2935 | | | parent: 16:3677d192927d
2936 2936 | | | user: test
2937 2937 | | | date: Thu Jan 01 00:00:17 1970 +0000
2938 2938 | | | summary: (17) expand
2939 2939 | | |
2940 2940 | | o changeset: 16:3677d192927d
2941 2941 | | |\ parent: 0:e6eb3150255d
2942 2942 | | ~ ~ parent: 1:6db2ef61d156
2943 2943 | | user: test
2944 2944 | | date: Thu Jan 01 00:00:16 1970 +0000
2945 2945 | | summary: (16) merge two known; one immediate right, one near right
2946 2946 | |
2947 2947 o | changeset: 15:1dda3f72782d
2948 2948 |\ \ parent: 13:22d8966a97e3
2949 2949 | | | parent: 14:8eac370358ef
2950 2950 | | | user: test
2951 2951 | | | date: Thu Jan 01 00:00:15 1970 +0000
2952 2952 | | | summary: (15) expand
2953 2953 | | |
2954 2954 | o | changeset: 14:8eac370358ef
2955 2955 | |\| parent: 0:e6eb3150255d
2956 2956 | ~ | parent: 12:86b91144a6e9
2957 2957 | | user: test
2958 2958 | | date: Thu Jan 01 00:00:14 1970 +0000
2959 2959 | | summary: (14) merge two known; one immediate right, one far right
2960 2960 | /
2961 2961 o | changeset: 13:22d8966a97e3
2962 2962 |\ \ parent: 9:7010c0af0a35
2963 2963 | | | parent: 11:832d76e6bdf2
2964 2964 | | | user: test
2965 2965 | | | date: Thu Jan 01 00:00:13 1970 +0000
2966 2966 | | | summary: (13) expand
2967 2967 | | |
2968 2968 +---o changeset: 12:86b91144a6e9
2969 2969 | | | parent: 1:6db2ef61d156
2970 2970 | | ~ parent: 9:7010c0af0a35
2971 2971 | | user: test
2972 2972 | | date: Thu Jan 01 00:00:12 1970 +0000
2973 2973 | | summary: (12) merge two known; one immediate right, one far left
2974 2974 | |
2975 2975 | o changeset: 11:832d76e6bdf2
2976 2976 | |\ parent: 6:b105a072e251
2977 2977 | | | parent: 10:74c64d036d72
2978 2978 | | | user: test
2979 2979 | | | date: Thu Jan 01 00:00:11 1970 +0000
2980 2980 | | | summary: (11) expand
2981 2981 | | |
2982 2982 | | o changeset: 10:74c64d036d72
2983 2983 | |/| parent: 0:e6eb3150255d
2984 2984 | | ~ parent: 6:b105a072e251
2985 2985 | | user: test
2986 2986 | | date: Thu Jan 01 00:00:10 1970 +0000
2987 2987 | | summary: (10) merge two known; one immediate left, one near right
2988 2988 | |
2989 2989 o | changeset: 9:7010c0af0a35
2990 2990 |\ \ parent: 7:b632bb1b1224
2991 2991 | | | parent: 8:7a0b11f71937
2992 2992 | | | user: test
2993 2993 | | | date: Thu Jan 01 00:00:09 1970 +0000
2994 2994 | | | summary: (9) expand
2995 2995 | | |
2996 2996 | o | changeset: 8:7a0b11f71937
2997 2997 |/| | parent: 0:e6eb3150255d
2998 2998 | ~ | parent: 7:b632bb1b1224
2999 2999 | | user: test
3000 3000 | | date: Thu Jan 01 00:00:08 1970 +0000
3001 3001 | | summary: (8) merge two known; one immediate left, one far right
3002 3002 | /
3003 3003 o | changeset: 7:b632bb1b1224
3004 3004 |\ \ parent: 2:3d9a33b8d1e1
3005 3005 | ~ | parent: 5:4409d547b708
3006 3006 | | user: test
3007 3007 | | date: Thu Jan 01 00:00:07 1970 +0000
3008 3008 | | summary: (7) expand
3009 3009 | /
3010 3010 | o changeset: 6:b105a072e251
3011 3011 |/| parent: 2:3d9a33b8d1e1
3012 3012 | ~ parent: 5:4409d547b708
3013 3013 | user: test
3014 3014 | date: Thu Jan 01 00:00:06 1970 +0000
3015 3015 | summary: (6) merge two known; one immediate left, one far left
3016 3016 |
3017 3017 o changeset: 5:4409d547b708
3018 3018 |\ parent: 3:27eef8ed80b4
3019 3019 | ~ parent: 4:26a8bac39d9f
3020 3020 | user: test
3021 3021 | date: Thu Jan 01 00:00:05 1970 +0000
3022 3022 | summary: (5) expand
3023 3023 |
3024 3024 o changeset: 4:26a8bac39d9f
3025 3025 |\ parent: 1:6db2ef61d156
3026 3026 ~ ~ parent: 3:27eef8ed80b4
3027 3027 user: test
3028 3028 date: Thu Jan 01 00:00:04 1970 +0000
3029 3029 summary: (4) merge two known; one immediate left, one immediate right
3030 3030
3031 Draw only part of a grandparent line differently with "<N><char>"; only the
3032 last N lines (for positive N) or everything but the first N lines (for
3033 negative N) along the current node use the style, the rest of the edge uses
3034 the parent edge styling.
3031 Previously, one could specify graphstyle.grandparent = <N><char> to draw <char>
3032 on only the last N lines (for positive N) or everything but the first N lines
3033 (for negative N), with the rest of the edge using the parent edge styling.
3035 3034
3036 Last 3 lines:
3035 This was removed, and this test now shows that muliple characters being
3036 specified in graphstyle.grandparent aren't treated specially (including in width
3037 calculations; there's no specific reason to *avoid* handling the width
3038 calculations, but it's difficult to do correctly and efficiently).
3037 3039
3038 3040 $ cat << EOF >> $HGRCPATH
3039 3041 > [experimental]
3040 3042 > graphstyle.parent = !
3041 3043 > graphstyle.grandparent = 3.
3042 3044 > graphstyle.missing =
3043 3045 > EOF
3044 3046 $ hg log -G -r '36:18 & file("a")' -m
3045 3047 @ changeset: 36:08a19a744424
3046 ! branch: branch
3047 ! tag: tip
3048 ! parent: 35:9159c3644c5e
3049 ! parent: 35:9159c3644c5e
3050 ! user: test
3051 . date: Thu Jan 01 00:00:36 1970 +0000
3052 . summary: (36) buggy merge: identical parents
3053 .
3048 3. branch: branch
3049 3. tag: tip
3050 3. parent: 35:9159c3644c5e
3051 3. parent: 35:9159c3644c5e
3052 3. user: test
3053 3. date: Thu Jan 01 00:00:36 1970 +0000
3054 3. summary: (36) buggy merge: identical parents
3055 3.
3054 3056 o changeset: 32:d06dffa21a31
3055 3057 !\ parent: 27:886ed638191b
3056 ! ! parent: 31:621d83e11f67
3057 ! ! user: test
3058 ! . date: Thu Jan 01 00:00:32 1970 +0000
3059 ! . summary: (32) expand
3060 ! .
3061 o ! changeset: 31:621d83e11f67
3062 !\! parent: 21:d42a756af44d
3063 ! ! parent: 30:6e11cd4b648f
3064 ! ! user: test
3065 ! ! date: Thu Jan 01 00:00:31 1970 +0000
3066 ! ! summary: (31) expand
3067 ! !
3068 o ! changeset: 30:6e11cd4b648f
3058 ! 3. parent: 31:621d83e11f67
3059 ! 3. user: test
3060 ! 3. date: Thu Jan 01 00:00:32 1970 +0000
3061 ! 3. summary: (32) expand
3062 ! 3.
3063 o 3. changeset: 31:621d83e11f67
3064 !\3. parent: 21:d42a756af44d
3065 ! 3. parent: 30:6e11cd4b648f
3066 ! 3. user: test
3067 ! 3. date: Thu Jan 01 00:00:31 1970 +0000
3068 ! 3. summary: (31) expand
3069 ! 3.
3070 o 3. changeset: 30:6e11cd4b648f
3069 3071 !\ \ parent: 28:44ecd0b9ae99
3070 ! ~ ! parent: 29:cd9bb2be7593
3071 ! ! user: test
3072 ! ! date: Thu Jan 01 00:00:30 1970 +0000
3073 ! ! summary: (30) expand
3072 ! ~ 3. parent: 29:cd9bb2be7593
3073 ! 3. user: test
3074 ! 3. date: Thu Jan 01 00:00:30 1970 +0000
3075 ! 3. summary: (30) expand
3074 3076 ! /
3075 o ! changeset: 28:44ecd0b9ae99
3077 o 3. changeset: 28:44ecd0b9ae99
3076 3078 !\ \ parent: 1:6db2ef61d156
3077 ! ~ ! parent: 26:7f25b6c2f0b9
3078 ! ! user: test
3079 ! ! date: Thu Jan 01 00:00:28 1970 +0000
3080 ! ! summary: (28) merge zero known
3079 ! ~ 3. parent: 26:7f25b6c2f0b9
3080 ! 3. user: test
3081 ! 3. date: Thu Jan 01 00:00:28 1970 +0000
3082 ! 3. summary: (28) merge zero known
3081 3083 ! /
3082 o ! changeset: 26:7f25b6c2f0b9
3084 o 3. changeset: 26:7f25b6c2f0b9
3083 3085 !\ \ parent: 18:1aa84d96232a
3084 ! ! ! parent: 25:91da8ed57247
3085 ! ! ! user: test
3086 ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
3087 ! ! ! summary: (26) merge one known; far right
3088 ! ! !
3089 ! o ! changeset: 25:91da8ed57247
3090 ! !\! parent: 21:d42a756af44d
3091 ! ! ! parent: 24:a9c19a3d96b7
3092 ! ! ! user: test
3093 ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
3094 ! ! ! summary: (25) merge one known; far left
3095 ! ! !
3096 ! o ! changeset: 24:a9c19a3d96b7
3086 ! ! 3. parent: 25:91da8ed57247
3087 ! ! 3. user: test
3088 ! ! 3. date: Thu Jan 01 00:00:26 1970 +0000
3089 ! ! 3. summary: (26) merge one known; far right
3090 ! ! 3.
3091 ! o 3. changeset: 25:91da8ed57247
3092 ! !\3. parent: 21:d42a756af44d
3093 ! ! 3. parent: 24:a9c19a3d96b7
3094 ! ! 3. user: test
3095 ! ! 3. date: Thu Jan 01 00:00:25 1970 +0000
3096 ! ! 3. summary: (25) merge one known; far left
3097 ! ! 3.
3098 ! o 3. changeset: 24:a9c19a3d96b7
3097 3099 ! !\ \ parent: 0:e6eb3150255d
3098 ! ! ~ ! parent: 23:a01cddf0766d
3099 ! ! ! user: test
3100 ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
3101 ! ! ! summary: (24) merge one known; immediate right
3100 ! ! ~ 3. parent: 23:a01cddf0766d
3101 ! ! 3. user: test
3102 ! ! 3. date: Thu Jan 01 00:00:24 1970 +0000
3103 ! ! 3. summary: (24) merge one known; immediate right
3102 3104 ! ! /
3103 ! o ! changeset: 23:a01cddf0766d
3105 ! o 3. changeset: 23:a01cddf0766d
3104 3106 ! !\ \ parent: 1:6db2ef61d156
3105 ! ! ~ ! parent: 22:e0d9cccacb5d
3106 ! ! ! user: test
3107 ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
3108 ! ! ! summary: (23) merge one known; immediate left
3107 ! ! ~ 3. parent: 22:e0d9cccacb5d
3108 ! ! 3. user: test
3109 ! ! 3. date: Thu Jan 01 00:00:23 1970 +0000
3110 ! ! 3. summary: (23) merge one known; immediate left
3109 3111 ! ! /
3110 ! o ! changeset: 22:e0d9cccacb5d
3111 !/!/ parent: 18:1aa84d96232a
3112 ! ! parent: 21:d42a756af44d
3113 ! ! user: test
3114 ! ! date: Thu Jan 01 00:00:22 1970 +0000
3115 ! ! summary: (22) merge two known; one far left, one far right
3116 ! !
3112 ! o 3. changeset: 22:e0d9cccacb5d
3113 !/3./ parent: 18:1aa84d96232a
3114 ! 3. parent: 21:d42a756af44d
3115 ! 3. user: test
3116 ! 3. date: Thu Jan 01 00:00:22 1970 +0000
3117 ! 3. summary: (22) merge two known; one far left, one far right
3118 ! 3.
3117 3119 ! o changeset: 21:d42a756af44d
3118 3120 ! !\ parent: 19:31ddc2c1573b
3119 3121 ! ! ! parent: 20:d30ed6450e32
3120 3122 ! ! ! user: test
3121 3123 ! ! ! date: Thu Jan 01 00:00:21 1970 +0000
3122 3124 ! ! ! summary: (21) expand
3123 3125 ! ! !
3124 3126 +---o changeset: 20:d30ed6450e32
3125 3127 ! ! | parent: 0:e6eb3150255d
3126 3128 ! ! ~ parent: 18:1aa84d96232a
3127 3129 ! ! user: test
3128 3130 ! ! date: Thu Jan 01 00:00:20 1970 +0000
3129 3131 ! ! summary: (20) merge two known; two far right
3130 3132 ! !
3131 3133 ! o changeset: 19:31ddc2c1573b
3132 3134 ! |\ parent: 15:1dda3f72782d
3133 3135 ! ~ ~ parent: 17:44765d7c06e0
3134 3136 ! user: test
3135 3137 ! date: Thu Jan 01 00:00:19 1970 +0000
3136 3138 ! summary: (19) expand
3137 3139 !
3138 3140 o changeset: 18:1aa84d96232a
3139 3141 |\ parent: 1:6db2ef61d156
3140 3142 ~ ~ parent: 15:1dda3f72782d
3141 3143 user: test
3142 3144 date: Thu Jan 01 00:00:18 1970 +0000
3143 3145 summary: (18) merge two known; two far left
3144 3146
3145 All but the first 3 lines:
3147 (This formerly tested "All but the first 3 lines", but is now showing that it's
3148 still not treated any differently):
3146 3149
3147 3150 $ cat << EOF >> $HGRCPATH
3148 3151 > [experimental]
3149 3152 > graphstyle.parent = !
3150 3153 > graphstyle.grandparent = -3.
3151 3154 > graphstyle.missing =
3152 3155 > EOF
3153 3156 $ hg log -G -r '36:18 & file("a")' -m
3154 3157 @ changeset: 36:08a19a744424
3155 ! branch: branch
3156 ! tag: tip
3157 . parent: 35:9159c3644c5e
3158 . parent: 35:9159c3644c5e
3159 . user: test
3160 . date: Thu Jan 01 00:00:36 1970 +0000
3161 . summary: (36) buggy merge: identical parents
3162 .
3158 -3. branch: branch
3159 -3. tag: tip
3160 -3. parent: 35:9159c3644c5e
3161 -3. parent: 35:9159c3644c5e
3162 -3. user: test
3163 -3. date: Thu Jan 01 00:00:36 1970 +0000
3164 -3. summary: (36) buggy merge: identical parents
3165 -3.
3163 3166 o changeset: 32:d06dffa21a31
3164 3167 !\ parent: 27:886ed638191b
3165 ! ! parent: 31:621d83e11f67
3166 ! . user: test
3167 ! . date: Thu Jan 01 00:00:32 1970 +0000
3168 ! . summary: (32) expand
3169 ! .
3170 o ! changeset: 31:621d83e11f67
3171 !\! parent: 21:d42a756af44d
3172 ! ! parent: 30:6e11cd4b648f
3173 ! ! user: test
3174 ! ! date: Thu Jan 01 00:00:31 1970 +0000
3175 ! ! summary: (31) expand
3176 ! !
3177 o ! changeset: 30:6e11cd4b648f
3168 ! -3. parent: 31:621d83e11f67
3169 ! -3. user: test
3170 ! -3. date: Thu Jan 01 00:00:32 1970 +0000
3171 ! -3. summary: (32) expand
3172 ! -3.
3173 o -3. changeset: 31:621d83e11f67
3174 !\-3. parent: 21:d42a756af44d
3175 ! -3. parent: 30:6e11cd4b648f
3176 ! -3. user: test
3177 ! -3. date: Thu Jan 01 00:00:31 1970 +0000
3178 ! -3. summary: (31) expand
3179 ! -3.
3180 o -3. changeset: 30:6e11cd4b648f
3178 3181 !\ \ parent: 28:44ecd0b9ae99
3179 ! ~ ! parent: 29:cd9bb2be7593
3180 ! ! user: test
3181 ! ! date: Thu Jan 01 00:00:30 1970 +0000
3182 ! ! summary: (30) expand
3182 ! ~ -3. parent: 29:cd9bb2be7593
3183 ! -3. user: test
3184 ! -3. date: Thu Jan 01 00:00:30 1970 +0000
3185 ! -3. summary: (30) expand
3183 3186 ! /
3184 o ! changeset: 28:44ecd0b9ae99
3187 o -3. changeset: 28:44ecd0b9ae99
3185 3188 !\ \ parent: 1:6db2ef61d156
3186 ! ~ ! parent: 26:7f25b6c2f0b9
3187 ! ! user: test
3188 ! ! date: Thu Jan 01 00:00:28 1970 +0000
3189 ! ! summary: (28) merge zero known
3189 ! ~ -3. parent: 26:7f25b6c2f0b9
3190 ! -3. user: test
3191 ! -3. date: Thu Jan 01 00:00:28 1970 +0000
3192 ! -3. summary: (28) merge zero known
3190 3193 ! /
3191 o ! changeset: 26:7f25b6c2f0b9
3194 o -3. changeset: 26:7f25b6c2f0b9
3192 3195 !\ \ parent: 18:1aa84d96232a
3193 ! ! ! parent: 25:91da8ed57247
3194 ! ! ! user: test
3195 ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
3196 ! ! ! summary: (26) merge one known; far right
3197 ! ! !
3198 ! o ! changeset: 25:91da8ed57247
3199 ! !\! parent: 21:d42a756af44d
3200 ! ! ! parent: 24:a9c19a3d96b7
3201 ! ! ! user: test
3202 ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
3203 ! ! ! summary: (25) merge one known; far left
3204 ! ! !
3205 ! o ! changeset: 24:a9c19a3d96b7
3196 ! ! -3. parent: 25:91da8ed57247
3197 ! ! -3. user: test
3198 ! ! -3. date: Thu Jan 01 00:00:26 1970 +0000
3199 ! ! -3. summary: (26) merge one known; far right
3200 ! ! -3.
3201 ! o -3. changeset: 25:91da8ed57247
3202 ! !\-3. parent: 21:d42a756af44d
3203 ! ! -3. parent: 24:a9c19a3d96b7
3204 ! ! -3. user: test
3205 ! ! -3. date: Thu Jan 01 00:00:25 1970 +0000
3206 ! ! -3. summary: (25) merge one known; far left
3207 ! ! -3.
3208 ! o -3. changeset: 24:a9c19a3d96b7
3206 3209 ! !\ \ parent: 0:e6eb3150255d
3207 ! ! ~ ! parent: 23:a01cddf0766d
3208 ! ! ! user: test
3209 ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
3210 ! ! ! summary: (24) merge one known; immediate right
3210 ! ! ~ -3. parent: 23:a01cddf0766d
3211 ! ! -3. user: test
3212 ! ! -3. date: Thu Jan 01 00:00:24 1970 +0000
3213 ! ! -3. summary: (24) merge one known; immediate right
3211 3214 ! ! /
3212 ! o ! changeset: 23:a01cddf0766d
3215 ! o -3. changeset: 23:a01cddf0766d
3213 3216 ! !\ \ parent: 1:6db2ef61d156
3214 ! ! ~ ! parent: 22:e0d9cccacb5d
3215 ! ! ! user: test
3216 ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
3217 ! ! ! summary: (23) merge one known; immediate left
3217 ! ! ~ -3. parent: 22:e0d9cccacb5d
3218 ! ! -3. user: test
3219 ! ! -3. date: Thu Jan 01 00:00:23 1970 +0000
3220 ! ! -3. summary: (23) merge one known; immediate left
3218 3221 ! ! /
3219 ! o ! changeset: 22:e0d9cccacb5d
3220 !/!/ parent: 18:1aa84d96232a
3221 ! ! parent: 21:d42a756af44d
3222 ! ! user: test
3223 ! ! date: Thu Jan 01 00:00:22 1970 +0000
3224 ! ! summary: (22) merge two known; one far left, one far right
3225 ! !
3222 ! o -3. changeset: 22:e0d9cccacb5d
3223 !/-3./ parent: 18:1aa84d96232a
3224 ! -3. parent: 21:d42a756af44d
3225 ! -3. user: test
3226 ! -3. date: Thu Jan 01 00:00:22 1970 +0000
3227 ! -3. summary: (22) merge two known; one far left, one far right
3228 ! -3.
3226 3229 ! o changeset: 21:d42a756af44d
3227 3230 ! !\ parent: 19:31ddc2c1573b
3228 3231 ! ! ! parent: 20:d30ed6450e32
3229 3232 ! ! ! user: test
3230 3233 ! ! ! date: Thu Jan 01 00:00:21 1970 +0000
3231 3234 ! ! ! summary: (21) expand
3232 3235 ! ! !
3233 3236 +---o changeset: 20:d30ed6450e32
3234 3237 ! ! | parent: 0:e6eb3150255d
3235 3238 ! ! ~ parent: 18:1aa84d96232a
3236 3239 ! ! user: test
3237 3240 ! ! date: Thu Jan 01 00:00:20 1970 +0000
3238 3241 ! ! summary: (20) merge two known; two far right
3239 3242 ! !
3240 3243 ! o changeset: 19:31ddc2c1573b
3241 3244 ! |\ parent: 15:1dda3f72782d
3242 3245 ! ~ ~ parent: 17:44765d7c06e0
3243 3246 ! user: test
3244 3247 ! date: Thu Jan 01 00:00:19 1970 +0000
3245 3248 ! summary: (19) expand
3246 3249 !
3247 3250 o changeset: 18:1aa84d96232a
3248 3251 |\ parent: 1:6db2ef61d156
3249 3252 ~ ~ parent: 15:1dda3f72782d
3250 3253 user: test
3251 3254 date: Thu Jan 01 00:00:18 1970 +0000
3252 3255 summary: (18) merge two known; two far left
3253 3256
3254 3257 $ cd ..
3255 3258
3256 3259 Change graph shorten, test better with graphstyle.missing not none
3257 3260
3258 3261 $ cd repo
3259 3262 $ cat << EOF >> $HGRCPATH
3260 3263 > [experimental]
3261 3264 > graphstyle.parent = |
3262 3265 > graphstyle.grandparent = :
3263 3266 > graphstyle.missing = '
3264 3267 > graphshorten = true
3265 3268 > EOF
3266 3269 $ hg log -G -r 'file("a")' -m -T '{rev} {desc}'
3267 3270 @ 36 (36) buggy merge: identical parents
3268 3271 o 32 (32) expand
3269 3272 |\
3270 3273 o : 31 (31) expand
3271 3274 |\:
3272 3275 o : 30 (30) expand
3273 3276 |\ \
3274 3277 o \ \ 28 (28) merge zero known
3275 3278 |\ \ \
3276 3279 o \ \ \ 26 (26) merge one known; far right
3277 3280 |\ \ \ \
3278 3281 | o-----+ 25 (25) merge one known; far left
3279 3282 | o ' ' : 24 (24) merge one known; immediate right
3280 3283 | |\ \ \ \
3281 3284 | o---+ ' : 23 (23) merge one known; immediate left
3282 3285 | o-------+ 22 (22) merge two known; one far left, one far right
3283 3286 |/ / / / /
3284 3287 | ' ' ' o 21 (21) expand
3285 3288 | ' ' ' |\
3286 3289 +-+-------o 20 (20) merge two known; two far right
3287 3290 | ' ' ' o 19 (19) expand
3288 3291 | ' ' ' |\
3289 3292 o---+---+ | 18 (18) merge two known; two far left
3290 3293 / / / / /
3291 3294 ' ' ' | o 17 (17) expand
3292 3295 ' ' ' | |\
3293 3296 +-+-------o 16 (16) merge two known; one immediate right, one near right
3294 3297 ' ' ' o | 15 (15) expand
3295 3298 ' ' ' |\ \
3296 3299 +-------o | 14 (14) merge two known; one immediate right, one far right
3297 3300 ' ' ' | |/
3298 3301 ' ' ' o | 13 (13) expand
3299 3302 ' ' ' |\ \
3300 3303 ' +---+---o 12 (12) merge two known; one immediate right, one far left
3301 3304 ' ' ' | o 11 (11) expand
3302 3305 ' ' ' | |\
3303 3306 +---------o 10 (10) merge two known; one immediate left, one near right
3304 3307 ' ' ' | |/
3305 3308 ' ' ' o | 9 (9) expand
3306 3309 ' ' ' |\ \
3307 3310 +-------o | 8 (8) merge two known; one immediate left, one far right
3308 3311 ' ' ' |/ /
3309 3312 ' ' ' o | 7 (7) expand
3310 3313 ' ' ' |\ \
3311 3314 ' ' ' +---o 6 (6) merge two known; one immediate left, one far left
3312 3315 ' ' ' | '/
3313 3316 ' ' ' o ' 5 (5) expand
3314 3317 ' ' ' |\ \
3315 3318 ' +---o ' ' 4 (4) merge two known; one immediate left, one immediate right
3316 3319 ' ' ' '/ /
3317 3320
3318 3321 behavior with newlines
3319 3322
3320 3323 $ hg log -G -r ::2 -T '{rev} {desc}'
3321 3324 o 2 (2) collapse
3322 3325 o 1 (1) collapse
3323 3326 o 0 (0) root
3324 3327
3325 3328 $ hg log -G -r ::2 -T '{rev} {desc}\n'
3326 3329 o 2 (2) collapse
3327 3330 o 1 (1) collapse
3328 3331 o 0 (0) root
3329 3332
3330 3333 $ hg log -G -r ::2 -T '{rev} {desc}\n\n'
3331 3334 o 2 (2) collapse
3332 3335 |
3333 3336 o 1 (1) collapse
3334 3337 |
3335 3338 o 0 (0) root
3336 3339
3337 3340
3338 3341 $ hg log -G -r ::2 -T '\n{rev} {desc}'
3339 3342 o
3340 3343 | 2 (2) collapse
3341 3344 o
3342 3345 | 1 (1) collapse
3343 3346 o
3344 3347 0 (0) root
3345 3348
3346 3349 $ hg log -G -r ::2 -T '{rev} {desc}\n\n\n'
3347 3350 o 2 (2) collapse
3348 3351 |
3349 3352 |
3350 3353 o 1 (1) collapse
3351 3354 |
3352 3355 |
3353 3356 o 0 (0) root
3354 3357
3355 3358
3356 3359 $ cd ..
3357 3360
3358 3361 When inserting extra line nodes to handle more than 2 parents, ensure that
3359 3362 the right node styles are used (issue5174):
3360 3363
3361 3364 $ hg init repo-issue5174
3362 3365 $ cd repo-issue5174
3363 3366 $ echo a > f0
3364 3367 $ hg ci -Aqm 0
3365 3368 $ echo a > f1
3366 3369 $ hg ci -Aqm 1
3367 3370 $ echo a > f2
3368 3371 $ hg ci -Aqm 2
3369 3372 $ hg co ".^"
3370 3373 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3371 3374 $ echo a > f3
3372 3375 $ hg ci -Aqm 3
3373 3376 $ hg co ".^^"
3374 3377 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
3375 3378 $ echo a > f4
3376 3379 $ hg ci -Aqm 4
3377 3380 $ hg merge -r 2
3378 3381 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
3379 3382 (branch merge, don't forget to commit)
3380 3383 $ hg ci -qm 5
3381 3384 $ hg merge -r 3
3382 3385 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3383 3386 (branch merge, don't forget to commit)
3384 3387 $ hg ci -qm 6
3385 3388 $ hg log -G -r '0 | 1 | 2 | 6'
3386 3389 @ changeset: 6:851fe89689ad
3387 3390 :\ tag: tip
3388 3391 : : parent: 5:4f1e3cf15f5d
3389 3392 : : parent: 3:b74ba7084d2d
3390 3393 : : user: test
3391 3394 : : date: Thu Jan 01 00:00:00 1970 +0000
3392 3395 : : summary: 6
3393 3396 : :
3394 3397 : \
3395 3398 : :\
3396 3399 : o : changeset: 2:3e6599df4cce
3397 3400 : :/ user: test
3398 3401 : : date: Thu Jan 01 00:00:00 1970 +0000
3399 3402 : : summary: 2
3400 3403 : :
3401 3404 : o changeset: 1:bd9a55143933
3402 3405 :/ user: test
3403 3406 : date: Thu Jan 01 00:00:00 1970 +0000
3404 3407 : summary: 1
3405 3408 :
3406 3409 o changeset: 0:870a5edc339c
3407 3410 user: test
3408 3411 date: Thu Jan 01 00:00:00 1970 +0000
3409 3412 summary: 0
3410 3413
3411 3414
3412 3415 $ cd ..
3413 3416
3414 3417 Multiple roots (issue5440):
3415 3418
3416 3419 $ hg init multiroots
3417 3420 $ cd multiroots
3418 3421 $ cat <<EOF > .hg/hgrc
3419 3422 > [ui]
3420 3423 > logtemplate = '{rev} {desc}\n\n'
3421 3424 > EOF
3422 3425
3423 3426 $ touch foo
3424 3427 $ hg ci -Aqm foo
3425 3428 $ hg co -q null
3426 3429 $ touch bar
3427 3430 $ hg ci -Aqm bar
3428 3431
3429 3432 $ hg log -Gr null:
3430 3433 @ 1 bar
3431 3434 |
3432 3435 | o 0 foo
3433 3436 |/
3434 3437 o -1
3435 3438
3436 3439 $ hg log -Gr null+0
3437 3440 o 0 foo
3438 3441 |
3439 3442 o -1
3440 3443
3441 3444 $ hg log -Gr null+1
3442 3445 @ 1 bar
3443 3446 |
3444 3447 o -1
3445 3448
3446 3449
3447 3450 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now