Show More
@@ -1,382 +1,384 | |||
|
1 | 1 | # ASCII graph log extension for Mercurial |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2007 Joel Rosdahl <joel@rosdahl.net> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | 8 | '''command to view revision graphs from a shell |
|
9 | 9 | |
|
10 | 10 | This extension adds a --graph option to the incoming, outgoing and log |
|
11 | 11 | commands. When this options is given, an ASCII representation of the |
|
12 | 12 | revision graph is also shown. |
|
13 | 13 | ''' |
|
14 | 14 | |
|
15 | 15 | import os |
|
16 | 16 | from mercurial.cmdutil import revrange, show_changeset |
|
17 | 17 | from mercurial.commands import templateopts |
|
18 | 18 | from mercurial.i18n import _ |
|
19 | 19 | from mercurial.node import nullrev |
|
20 | 20 | from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions |
|
21 | 21 | from mercurial import hg, url, util, graphmod, discovery |
|
22 | 22 | |
|
23 | 23 | ASCIIDATA = 'ASC' |
|
24 | 24 | |
|
25 | 25 | def asciiedges(seen, rev, parents): |
|
26 | 26 | """adds edge info to changelog DAG walk suitable for ascii()""" |
|
27 | 27 | if rev not in seen: |
|
28 | 28 | seen.append(rev) |
|
29 | 29 | nodeidx = seen.index(rev) |
|
30 | 30 | |
|
31 | 31 | knownparents = [] |
|
32 | 32 | newparents = [] |
|
33 | 33 | for parent in parents: |
|
34 | 34 | if parent in seen: |
|
35 | 35 | knownparents.append(parent) |
|
36 | 36 | else: |
|
37 | 37 | newparents.append(parent) |
|
38 | 38 | |
|
39 | 39 | ncols = len(seen) |
|
40 | 40 | seen[nodeidx:nodeidx + 1] = newparents |
|
41 | 41 | edges = [(nodeidx, seen.index(p)) for p in knownparents] |
|
42 | 42 | |
|
43 | 43 | if len(newparents) > 0: |
|
44 | 44 | edges.append((nodeidx, nodeidx)) |
|
45 | 45 | if len(newparents) > 1: |
|
46 | 46 | edges.append((nodeidx, nodeidx + 1)) |
|
47 | 47 | |
|
48 | 48 | nmorecols = len(seen) - ncols |
|
49 | 49 | return nodeidx, edges, ncols, nmorecols |
|
50 | 50 | |
|
51 | 51 | def fix_long_right_edges(edges): |
|
52 | 52 | for (i, (start, end)) in enumerate(edges): |
|
53 | 53 | if end > start: |
|
54 | 54 | edges[i] = (start, end + 1) |
|
55 | 55 | |
|
56 | 56 | def get_nodeline_edges_tail( |
|
57 | 57 | node_index, p_node_index, n_columns, n_columns_diff, p_diff, fix_tail): |
|
58 | 58 | if fix_tail and n_columns_diff == p_diff and n_columns_diff != 0: |
|
59 | 59 | # Still going in the same non-vertical direction. |
|
60 | 60 | if n_columns_diff == -1: |
|
61 | 61 | start = max(node_index + 1, p_node_index) |
|
62 | 62 | tail = ["|", " "] * (start - node_index - 1) |
|
63 | 63 | tail.extend(["/", " "] * (n_columns - start)) |
|
64 | 64 | return tail |
|
65 | 65 | else: |
|
66 | 66 | return ["\\", " "] * (n_columns - node_index - 1) |
|
67 | 67 | else: |
|
68 | 68 | return ["|", " "] * (n_columns - node_index - 1) |
|
69 | 69 | |
|
70 | 70 | def draw_edges(edges, nodeline, interline): |
|
71 | 71 | for (start, end) in edges: |
|
72 | 72 | if start == end + 1: |
|
73 | 73 | interline[2 * end + 1] = "/" |
|
74 | 74 | elif start == end - 1: |
|
75 | 75 | interline[2 * start + 1] = "\\" |
|
76 | 76 | elif start == end: |
|
77 | 77 | interline[2 * start] = "|" |
|
78 | 78 | else: |
|
79 | 79 | nodeline[2 * end] = "+" |
|
80 | 80 | if start > end: |
|
81 | 81 | (start, end) = (end, start) |
|
82 | 82 | for i in range(2 * start + 1, 2 * end): |
|
83 | 83 | if nodeline[i] != "+": |
|
84 | 84 | nodeline[i] = "-" |
|
85 | 85 | |
|
86 | 86 | def get_padding_line(ni, n_columns, edges): |
|
87 | 87 | line = [] |
|
88 | 88 | line.extend(["|", " "] * ni) |
|
89 | 89 | if (ni, ni - 1) in edges or (ni, ni) in edges: |
|
90 | 90 | # (ni, ni - 1) (ni, ni) |
|
91 | 91 | # | | | | | | | | |
|
92 | 92 | # +---o | | o---+ |
|
93 | 93 | # | | c | | c | | |
|
94 | 94 | # | |/ / | |/ / |
|
95 | 95 | # | | | | | | |
|
96 | 96 | c = "|" |
|
97 | 97 | else: |
|
98 | 98 | c = " " |
|
99 | 99 | line.extend([c, " "]) |
|
100 | 100 | line.extend(["|", " "] * (n_columns - ni - 1)) |
|
101 | 101 | return line |
|
102 | 102 | |
|
103 | 103 | def asciistate(): |
|
104 | 104 | """returns the initial value for the "state" argument to ascii()""" |
|
105 | 105 | return [0, 0] |
|
106 | 106 | |
|
107 | 107 | def ascii(ui, state, type, char, text, coldata): |
|
108 | 108 | """prints an ASCII graph of the DAG |
|
109 | 109 | |
|
110 | 110 | takes the following arguments (one call per node in the graph): |
|
111 | 111 | |
|
112 | 112 | - ui to write to |
|
113 | 113 | - Somewhere to keep the needed state in (init to asciistate()) |
|
114 | 114 | - Column of the current node in the set of ongoing edges. |
|
115 | 115 | - Type indicator of node data == ASCIIDATA. |
|
116 | 116 | - Payload: (char, lines): |
|
117 | 117 | - Character to use as node's symbol. |
|
118 | 118 | - List of lines to display as the node's text. |
|
119 | 119 | - Edges; a list of (col, next_col) indicating the edges between |
|
120 | 120 | the current node and its parents. |
|
121 | 121 | - Number of columns (ongoing edges) in the current revision. |
|
122 | 122 | - The difference between the number of columns (ongoing edges) |
|
123 | 123 | in the next revision and the number of columns (ongoing edges) |
|
124 | 124 | in the current revision. That is: -1 means one column removed; |
|
125 | 125 | 0 means no columns added or removed; 1 means one column added. |
|
126 | 126 | """ |
|
127 | 127 | |
|
128 | 128 | idx, edges, ncols, coldiff = coldata |
|
129 | 129 | assert -2 < coldiff < 2 |
|
130 | 130 | if coldiff == -1: |
|
131 | 131 | # Transform |
|
132 | 132 | # |
|
133 | 133 | # | | | | | | |
|
134 | 134 | # o | | into o---+ |
|
135 | 135 | # |X / |/ / |
|
136 | 136 | # | | | | |
|
137 | 137 | fix_long_right_edges(edges) |
|
138 | 138 | |
|
139 | 139 | # add_padding_line says whether to rewrite |
|
140 | 140 | # |
|
141 | 141 | # | | | | | | | | |
|
142 | 142 | # | o---+ into | o---+ |
|
143 | 143 | # | / / | | | # <--- padding line |
|
144 | 144 | # o | | | / / |
|
145 | 145 | # o | | |
|
146 | 146 | add_padding_line = (len(text) > 2 and coldiff == -1 and |
|
147 | 147 | [x for (x, y) in edges if x + 1 < y]) |
|
148 | 148 | |
|
149 | 149 | # fix_nodeline_tail says whether to rewrite |
|
150 | 150 | # |
|
151 | 151 | # | | o | | | | o | | |
|
152 | 152 | # | | |/ / | | |/ / |
|
153 | 153 | # | o | | into | o / / # <--- fixed nodeline tail |
|
154 | 154 | # | |/ / | |/ / |
|
155 | 155 | # o | | o | | |
|
156 | 156 | fix_nodeline_tail = len(text) <= 2 and not add_padding_line |
|
157 | 157 | |
|
158 | 158 | # nodeline is the line containing the node character (typically o) |
|
159 | 159 | nodeline = ["|", " "] * idx |
|
160 | 160 | nodeline.extend([char, " "]) |
|
161 | 161 | |
|
162 | 162 | nodeline.extend( |
|
163 | 163 | get_nodeline_edges_tail(idx, state[1], ncols, coldiff, |
|
164 | 164 | state[0], fix_nodeline_tail)) |
|
165 | 165 | |
|
166 | 166 | # shift_interline is the line containing the non-vertical |
|
167 | 167 | # edges between this entry and the next |
|
168 | 168 | shift_interline = ["|", " "] * idx |
|
169 | 169 | if coldiff == -1: |
|
170 | 170 | n_spaces = 1 |
|
171 | 171 | edge_ch = "/" |
|
172 | 172 | elif coldiff == 0: |
|
173 | 173 | n_spaces = 2 |
|
174 | 174 | edge_ch = "|" |
|
175 | 175 | else: |
|
176 | 176 | n_spaces = 3 |
|
177 | 177 | edge_ch = "\\" |
|
178 | 178 | shift_interline.extend(n_spaces * [" "]) |
|
179 | 179 | shift_interline.extend([edge_ch, " "] * (ncols - idx - 1)) |
|
180 | 180 | |
|
181 | 181 | # draw edges from the current node to its parents |
|
182 | 182 | draw_edges(edges, nodeline, shift_interline) |
|
183 | 183 | |
|
184 | 184 | # lines is the list of all graph lines to print |
|
185 | 185 | lines = [nodeline] |
|
186 | 186 | if add_padding_line: |
|
187 | 187 | lines.append(get_padding_line(idx, ncols, edges)) |
|
188 | 188 | lines.append(shift_interline) |
|
189 | 189 | |
|
190 | 190 | # make sure that there are as many graph lines as there are |
|
191 | 191 | # log strings |
|
192 | 192 | while len(text) < len(lines): |
|
193 | 193 | text.append("") |
|
194 | 194 | if len(lines) < len(text): |
|
195 | 195 | extra_interline = ["|", " "] * (ncols + coldiff) |
|
196 | 196 | while len(lines) < len(text): |
|
197 | 197 | lines.append(extra_interline) |
|
198 | 198 | |
|
199 | 199 | # print lines |
|
200 | 200 | indentation_level = max(ncols, ncols + coldiff) |
|
201 | 201 | for (line, logstr) in zip(lines, text): |
|
202 | 202 | ln = "%-*s %s" % (2 * indentation_level, "".join(line), logstr) |
|
203 | 203 | ui.write(ln.rstrip() + '\n') |
|
204 | 204 | |
|
205 | 205 | # ... and start over |
|
206 | 206 | state[0] = coldiff |
|
207 | 207 | state[1] = idx |
|
208 | 208 | |
|
209 | 209 | def get_revs(repo, rev_opt): |
|
210 | 210 | if rev_opt: |
|
211 | 211 | revs = revrange(repo, rev_opt) |
|
212 | 212 | if len(revs) == 0: |
|
213 | 213 | return (nullrev, nullrev) |
|
214 | 214 | return (max(revs), min(revs)) |
|
215 | 215 | else: |
|
216 | 216 | return (len(repo) - 1, 0) |
|
217 | 217 | |
|
218 | 218 | def check_unsupported_flags(opts): |
|
219 | 219 | for op in ["follow", "follow_first", "date", "copies", "keyword", "remove", |
|
220 | 220 | "only_merges", "user", "branch", "only_branch", "prune", |
|
221 | 221 | "newest_first", "no_merges", "include", "exclude"]: |
|
222 | 222 | if op in opts and opts[op]: |
|
223 | 223 | raise util.Abort(_("--graph option is incompatible with --%s") |
|
224 | 224 | % op.replace("_", "-")) |
|
225 | 225 | |
|
226 | 226 | def generate(ui, dag, displayer, showparents, edgefn): |
|
227 | 227 | seen, state = [], asciistate() |
|
228 | 228 | for rev, type, ctx, parents in dag: |
|
229 | 229 | char = ctx.node() in showparents and '@' or 'o' |
|
230 | 230 | displayer.show(ctx) |
|
231 | 231 | lines = displayer.hunk.pop(rev).split('\n')[:-1] |
|
232 | displayer.flush(rev) | |
|
232 | 233 | ascii(ui, state, type, char, lines, edgefn(seen, rev, parents)) |
|
234 | displayer.close() | |
|
233 | 235 | |
|
234 | 236 | def graphlog(ui, repo, path=None, **opts): |
|
235 | 237 | """show revision history alongside an ASCII revision graph |
|
236 | 238 | |
|
237 | 239 | Print a revision history alongside a revision graph drawn with |
|
238 | 240 | ASCII characters. |
|
239 | 241 | |
|
240 | 242 | Nodes printed as an @ character are parents of the working |
|
241 | 243 | directory. |
|
242 | 244 | """ |
|
243 | 245 | |
|
244 | 246 | check_unsupported_flags(opts) |
|
245 | 247 | limit = cmdutil.loglimit(opts) |
|
246 | 248 | start, stop = get_revs(repo, opts["rev"]) |
|
247 | 249 | if start == nullrev: |
|
248 | 250 | return |
|
249 | 251 | |
|
250 | 252 | if path: |
|
251 | 253 | path = util.canonpath(repo.root, os.getcwd(), path) |
|
252 | 254 | if path: # could be reset in canonpath |
|
253 | 255 | revdag = graphmod.filerevs(repo, path, start, stop, limit) |
|
254 | 256 | else: |
|
255 | 257 | if limit is not None: |
|
256 | 258 | stop = max(stop, start - limit + 1) |
|
257 | 259 | revdag = graphmod.revisions(repo, start, stop) |
|
258 | 260 | |
|
259 | 261 | displayer = show_changeset(ui, repo, opts, buffered=True) |
|
260 | 262 | showparents = [ctx.node() for ctx in repo[None].parents()] |
|
261 | 263 | generate(ui, revdag, displayer, showparents, asciiedges) |
|
262 | 264 | |
|
263 | 265 | def graphrevs(repo, nodes, opts): |
|
264 | 266 | limit = cmdutil.loglimit(opts) |
|
265 | 267 | nodes.reverse() |
|
266 | 268 | if limit is not None: |
|
267 | 269 | nodes = nodes[:limit] |
|
268 | 270 | return graphmod.nodes(repo, nodes) |
|
269 | 271 | |
|
270 | 272 | def goutgoing(ui, repo, dest=None, **opts): |
|
271 | 273 | """show the outgoing changesets alongside an ASCII revision graph |
|
272 | 274 | |
|
273 | 275 | Print the outgoing changesets alongside a revision graph drawn with |
|
274 | 276 | ASCII characters. |
|
275 | 277 | |
|
276 | 278 | Nodes printed as an @ character are parents of the working |
|
277 | 279 | directory. |
|
278 | 280 | """ |
|
279 | 281 | |
|
280 | 282 | check_unsupported_flags(opts) |
|
281 | 283 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
282 | 284 | dest, branches = hg.parseurl(dest, opts.get('branch')) |
|
283 | 285 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
|
284 | 286 | other = hg.repository(hg.remoteui(ui, opts), dest) |
|
285 | 287 | if revs: |
|
286 | 288 | revs = [repo.lookup(rev) for rev in revs] |
|
287 | 289 | ui.status(_('comparing with %s\n') % url.hidepassword(dest)) |
|
288 | 290 | o = discovery.findoutgoing(repo, other, force=opts.get('force')) |
|
289 | 291 | if not o: |
|
290 | 292 | ui.status(_("no changes found\n")) |
|
291 | 293 | return |
|
292 | 294 | |
|
293 | 295 | o = repo.changelog.nodesbetween(o, revs)[0] |
|
294 | 296 | revdag = graphrevs(repo, o, opts) |
|
295 | 297 | displayer = show_changeset(ui, repo, opts, buffered=True) |
|
296 | 298 | showparents = [ctx.node() for ctx in repo[None].parents()] |
|
297 | 299 | generate(ui, revdag, displayer, showparents, asciiedges) |
|
298 | 300 | |
|
299 | 301 | def gincoming(ui, repo, source="default", **opts): |
|
300 | 302 | """show the incoming changesets alongside an ASCII revision graph |
|
301 | 303 | |
|
302 | 304 | Print the incoming changesets alongside a revision graph drawn with |
|
303 | 305 | ASCII characters. |
|
304 | 306 | |
|
305 | 307 | Nodes printed as an @ character are parents of the working |
|
306 | 308 | directory. |
|
307 | 309 | """ |
|
308 | 310 | |
|
309 | 311 | check_unsupported_flags(opts) |
|
310 | 312 | source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) |
|
311 | 313 | other = hg.repository(hg.remoteui(repo, opts), source) |
|
312 | 314 | revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) |
|
313 | 315 | ui.status(_('comparing with %s\n') % url.hidepassword(source)) |
|
314 | 316 | if revs: |
|
315 | 317 | revs = [other.lookup(rev) for rev in revs] |
|
316 | 318 | incoming = discovery.findincoming(repo, other, heads=revs, |
|
317 | 319 | force=opts["force"]) |
|
318 | 320 | if not incoming: |
|
319 | 321 | try: |
|
320 | 322 | os.unlink(opts["bundle"]) |
|
321 | 323 | except: |
|
322 | 324 | pass |
|
323 | 325 | ui.status(_("no changes found\n")) |
|
324 | 326 | return |
|
325 | 327 | |
|
326 | 328 | cleanup = None |
|
327 | 329 | try: |
|
328 | 330 | |
|
329 | 331 | fname = opts["bundle"] |
|
330 | 332 | if fname or not other.local(): |
|
331 | 333 | # create a bundle (uncompressed if other repo is not local) |
|
332 | 334 | if revs is None: |
|
333 | 335 | cg = other.changegroup(incoming, "incoming") |
|
334 | 336 | else: |
|
335 | 337 | cg = other.changegroupsubset(incoming, revs, 'incoming') |
|
336 | 338 | bundletype = other.local() and "HG10BZ" or "HG10UN" |
|
337 | 339 | fname = cleanup = changegroup.writebundle(cg, fname, bundletype) |
|
338 | 340 | # keep written bundle? |
|
339 | 341 | if opts["bundle"]: |
|
340 | 342 | cleanup = None |
|
341 | 343 | if not other.local(): |
|
342 | 344 | # use the created uncompressed bundlerepo |
|
343 | 345 | other = bundlerepo.bundlerepository(ui, repo.root, fname) |
|
344 | 346 | |
|
345 | 347 | chlist = other.changelog.nodesbetween(incoming, revs)[0] |
|
346 | 348 | revdag = graphrevs(other, chlist, opts) |
|
347 | 349 | displayer = show_changeset(ui, other, opts, buffered=True) |
|
348 | 350 | showparents = [ctx.node() for ctx in repo[None].parents()] |
|
349 | 351 | generate(ui, revdag, displayer, showparents, asciiedges) |
|
350 | 352 | |
|
351 | 353 | finally: |
|
352 | 354 | if hasattr(other, 'close'): |
|
353 | 355 | other.close() |
|
354 | 356 | if cleanup: |
|
355 | 357 | os.unlink(cleanup) |
|
356 | 358 | |
|
357 | 359 | def uisetup(ui): |
|
358 | 360 | '''Initialize the extension.''' |
|
359 | 361 | _wrapcmd(ui, 'log', commands.table, graphlog) |
|
360 | 362 | _wrapcmd(ui, 'incoming', commands.table, gincoming) |
|
361 | 363 | _wrapcmd(ui, 'outgoing', commands.table, goutgoing) |
|
362 | 364 | |
|
363 | 365 | def _wrapcmd(ui, cmd, table, wrapfn): |
|
364 | 366 | '''wrap the command''' |
|
365 | 367 | def graph(orig, *args, **kwargs): |
|
366 | 368 | if kwargs['graph']: |
|
367 | 369 | return wrapfn(*args, **kwargs) |
|
368 | 370 | return orig(*args, **kwargs) |
|
369 | 371 | entry = extensions.wrapcommand(table, cmd, graph) |
|
370 | 372 | entry[1].append(('G', 'graph', None, _("show the revision DAG"))) |
|
371 | 373 | |
|
372 | 374 | cmdtable = { |
|
373 | 375 | "glog": |
|
374 | 376 | (graphlog, |
|
375 | 377 | [('l', 'limit', '', |
|
376 | 378 | _('limit number of changes displayed'), _('NUM')), |
|
377 | 379 | ('p', 'patch', False, _('show patch')), |
|
378 | 380 | ('r', 'rev', [], |
|
379 | 381 | _('show the specified revision or range'), _('REV')), |
|
380 | 382 | ] + templateopts, |
|
381 | 383 | _('hg glog [OPTION]... [FILE]')), |
|
382 | 384 | } |
@@ -1,879 +1,890 | |||
|
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 | $ "$TESTDIR/hghave" no-outer-repo || exit 80 |
|
73 | 73 | |
|
74 | 74 | $ commit() |
|
75 | 75 | > { |
|
76 | 76 | > rev=$1 |
|
77 | 77 | > msg=$2 |
|
78 | 78 | > shift 2 |
|
79 | 79 | > if [ "$#" -gt 0 ]; then |
|
80 | 80 | > hg debugsetparents "$@" |
|
81 | 81 | > fi |
|
82 | 82 | > echo $rev > a |
|
83 | 83 | > hg commit -Aqd "$rev 0" -m "($rev) $msg" |
|
84 | 84 | > } |
|
85 | 85 | |
|
86 | 86 | $ echo "[extensions]" >> $HGRCPATH |
|
87 | 87 | $ echo "graphlog=" >> $HGRCPATH |
|
88 | 88 | |
|
89 | 89 | $ hg init repo |
|
90 | 90 | $ cd repo |
|
91 | 91 | |
|
92 | 92 | Empty repo: |
|
93 | 93 | |
|
94 | 94 | $ hg glog |
|
95 | 95 | |
|
96 | 96 | |
|
97 | 97 | Building DAG: |
|
98 | 98 | |
|
99 | 99 | $ commit 0 "root" |
|
100 | 100 | $ commit 1 "collapse" 0 |
|
101 | 101 | $ commit 2 "collapse" 1 |
|
102 | 102 | $ commit 3 "collapse" 2 |
|
103 | 103 | $ commit 4 "merge two known; one immediate left, one immediate right" 1 3 |
|
104 | 104 | $ commit 5 "expand" 3 4 |
|
105 | 105 | $ commit 6 "merge two known; one immediate left, one far left" 2 5 |
|
106 | 106 | $ commit 7 "expand" 2 5 |
|
107 | 107 | $ commit 8 "merge two known; one immediate left, one far right" 0 7 |
|
108 | 108 | $ commit 9 "expand" 7 8 |
|
109 | 109 | $ commit 10 "merge two known; one immediate left, one near right" 0 6 |
|
110 | 110 | $ commit 11 "expand" 6 10 |
|
111 | 111 | $ commit 12 "merge two known; one immediate right, one far left" 1 9 |
|
112 | 112 | $ commit 13 "expand" 9 11 |
|
113 | 113 | $ commit 14 "merge two known; one immediate right, one far right" 0 12 |
|
114 | 114 | $ commit 15 "expand" 13 14 |
|
115 | 115 | $ commit 16 "merge two known; one immediate right, one near right" 0 1 |
|
116 | 116 | $ commit 17 "expand" 12 16 |
|
117 | 117 | $ commit 18 "merge two known; two far left" 1 15 |
|
118 | 118 | $ commit 19 "expand" 15 17 |
|
119 | 119 | $ commit 20 "merge two known; two far right" 0 18 |
|
120 | 120 | $ commit 21 "expand" 19 20 |
|
121 | 121 | $ commit 22 "merge two known; one far left, one far right" 18 21 |
|
122 | 122 | $ commit 23 "merge one known; immediate left" 1 22 |
|
123 | 123 | $ commit 24 "merge one known; immediate right" 0 23 |
|
124 | 124 | $ commit 25 "merge one known; far left" 21 24 |
|
125 | 125 | $ commit 26 "merge one known; far right" 18 25 |
|
126 | 126 | $ commit 27 "collapse" 21 |
|
127 | 127 | $ commit 28 "merge zero known" 1 26 |
|
128 | 128 | $ commit 29 "regular commit" 0 |
|
129 | 129 | $ commit 30 "expand" 28 29 |
|
130 | 130 | $ commit 31 "expand" 21 30 |
|
131 | 131 | $ commit 32 "expand" 27 31 |
|
132 | 132 | $ commit 33 "head" 18 |
|
133 | 133 | $ commit 34 "head" 32 |
|
134 | 134 | |
|
135 | 135 | |
|
136 | 136 | $ hg glog -q |
|
137 | 137 | @ 34:fea3ac5810e0 |
|
138 | 138 | | |
|
139 | 139 | | o 33:68608f5145f9 |
|
140 | 140 | | | |
|
141 | 141 | o | 32:d06dffa21a31 |
|
142 | 142 | |\ \ |
|
143 | 143 | | o \ 31:621d83e11f67 |
|
144 | 144 | | |\ \ |
|
145 | 145 | | | o \ 30:6e11cd4b648f |
|
146 | 146 | | | |\ \ |
|
147 | 147 | | | | o | 29:cd9bb2be7593 |
|
148 | 148 | | | | | | |
|
149 | 149 | | | o | | 28:44ecd0b9ae99 |
|
150 | 150 | | | |\ \ \ |
|
151 | 151 | o | | | | | 27:886ed638191b |
|
152 | 152 | |/ / / / / |
|
153 | 153 | | | o---+ 26:7f25b6c2f0b9 |
|
154 | 154 | | | | | | |
|
155 | 155 | +---o | | 25:91da8ed57247 |
|
156 | 156 | | | | | | |
|
157 | 157 | | | o | | 24:a9c19a3d96b7 |
|
158 | 158 | | | |\| | |
|
159 | 159 | | | o | | 23:a01cddf0766d |
|
160 | 160 | | |/| | | |
|
161 | 161 | +---o---+ 22:e0d9cccacb5d |
|
162 | 162 | | | / / |
|
163 | 163 | o | | | 21:d42a756af44d |
|
164 | 164 | |\ \ \ \ |
|
165 | 165 | | o---+-+ 20:d30ed6450e32 |
|
166 | 166 | | / / / |
|
167 | 167 | o | | | 19:31ddc2c1573b |
|
168 | 168 | |\ \ \ \ |
|
169 | 169 | +---+---o 18:1aa84d96232a |
|
170 | 170 | | | | | |
|
171 | 171 | | o | | 17:44765d7c06e0 |
|
172 | 172 | | |\ \ \ |
|
173 | 173 | | | o---+ 16:3677d192927d |
|
174 | 174 | | | |/ / |
|
175 | 175 | o | | | 15:1dda3f72782d |
|
176 | 176 | |\ \ \ \ |
|
177 | 177 | | o-----+ 14:8eac370358ef |
|
178 | 178 | | |/ / / |
|
179 | 179 | o | | | 13:22d8966a97e3 |
|
180 | 180 | |\ \ \ \ |
|
181 | 181 | +---o | | 12:86b91144a6e9 |
|
182 | 182 | | | |/ / |
|
183 | 183 | | o | | 11:832d76e6bdf2 |
|
184 | 184 | | |\ \ \ |
|
185 | 185 | | | o---+ 10:74c64d036d72 |
|
186 | 186 | | |/ / / |
|
187 | 187 | o | | | 9:7010c0af0a35 |
|
188 | 188 | |\ \ \ \ |
|
189 | 189 | | o-----+ 8:7a0b11f71937 |
|
190 | 190 | |/ / / / |
|
191 | 191 | o | | | 7:b632bb1b1224 |
|
192 | 192 | |\ \ \ \ |
|
193 | 193 | +---o | | 6:b105a072e251 |
|
194 | 194 | | |/ / / |
|
195 | 195 | | o | | 5:4409d547b708 |
|
196 | 196 | | |\ \ \ |
|
197 | 197 | | | o | | 4:26a8bac39d9f |
|
198 | 198 | | |/|/ / |
|
199 | 199 | | o / / 3:27eef8ed80b4 |
|
200 | 200 | |/ / / |
|
201 | 201 | o / / 2:3d9a33b8d1e1 |
|
202 | 202 | |/ / |
|
203 | 203 | o / 1:6db2ef61d156 |
|
204 | 204 | |/ |
|
205 | 205 | o 0:e6eb3150255d |
|
206 | 206 | |
|
207 | 207 | |
|
208 | 208 | $ hg glog |
|
209 | 209 | @ changeset: 34:fea3ac5810e0 |
|
210 | 210 | | tag: tip |
|
211 | 211 | | parent: 32:d06dffa21a31 |
|
212 | 212 | | user: test |
|
213 | 213 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
214 | 214 | | summary: (34) head |
|
215 | 215 | | |
|
216 | 216 | | o changeset: 33:68608f5145f9 |
|
217 | 217 | | | parent: 18:1aa84d96232a |
|
218 | 218 | | | user: test |
|
219 | 219 | | | date: Thu Jan 01 00:00:33 1970 +0000 |
|
220 | 220 | | | summary: (33) head |
|
221 | 221 | | | |
|
222 | 222 | o | changeset: 32:d06dffa21a31 |
|
223 | 223 | |\ \ parent: 27:886ed638191b |
|
224 | 224 | | | | parent: 31:621d83e11f67 |
|
225 | 225 | | | | user: test |
|
226 | 226 | | | | date: Thu Jan 01 00:00:32 1970 +0000 |
|
227 | 227 | | | | summary: (32) expand |
|
228 | 228 | | | | |
|
229 | 229 | | o | changeset: 31:621d83e11f67 |
|
230 | 230 | | |\ \ parent: 21:d42a756af44d |
|
231 | 231 | | | | | parent: 30:6e11cd4b648f |
|
232 | 232 | | | | | user: test |
|
233 | 233 | | | | | date: Thu Jan 01 00:00:31 1970 +0000 |
|
234 | 234 | | | | | summary: (31) expand |
|
235 | 235 | | | | | |
|
236 | 236 | | | o | changeset: 30:6e11cd4b648f |
|
237 | 237 | | | |\ \ parent: 28:44ecd0b9ae99 |
|
238 | 238 | | | | | | parent: 29:cd9bb2be7593 |
|
239 | 239 | | | | | | user: test |
|
240 | 240 | | | | | | date: Thu Jan 01 00:00:30 1970 +0000 |
|
241 | 241 | | | | | | summary: (30) expand |
|
242 | 242 | | | | | | |
|
243 | 243 | | | | o | changeset: 29:cd9bb2be7593 |
|
244 | 244 | | | | | | parent: 0:e6eb3150255d |
|
245 | 245 | | | | | | user: test |
|
246 | 246 | | | | | | date: Thu Jan 01 00:00:29 1970 +0000 |
|
247 | 247 | | | | | | summary: (29) regular commit |
|
248 | 248 | | | | | | |
|
249 | 249 | | | o | | changeset: 28:44ecd0b9ae99 |
|
250 | 250 | | | |\ \ \ parent: 1:6db2ef61d156 |
|
251 | 251 | | | | | | | parent: 26:7f25b6c2f0b9 |
|
252 | 252 | | | | | | | user: test |
|
253 | 253 | | | | | | | date: Thu Jan 01 00:00:28 1970 +0000 |
|
254 | 254 | | | | | | | summary: (28) merge zero known |
|
255 | 255 | | | | | | | |
|
256 | 256 | o | | | | | changeset: 27:886ed638191b |
|
257 | 257 | |/ / / / / parent: 21:d42a756af44d |
|
258 | 258 | | | | | | user: test |
|
259 | 259 | | | | | | date: Thu Jan 01 00:00:27 1970 +0000 |
|
260 | 260 | | | | | | summary: (27) collapse |
|
261 | 261 | | | | | | |
|
262 | 262 | | | o---+ changeset: 26:7f25b6c2f0b9 |
|
263 | 263 | | | | | | parent: 18:1aa84d96232a |
|
264 | 264 | | | | | | parent: 25:91da8ed57247 |
|
265 | 265 | | | | | | user: test |
|
266 | 266 | | | | | | date: Thu Jan 01 00:00:26 1970 +0000 |
|
267 | 267 | | | | | | summary: (26) merge one known; far right |
|
268 | 268 | | | | | | |
|
269 | 269 | +---o | | changeset: 25:91da8ed57247 |
|
270 | 270 | | | | | | parent: 21:d42a756af44d |
|
271 | 271 | | | | | | parent: 24:a9c19a3d96b7 |
|
272 | 272 | | | | | | user: test |
|
273 | 273 | | | | | | date: Thu Jan 01 00:00:25 1970 +0000 |
|
274 | 274 | | | | | | summary: (25) merge one known; far left |
|
275 | 275 | | | | | | |
|
276 | 276 | | | o | | changeset: 24:a9c19a3d96b7 |
|
277 | 277 | | | |\| | parent: 0:e6eb3150255d |
|
278 | 278 | | | | | | parent: 23:a01cddf0766d |
|
279 | 279 | | | | | | user: test |
|
280 | 280 | | | | | | date: Thu Jan 01 00:00:24 1970 +0000 |
|
281 | 281 | | | | | | summary: (24) merge one known; immediate right |
|
282 | 282 | | | | | | |
|
283 | 283 | | | o | | changeset: 23:a01cddf0766d |
|
284 | 284 | | |/| | | parent: 1:6db2ef61d156 |
|
285 | 285 | | | | | | parent: 22:e0d9cccacb5d |
|
286 | 286 | | | | | | user: test |
|
287 | 287 | | | | | | date: Thu Jan 01 00:00:23 1970 +0000 |
|
288 | 288 | | | | | | summary: (23) merge one known; immediate left |
|
289 | 289 | | | | | | |
|
290 | 290 | +---o---+ changeset: 22:e0d9cccacb5d |
|
291 | 291 | | | | | parent: 18:1aa84d96232a |
|
292 | 292 | | | / / parent: 21:d42a756af44d |
|
293 | 293 | | | | | user: test |
|
294 | 294 | | | | | date: Thu Jan 01 00:00:22 1970 +0000 |
|
295 | 295 | | | | | summary: (22) merge two known; one far left, one far right |
|
296 | 296 | | | | | |
|
297 | 297 | o | | | changeset: 21:d42a756af44d |
|
298 | 298 | |\ \ \ \ parent: 19:31ddc2c1573b |
|
299 | 299 | | | | | | parent: 20:d30ed6450e32 |
|
300 | 300 | | | | | | user: test |
|
301 | 301 | | | | | | date: Thu Jan 01 00:00:21 1970 +0000 |
|
302 | 302 | | | | | | summary: (21) expand |
|
303 | 303 | | | | | | |
|
304 | 304 | | o---+-+ changeset: 20:d30ed6450e32 |
|
305 | 305 | | | | | parent: 0:e6eb3150255d |
|
306 | 306 | | / / / parent: 18:1aa84d96232a |
|
307 | 307 | | | | | user: test |
|
308 | 308 | | | | | date: Thu Jan 01 00:00:20 1970 +0000 |
|
309 | 309 | | | | | summary: (20) merge two known; two far right |
|
310 | 310 | | | | | |
|
311 | 311 | o | | | changeset: 19:31ddc2c1573b |
|
312 | 312 | |\ \ \ \ parent: 15:1dda3f72782d |
|
313 | 313 | | | | | | parent: 17:44765d7c06e0 |
|
314 | 314 | | | | | | user: test |
|
315 | 315 | | | | | | date: Thu Jan 01 00:00:19 1970 +0000 |
|
316 | 316 | | | | | | summary: (19) expand |
|
317 | 317 | | | | | | |
|
318 | 318 | +---+---o changeset: 18:1aa84d96232a |
|
319 | 319 | | | | | parent: 1:6db2ef61d156 |
|
320 | 320 | | | | | parent: 15:1dda3f72782d |
|
321 | 321 | | | | | user: test |
|
322 | 322 | | | | | date: Thu Jan 01 00:00:18 1970 +0000 |
|
323 | 323 | | | | | summary: (18) merge two known; two far left |
|
324 | 324 | | | | | |
|
325 | 325 | | o | | changeset: 17:44765d7c06e0 |
|
326 | 326 | | |\ \ \ parent: 12:86b91144a6e9 |
|
327 | 327 | | | | | | parent: 16:3677d192927d |
|
328 | 328 | | | | | | user: test |
|
329 | 329 | | | | | | date: Thu Jan 01 00:00:17 1970 +0000 |
|
330 | 330 | | | | | | summary: (17) expand |
|
331 | 331 | | | | | | |
|
332 | 332 | | | o---+ changeset: 16:3677d192927d |
|
333 | 333 | | | | | | parent: 0:e6eb3150255d |
|
334 | 334 | | | |/ / parent: 1:6db2ef61d156 |
|
335 | 335 | | | | | user: test |
|
336 | 336 | | | | | date: Thu Jan 01 00:00:16 1970 +0000 |
|
337 | 337 | | | | | summary: (16) merge two known; one immediate right, one near right |
|
338 | 338 | | | | | |
|
339 | 339 | o | | | changeset: 15:1dda3f72782d |
|
340 | 340 | |\ \ \ \ parent: 13:22d8966a97e3 |
|
341 | 341 | | | | | | parent: 14:8eac370358ef |
|
342 | 342 | | | | | | user: test |
|
343 | 343 | | | | | | date: Thu Jan 01 00:00:15 1970 +0000 |
|
344 | 344 | | | | | | summary: (15) expand |
|
345 | 345 | | | | | | |
|
346 | 346 | | o-----+ changeset: 14:8eac370358ef |
|
347 | 347 | | | | | | parent: 0:e6eb3150255d |
|
348 | 348 | | |/ / / parent: 12:86b91144a6e9 |
|
349 | 349 | | | | | user: test |
|
350 | 350 | | | | | date: Thu Jan 01 00:00:14 1970 +0000 |
|
351 | 351 | | | | | summary: (14) merge two known; one immediate right, one far right |
|
352 | 352 | | | | | |
|
353 | 353 | o | | | changeset: 13:22d8966a97e3 |
|
354 | 354 | |\ \ \ \ parent: 9:7010c0af0a35 |
|
355 | 355 | | | | | | parent: 11:832d76e6bdf2 |
|
356 | 356 | | | | | | user: test |
|
357 | 357 | | | | | | date: Thu Jan 01 00:00:13 1970 +0000 |
|
358 | 358 | | | | | | summary: (13) expand |
|
359 | 359 | | | | | | |
|
360 | 360 | +---o | | changeset: 12:86b91144a6e9 |
|
361 | 361 | | | |/ / parent: 1:6db2ef61d156 |
|
362 | 362 | | | | | parent: 9:7010c0af0a35 |
|
363 | 363 | | | | | user: test |
|
364 | 364 | | | | | date: Thu Jan 01 00:00:12 1970 +0000 |
|
365 | 365 | | | | | summary: (12) merge two known; one immediate right, one far left |
|
366 | 366 | | | | | |
|
367 | 367 | | o | | changeset: 11:832d76e6bdf2 |
|
368 | 368 | | |\ \ \ parent: 6:b105a072e251 |
|
369 | 369 | | | | | | parent: 10:74c64d036d72 |
|
370 | 370 | | | | | | user: test |
|
371 | 371 | | | | | | date: Thu Jan 01 00:00:11 1970 +0000 |
|
372 | 372 | | | | | | summary: (11) expand |
|
373 | 373 | | | | | | |
|
374 | 374 | | | o---+ changeset: 10:74c64d036d72 |
|
375 | 375 | | | | | | parent: 0:e6eb3150255d |
|
376 | 376 | | |/ / / parent: 6:b105a072e251 |
|
377 | 377 | | | | | user: test |
|
378 | 378 | | | | | date: Thu Jan 01 00:00:10 1970 +0000 |
|
379 | 379 | | | | | summary: (10) merge two known; one immediate left, one near right |
|
380 | 380 | | | | | |
|
381 | 381 | o | | | changeset: 9:7010c0af0a35 |
|
382 | 382 | |\ \ \ \ parent: 7:b632bb1b1224 |
|
383 | 383 | | | | | | parent: 8:7a0b11f71937 |
|
384 | 384 | | | | | | user: test |
|
385 | 385 | | | | | | date: Thu Jan 01 00:00:09 1970 +0000 |
|
386 | 386 | | | | | | summary: (9) expand |
|
387 | 387 | | | | | | |
|
388 | 388 | | o-----+ changeset: 8:7a0b11f71937 |
|
389 | 389 | | | | | | parent: 0:e6eb3150255d |
|
390 | 390 | |/ / / / parent: 7:b632bb1b1224 |
|
391 | 391 | | | | | user: test |
|
392 | 392 | | | | | date: Thu Jan 01 00:00:08 1970 +0000 |
|
393 | 393 | | | | | summary: (8) merge two known; one immediate left, one far right |
|
394 | 394 | | | | | |
|
395 | 395 | o | | | changeset: 7:b632bb1b1224 |
|
396 | 396 | |\ \ \ \ parent: 2:3d9a33b8d1e1 |
|
397 | 397 | | | | | | parent: 5:4409d547b708 |
|
398 | 398 | | | | | | user: test |
|
399 | 399 | | | | | | date: Thu Jan 01 00:00:07 1970 +0000 |
|
400 | 400 | | | | | | summary: (7) expand |
|
401 | 401 | | | | | | |
|
402 | 402 | +---o | | changeset: 6:b105a072e251 |
|
403 | 403 | | |/ / / parent: 2:3d9a33b8d1e1 |
|
404 | 404 | | | | | parent: 5:4409d547b708 |
|
405 | 405 | | | | | user: test |
|
406 | 406 | | | | | date: Thu Jan 01 00:00:06 1970 +0000 |
|
407 | 407 | | | | | summary: (6) merge two known; one immediate left, one far left |
|
408 | 408 | | | | | |
|
409 | 409 | | o | | changeset: 5:4409d547b708 |
|
410 | 410 | | |\ \ \ parent: 3:27eef8ed80b4 |
|
411 | 411 | | | | | | parent: 4:26a8bac39d9f |
|
412 | 412 | | | | | | user: test |
|
413 | 413 | | | | | | date: Thu Jan 01 00:00:05 1970 +0000 |
|
414 | 414 | | | | | | summary: (5) expand |
|
415 | 415 | | | | | | |
|
416 | 416 | | | o | | changeset: 4:26a8bac39d9f |
|
417 | 417 | | |/|/ / parent: 1:6db2ef61d156 |
|
418 | 418 | | | | | parent: 3:27eef8ed80b4 |
|
419 | 419 | | | | | user: test |
|
420 | 420 | | | | | date: Thu Jan 01 00:00:04 1970 +0000 |
|
421 | 421 | | | | | summary: (4) merge two known; one immediate left, one immediate right |
|
422 | 422 | | | | | |
|
423 | 423 | | o | | changeset: 3:27eef8ed80b4 |
|
424 | 424 | |/ / / user: test |
|
425 | 425 | | | | date: Thu Jan 01 00:00:03 1970 +0000 |
|
426 | 426 | | | | summary: (3) collapse |
|
427 | 427 | | | | |
|
428 | 428 | o | | changeset: 2:3d9a33b8d1e1 |
|
429 | 429 | |/ / user: test |
|
430 | 430 | | | date: Thu Jan 01 00:00:02 1970 +0000 |
|
431 | 431 | | | summary: (2) collapse |
|
432 | 432 | | | |
|
433 | 433 | o | changeset: 1:6db2ef61d156 |
|
434 | 434 | |/ user: test |
|
435 | 435 | | date: Thu Jan 01 00:00:01 1970 +0000 |
|
436 | 436 | | summary: (1) collapse |
|
437 | 437 | | |
|
438 | 438 | o changeset: 0:e6eb3150255d |
|
439 | 439 | user: test |
|
440 | 440 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
441 | 441 | summary: (0) root |
|
442 | 442 | |
|
443 | 443 | |
|
444 | 444 | File glog: |
|
445 | 445 | $ hg glog a |
|
446 | 446 | @ changeset: 34:fea3ac5810e0 |
|
447 | 447 | | tag: tip |
|
448 | 448 | | parent: 32:d06dffa21a31 |
|
449 | 449 | | user: test |
|
450 | 450 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
451 | 451 | | summary: (34) head |
|
452 | 452 | | |
|
453 | 453 | | o changeset: 33:68608f5145f9 |
|
454 | 454 | | | parent: 18:1aa84d96232a |
|
455 | 455 | | | user: test |
|
456 | 456 | | | date: Thu Jan 01 00:00:33 1970 +0000 |
|
457 | 457 | | | summary: (33) head |
|
458 | 458 | | | |
|
459 | 459 | o | changeset: 32:d06dffa21a31 |
|
460 | 460 | |\ \ parent: 27:886ed638191b |
|
461 | 461 | | | | parent: 31:621d83e11f67 |
|
462 | 462 | | | | user: test |
|
463 | 463 | | | | date: Thu Jan 01 00:00:32 1970 +0000 |
|
464 | 464 | | | | summary: (32) expand |
|
465 | 465 | | | | |
|
466 | 466 | | o | changeset: 31:621d83e11f67 |
|
467 | 467 | | | | parent: 21:d42a756af44d |
|
468 | 468 | | | | parent: 30:6e11cd4b648f |
|
469 | 469 | | | | user: test |
|
470 | 470 | | | | date: Thu Jan 01 00:00:31 1970 +0000 |
|
471 | 471 | | | | summary: (31) expand |
|
472 | 472 | | | | |
|
473 | 473 | | o | changeset: 30:6e11cd4b648f |
|
474 | 474 | | |\ \ parent: 28:44ecd0b9ae99 |
|
475 | 475 | | | | | parent: 29:cd9bb2be7593 |
|
476 | 476 | | | | | user: test |
|
477 | 477 | | | | | date: Thu Jan 01 00:00:30 1970 +0000 |
|
478 | 478 | | | | | summary: (30) expand |
|
479 | 479 | | | | | |
|
480 | 480 | | | o | changeset: 29:cd9bb2be7593 |
|
481 | 481 | | | | | parent: 0:e6eb3150255d |
|
482 | 482 | | | | | user: test |
|
483 | 483 | | | | | date: Thu Jan 01 00:00:29 1970 +0000 |
|
484 | 484 | | | | | summary: (29) regular commit |
|
485 | 485 | | | | | |
|
486 | 486 | | o | | changeset: 28:44ecd0b9ae99 |
|
487 | 487 | | | | | parent: 1:6db2ef61d156 |
|
488 | 488 | | | | | parent: 26:7f25b6c2f0b9 |
|
489 | 489 | | | | | user: test |
|
490 | 490 | | | | | date: Thu Jan 01 00:00:28 1970 +0000 |
|
491 | 491 | | | | | summary: (28) merge zero known |
|
492 | 492 | | | | | |
|
493 | 493 | o | | | changeset: 27:886ed638191b |
|
494 | 494 | | | | | parent: 21:d42a756af44d |
|
495 | 495 | | | | | user: test |
|
496 | 496 | | | | | date: Thu Jan 01 00:00:27 1970 +0000 |
|
497 | 497 | | | | | summary: (27) collapse |
|
498 | 498 | | | | | |
|
499 | 499 | | o | | changeset: 26:7f25b6c2f0b9 |
|
500 | 500 | | | | | parent: 18:1aa84d96232a |
|
501 | 501 | | | | | parent: 25:91da8ed57247 |
|
502 | 502 | | | | | user: test |
|
503 | 503 | | | | | date: Thu Jan 01 00:00:26 1970 +0000 |
|
504 | 504 | | | | | summary: (26) merge one known; far right |
|
505 | 505 | | | | | |
|
506 | 506 | | o | | changeset: 25:91da8ed57247 |
|
507 | 507 | | | | | parent: 21:d42a756af44d |
|
508 | 508 | | | | | parent: 24:a9c19a3d96b7 |
|
509 | 509 | | | | | user: test |
|
510 | 510 | | | | | date: Thu Jan 01 00:00:25 1970 +0000 |
|
511 | 511 | | | | | summary: (25) merge one known; far left |
|
512 | 512 | | | | | |
|
513 | 513 | | o | | changeset: 24:a9c19a3d96b7 |
|
514 | 514 | | | | | parent: 0:e6eb3150255d |
|
515 | 515 | | | | | parent: 23:a01cddf0766d |
|
516 | 516 | | | | | user: test |
|
517 | 517 | | | | | date: Thu Jan 01 00:00:24 1970 +0000 |
|
518 | 518 | | | | | summary: (24) merge one known; immediate right |
|
519 | 519 | | | | | |
|
520 | 520 | | o | | changeset: 23:a01cddf0766d |
|
521 | 521 | | | | | parent: 1:6db2ef61d156 |
|
522 | 522 | | | | | parent: 22:e0d9cccacb5d |
|
523 | 523 | | | | | user: test |
|
524 | 524 | | | | | date: Thu Jan 01 00:00:23 1970 +0000 |
|
525 | 525 | | | | | summary: (23) merge one known; immediate left |
|
526 | 526 | | | | | |
|
527 | 527 | | o | | changeset: 22:e0d9cccacb5d |
|
528 | 528 | |/ / / parent: 18:1aa84d96232a |
|
529 | 529 | | | | parent: 21:d42a756af44d |
|
530 | 530 | | | | user: test |
|
531 | 531 | | | | date: Thu Jan 01 00:00:22 1970 +0000 |
|
532 | 532 | | | | summary: (22) merge two known; one far left, one far right |
|
533 | 533 | | | | |
|
534 | 534 | o | | changeset: 21:d42a756af44d |
|
535 | 535 | |\ \ \ parent: 19:31ddc2c1573b |
|
536 | 536 | | | | | parent: 20:d30ed6450e32 |
|
537 | 537 | | | | | user: test |
|
538 | 538 | | | | | date: Thu Jan 01 00:00:21 1970 +0000 |
|
539 | 539 | | | | | summary: (21) expand |
|
540 | 540 | | | | | |
|
541 | 541 | | o---+ changeset: 20:d30ed6450e32 |
|
542 | 542 | | | | parent: 0:e6eb3150255d |
|
543 | 543 | | / / parent: 18:1aa84d96232a |
|
544 | 544 | | | | user: test |
|
545 | 545 | | | | date: Thu Jan 01 00:00:20 1970 +0000 |
|
546 | 546 | | | | summary: (20) merge two known; two far right |
|
547 | 547 | | | | |
|
548 | 548 | o | | changeset: 19:31ddc2c1573b |
|
549 | 549 | |\ \ \ parent: 15:1dda3f72782d |
|
550 | 550 | | | | | parent: 17:44765d7c06e0 |
|
551 | 551 | | | | | user: test |
|
552 | 552 | | | | | date: Thu Jan 01 00:00:19 1970 +0000 |
|
553 | 553 | | | | | summary: (19) expand |
|
554 | 554 | | | | | |
|
555 | 555 | +-----o changeset: 18:1aa84d96232a |
|
556 | 556 | | | | parent: 1:6db2ef61d156 |
|
557 | 557 | | | | parent: 15:1dda3f72782d |
|
558 | 558 | | | | user: test |
|
559 | 559 | | | | date: Thu Jan 01 00:00:18 1970 +0000 |
|
560 | 560 | | | | summary: (18) merge two known; two far left |
|
561 | 561 | | | | |
|
562 | 562 | | o | changeset: 17:44765d7c06e0 |
|
563 | 563 | | |\ \ parent: 12:86b91144a6e9 |
|
564 | 564 | | | | | parent: 16:3677d192927d |
|
565 | 565 | | | | | user: test |
|
566 | 566 | | | | | date: Thu Jan 01 00:00:17 1970 +0000 |
|
567 | 567 | | | | | summary: (17) expand |
|
568 | 568 | | | | | |
|
569 | 569 | | | o | changeset: 16:3677d192927d |
|
570 | 570 | | | | | parent: 0:e6eb3150255d |
|
571 | 571 | | | | | parent: 1:6db2ef61d156 |
|
572 | 572 | | | | | user: test |
|
573 | 573 | | | | | date: Thu Jan 01 00:00:16 1970 +0000 |
|
574 | 574 | | | | | summary: (16) merge two known; one immediate right, one near right |
|
575 | 575 | | | | | |
|
576 | 576 | o | | | changeset: 15:1dda3f72782d |
|
577 | 577 | |\ \ \ \ parent: 13:22d8966a97e3 |
|
578 | 578 | | | | | | parent: 14:8eac370358ef |
|
579 | 579 | | | | | | user: test |
|
580 | 580 | | | | | | date: Thu Jan 01 00:00:15 1970 +0000 |
|
581 | 581 | | | | | | summary: (15) expand |
|
582 | 582 | | | | | | |
|
583 | 583 | | o | | | changeset: 14:8eac370358ef |
|
584 | 584 | | |/ / / parent: 0:e6eb3150255d |
|
585 | 585 | | | | | parent: 12:86b91144a6e9 |
|
586 | 586 | | | | | user: test |
|
587 | 587 | | | | | date: Thu Jan 01 00:00:14 1970 +0000 |
|
588 | 588 | | | | | summary: (14) merge two known; one immediate right, one far right |
|
589 | 589 | | | | | |
|
590 | 590 | o | | | changeset: 13:22d8966a97e3 |
|
591 | 591 | |\ \ \ \ parent: 9:7010c0af0a35 |
|
592 | 592 | | | | | | parent: 11:832d76e6bdf2 |
|
593 | 593 | | | | | | user: test |
|
594 | 594 | | | | | | date: Thu Jan 01 00:00:13 1970 +0000 |
|
595 | 595 | | | | | | summary: (13) expand |
|
596 | 596 | | | | | | |
|
597 | 597 | +---o | | changeset: 12:86b91144a6e9 |
|
598 | 598 | | | / / parent: 1:6db2ef61d156 |
|
599 | 599 | | | | | parent: 9:7010c0af0a35 |
|
600 | 600 | | | | | user: test |
|
601 | 601 | | | | | date: Thu Jan 01 00:00:12 1970 +0000 |
|
602 | 602 | | | | | summary: (12) merge two known; one immediate right, one far left |
|
603 | 603 | | | | | |
|
604 | 604 | | o | | changeset: 11:832d76e6bdf2 |
|
605 | 605 | | | | | parent: 6:b105a072e251 |
|
606 | 606 | | | | | parent: 10:74c64d036d72 |
|
607 | 607 | | | | | user: test |
|
608 | 608 | | | | | date: Thu Jan 01 00:00:11 1970 +0000 |
|
609 | 609 | | | | | summary: (11) expand |
|
610 | 610 | | | | | |
|
611 | 611 | | o | | changeset: 10:74c64d036d72 |
|
612 | 612 | | | | | parent: 0:e6eb3150255d |
|
613 | 613 | | | | | parent: 6:b105a072e251 |
|
614 | 614 | | | | | user: test |
|
615 | 615 | | | | | date: Thu Jan 01 00:00:10 1970 +0000 |
|
616 | 616 | | | | | summary: (10) merge two known; one immediate left, one near right |
|
617 | 617 | | | | | |
|
618 | 618 | o | | | changeset: 9:7010c0af0a35 |
|
619 | 619 | | | | | parent: 7:b632bb1b1224 |
|
620 | 620 | | | | | parent: 8:7a0b11f71937 |
|
621 | 621 | | | | | user: test |
|
622 | 622 | | | | | date: Thu Jan 01 00:00:09 1970 +0000 |
|
623 | 623 | | | | | summary: (9) expand |
|
624 | 624 | | | | | |
|
625 | 625 | o | | | changeset: 8:7a0b11f71937 |
|
626 | 626 | | | | | parent: 0:e6eb3150255d |
|
627 | 627 | | | | | parent: 7:b632bb1b1224 |
|
628 | 628 | | | | | user: test |
|
629 | 629 | | | | | date: Thu Jan 01 00:00:08 1970 +0000 |
|
630 | 630 | | | | | summary: (8) merge two known; one immediate left, one far right |
|
631 | 631 | | | | | |
|
632 | 632 | o | | | changeset: 7:b632bb1b1224 |
|
633 | 633 | | | | | parent: 2:3d9a33b8d1e1 |
|
634 | 634 | | | | | parent: 5:4409d547b708 |
|
635 | 635 | | | | | user: test |
|
636 | 636 | | | | | date: Thu Jan 01 00:00:07 1970 +0000 |
|
637 | 637 | | | | | summary: (7) expand |
|
638 | 638 | | | | | |
|
639 | 639 | | o | | changeset: 6:b105a072e251 |
|
640 | 640 | |/ / / parent: 2:3d9a33b8d1e1 |
|
641 | 641 | | | | parent: 5:4409d547b708 |
|
642 | 642 | | | | user: test |
|
643 | 643 | | | | date: Thu Jan 01 00:00:06 1970 +0000 |
|
644 | 644 | | | | summary: (6) merge two known; one immediate left, one far left |
|
645 | 645 | | | | |
|
646 | 646 | o | | changeset: 5:4409d547b708 |
|
647 | 647 | | | | parent: 3:27eef8ed80b4 |
|
648 | 648 | | | | parent: 4:26a8bac39d9f |
|
649 | 649 | | | | user: test |
|
650 | 650 | | | | date: Thu Jan 01 00:00:05 1970 +0000 |
|
651 | 651 | | | | summary: (5) expand |
|
652 | 652 | | | | |
|
653 | 653 | o | | changeset: 4:26a8bac39d9f |
|
654 | 654 | | | | parent: 1:6db2ef61d156 |
|
655 | 655 | | | | parent: 3:27eef8ed80b4 |
|
656 | 656 | | | | user: test |
|
657 | 657 | | | | date: Thu Jan 01 00:00:04 1970 +0000 |
|
658 | 658 | | | | summary: (4) merge two known; one immediate left, one immediate right |
|
659 | 659 | | | | |
|
660 | 660 | o | | changeset: 3:27eef8ed80b4 |
|
661 | 661 | | | | user: test |
|
662 | 662 | | | | date: Thu Jan 01 00:00:03 1970 +0000 |
|
663 | 663 | | | | summary: (3) collapse |
|
664 | 664 | | | | |
|
665 | 665 | o | | changeset: 2:3d9a33b8d1e1 |
|
666 | 666 | |/ / user: test |
|
667 | 667 | | | date: Thu Jan 01 00:00:02 1970 +0000 |
|
668 | 668 | | | summary: (2) collapse |
|
669 | 669 | | | |
|
670 | 670 | o | changeset: 1:6db2ef61d156 |
|
671 | 671 | |/ user: test |
|
672 | 672 | | date: Thu Jan 01 00:00:01 1970 +0000 |
|
673 | 673 | | summary: (1) collapse |
|
674 | 674 | | |
|
675 | 675 | o changeset: 0:e6eb3150255d |
|
676 | 676 | user: test |
|
677 | 677 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
678 | 678 | summary: (0) root |
|
679 | 679 | |
|
680 | 680 | |
|
681 | 681 | Unused arguments: |
|
682 | 682 | $ hg glog -q foo bar |
|
683 | 683 | hg glog: invalid arguments |
|
684 | 684 | hg glog [OPTION]... [FILE] |
|
685 | 685 | |
|
686 | 686 | show revision history alongside an ASCII revision graph |
|
687 | 687 | [255] |
|
688 | 688 | |
|
689 | 689 | Empty revision range - display nothing: |
|
690 | 690 | $ hg glog -r 1..0 |
|
691 | 691 | |
|
692 | 692 | From outer space: |
|
693 | 693 | $ cd .. |
|
694 | 694 | $ hg glog -l1 repo |
|
695 | 695 | @ changeset: 34:fea3ac5810e0 |
|
696 | 696 | | tag: tip |
|
697 | 697 | | parent: 32:d06dffa21a31 |
|
698 | 698 | | user: test |
|
699 | 699 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
700 | 700 | | summary: (34) head |
|
701 | 701 | | |
|
702 | 702 | $ hg glog -l1 repo/a |
|
703 | 703 | @ changeset: 34:fea3ac5810e0 |
|
704 | 704 | | tag: tip |
|
705 | 705 | | parent: 32:d06dffa21a31 |
|
706 | 706 | | user: test |
|
707 | 707 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
708 | 708 | | summary: (34) head |
|
709 | 709 | | |
|
710 | 710 | $ hg glog -l1 repo/missing |
|
711 | 711 | |
|
712 | 712 | File log with revs != cset revs: |
|
713 | 713 | $ hg init flog |
|
714 | 714 | $ cd flog |
|
715 | 715 | $ echo one >one |
|
716 | 716 | $ hg add one |
|
717 | 717 | $ hg commit -mone |
|
718 | 718 | $ echo two >two |
|
719 | 719 | $ hg add two |
|
720 | 720 | $ hg commit -mtwo |
|
721 | 721 | $ echo more >two |
|
722 | 722 | $ hg commit -mmore |
|
723 | 723 | $ hg glog two |
|
724 | 724 | @ changeset: 2:12c28321755b |
|
725 | 725 | | tag: tip |
|
726 | 726 | | user: test |
|
727 | 727 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
728 | 728 | | summary: more |
|
729 | 729 | | |
|
730 | 730 | o changeset: 1:5ac72c0599bf |
|
731 | 731 | user: test |
|
732 | 732 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
733 | 733 | summary: two |
|
734 | 734 | |
|
735 | 735 | |
|
736 | 736 | Issue1896: File log with explicit style |
|
737 | 737 | $ hg glog --style=default one |
|
738 | 738 | o changeset: 0:3d578b4a1f53 |
|
739 | 739 | user: test |
|
740 | 740 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
741 | 741 | summary: one |
|
742 | 742 | |
|
743 | Issue2395: glog --style header and footer | |
|
744 | $ hg glog --style=xml one | |
|
745 | <?xml version="1.0"?> | |
|
746 | <log> | |
|
747 | o <logentry revision="0" node="3d578b4a1f537d5fcf7301bfa9c0b97adfaa6fb1"> | |
|
748 | <author email="test">test</author> | |
|
749 | <date>1970-01-01T00:00:00+00:00</date> | |
|
750 | <msg xml:space="preserve">one</msg> | |
|
751 | </logentry> | |
|
752 | </log> | |
|
753 | ||
|
743 | 754 | $ cd .. |
|
744 | 755 | |
|
745 | 756 | Incoming and outgoing: |
|
746 | 757 | |
|
747 | 758 | $ hg clone -U -r31 repo repo2 |
|
748 | 759 | requesting all changes |
|
749 | 760 | adding changesets |
|
750 | 761 | adding manifests |
|
751 | 762 | adding file changes |
|
752 | 763 | added 31 changesets with 31 changes to 1 files |
|
753 | 764 | $ cd repo2 |
|
754 | 765 | |
|
755 | 766 | $ hg incoming --graph ../repo |
|
756 | 767 | comparing with ../repo |
|
757 | 768 | searching for changes |
|
758 | 769 | o changeset: 34:fea3ac5810e0 |
|
759 | 770 | | tag: tip |
|
760 | 771 | | parent: 32:d06dffa21a31 |
|
761 | 772 | | user: test |
|
762 | 773 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
763 | 774 | | summary: (34) head |
|
764 | 775 | | |
|
765 | 776 | | o changeset: 33:68608f5145f9 |
|
766 | 777 | | parent: 18:1aa84d96232a |
|
767 | 778 | | user: test |
|
768 | 779 | | date: Thu Jan 01 00:00:33 1970 +0000 |
|
769 | 780 | | summary: (33) head |
|
770 | 781 | | |
|
771 | 782 | o changeset: 32:d06dffa21a31 |
|
772 | 783 | | parent: 27:886ed638191b |
|
773 | 784 | | parent: 31:621d83e11f67 |
|
774 | 785 | | user: test |
|
775 | 786 | | date: Thu Jan 01 00:00:32 1970 +0000 |
|
776 | 787 | | summary: (32) expand |
|
777 | 788 | | |
|
778 | 789 | o changeset: 27:886ed638191b |
|
779 | 790 | parent: 21:d42a756af44d |
|
780 | 791 | user: test |
|
781 | 792 | date: Thu Jan 01 00:00:27 1970 +0000 |
|
782 | 793 | summary: (27) collapse |
|
783 | 794 | |
|
784 | 795 | $ cd .. |
|
785 | 796 | |
|
786 | 797 | $ hg -R repo outgoing --graph repo2 |
|
787 | 798 | comparing with repo2 |
|
788 | 799 | searching for changes |
|
789 | 800 | @ changeset: 34:fea3ac5810e0 |
|
790 | 801 | | tag: tip |
|
791 | 802 | | parent: 32:d06dffa21a31 |
|
792 | 803 | | user: test |
|
793 | 804 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
794 | 805 | | summary: (34) head |
|
795 | 806 | | |
|
796 | 807 | | o changeset: 33:68608f5145f9 |
|
797 | 808 | | parent: 18:1aa84d96232a |
|
798 | 809 | | user: test |
|
799 | 810 | | date: Thu Jan 01 00:00:33 1970 +0000 |
|
800 | 811 | | summary: (33) head |
|
801 | 812 | | |
|
802 | 813 | o changeset: 32:d06dffa21a31 |
|
803 | 814 | | parent: 27:886ed638191b |
|
804 | 815 | | parent: 31:621d83e11f67 |
|
805 | 816 | | user: test |
|
806 | 817 | | date: Thu Jan 01 00:00:32 1970 +0000 |
|
807 | 818 | | summary: (32) expand |
|
808 | 819 | | |
|
809 | 820 | o changeset: 27:886ed638191b |
|
810 | 821 | parent: 21:d42a756af44d |
|
811 | 822 | user: test |
|
812 | 823 | date: Thu Jan 01 00:00:27 1970 +0000 |
|
813 | 824 | summary: (27) collapse |
|
814 | 825 | |
|
815 | 826 | |
|
816 | 827 | File + limit with revs != cset revs: |
|
817 | 828 | $ cd repo |
|
818 | 829 | $ touch b |
|
819 | 830 | $ hg ci -Aqm0 |
|
820 | 831 | $ hg glog -l2 a |
|
821 | 832 | o changeset: 34:fea3ac5810e0 |
|
822 | 833 | | parent: 32:d06dffa21a31 |
|
823 | 834 | | user: test |
|
824 | 835 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
825 | 836 | | summary: (34) head |
|
826 | 837 | | |
|
827 | 838 | | o changeset: 33:68608f5145f9 |
|
828 | 839 | | | parent: 18:1aa84d96232a |
|
829 | 840 | | | user: test |
|
830 | 841 | | | date: Thu Jan 01 00:00:33 1970 +0000 |
|
831 | 842 | | | summary: (33) head |
|
832 | 843 | | | |
|
833 | 844 | |
|
834 | 845 | File + limit + -ra:b, (b - a) < limit: |
|
835 | 846 | $ hg glog -l3000 -r32:tip a |
|
836 | 847 | o changeset: 34:fea3ac5810e0 |
|
837 | 848 | | parent: 32:d06dffa21a31 |
|
838 | 849 | | user: test |
|
839 | 850 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
840 | 851 | | summary: (34) head |
|
841 | 852 | | |
|
842 | 853 | | o changeset: 33:68608f5145f9 |
|
843 | 854 | | | parent: 18:1aa84d96232a |
|
844 | 855 | | | user: test |
|
845 | 856 | | | date: Thu Jan 01 00:00:33 1970 +0000 |
|
846 | 857 | | | summary: (33) head |
|
847 | 858 | | | |
|
848 | 859 | o | changeset: 32:d06dffa21a31 |
|
849 | 860 | |\ \ parent: 27:886ed638191b |
|
850 | 861 | | | | parent: 31:621d83e11f67 |
|
851 | 862 | | | | user: test |
|
852 | 863 | | | | date: Thu Jan 01 00:00:32 1970 +0000 |
|
853 | 864 | | | | summary: (32) expand |
|
854 | 865 | | | | |
|
855 | 866 | |
|
856 | 867 | File + limit + -ra:b, b < tip: |
|
857 | 868 | $ hg glog -l1 -r32:34 a |
|
858 | 869 | o changeset: 34:fea3ac5810e0 |
|
859 | 870 | | parent: 32:d06dffa21a31 |
|
860 | 871 | | user: test |
|
861 | 872 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
862 | 873 | | summary: (34) head |
|
863 | 874 | | |
|
864 | 875 | |
|
865 | 876 | File + limit + -ra:b, b < tip, (b - a) < limit: |
|
866 | 877 | $ hg glog -l10 -r33:34 a |
|
867 | 878 | o changeset: 34:fea3ac5810e0 |
|
868 | 879 | | parent: 32:d06dffa21a31 |
|
869 | 880 | | user: test |
|
870 | 881 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
871 | 882 | | summary: (34) head |
|
872 | 883 | | |
|
873 | 884 | | o changeset: 33:68608f5145f9 |
|
874 | 885 | | | parent: 18:1aa84d96232a |
|
875 | 886 | | | user: test |
|
876 | 887 | | | date: Thu Jan 01 00:00:33 1970 +0000 |
|
877 | 888 | | | summary: (33) head |
|
878 | 889 | | | |
|
879 | 890 |
General Comments 0
You need to be logged in to leave comments.
Login now