Show More
@@ -225,8 +225,7 b' def graphlog(ui, repo, path=None, **opts' | |||
|
225 | 225 | prev_node_index = 0 |
|
226 | 226 | |
|
227 | 227 | for (rev, node, node_index, edges, n_columns, n_columns_diff) in grapher: |
|
228 | # log_strings is the list of all log strings to draw alongside | |
|
229 | # the graph. | |
|
228 | # log_strings is the list of all log strings to draw alongside the graph | |
|
230 | 229 | ui.pushbuffer() |
|
231 | 230 | cs_printer.show(rev, node) |
|
232 | 231 | log_strings = ui.popbuffer().split("\n")[:-1] |
@@ -260,7 +259,7 b' def graphlog(ui, repo, path=None, **opts' | |||
|
260 | 259 | # o | | o | | |
|
261 | 260 | fix_nodeline_tail = len(log_strings) <= 2 and not add_padding_line |
|
262 | 261 | |
|
263 |
# nodeline is the line containing the node character ( |
|
|
262 | # nodeline is the line containing the node character (typically o) | |
|
264 | 263 | nodeline = ["|", " "] * node_index |
|
265 | 264 | if node in repo_parents: |
|
266 | 265 | node_ch = "@" |
@@ -274,7 +273,7 b' def graphlog(ui, repo, path=None, **opts' | |||
|
274 | 273 | prev_n_columns_diff, fix_nodeline_tail)) |
|
275 | 274 | |
|
276 | 275 | # shift_interline is the line containing the non-vertical |
|
277 |
# edges between this entry and the next |
|
|
276 | # edges between this entry and the next | |
|
278 | 277 | shift_interline = ["|", " "] * node_index |
|
279 | 278 | if n_columns_diff == -1: |
|
280 | 279 | n_spaces = 1 |
@@ -288,17 +287,17 b' def graphlog(ui, repo, path=None, **opts' | |||
|
288 | 287 | shift_interline.extend(n_spaces * [" "]) |
|
289 | 288 | shift_interline.extend([edge_ch, " "] * (n_columns - node_index - 1)) |
|
290 | 289 | |
|
291 |
# |
|
|
290 | # draw edges from the current node to its parents | |
|
292 | 291 | draw_edges(edges, nodeline, shift_interline) |
|
293 | 292 | |
|
294 |
# lines is the list of all graph lines to print |
|
|
293 | # lines is the list of all graph lines to print | |
|
295 | 294 | lines = [nodeline] |
|
296 | 295 | if add_padding_line: |
|
297 | 296 | lines.append(get_padding_line(node_index, n_columns, edges)) |
|
298 | 297 | lines.append(shift_interline) |
|
299 | 298 | |
|
300 |
# |
|
|
301 |
# log strings |
|
|
299 | # make sure that there are as many graph lines as there are | |
|
300 | # log strings | |
|
302 | 301 | while len(log_strings) < len(lines): |
|
303 | 302 | log_strings.append("") |
|
304 | 303 | if len(lines) < len(log_strings): |
@@ -306,12 +305,12 b' def graphlog(ui, repo, path=None, **opts' | |||
|
306 | 305 | while len(lines) < len(log_strings): |
|
307 | 306 | lines.append(extra_interline) |
|
308 | 307 | |
|
309 |
# |
|
|
308 | # print lines | |
|
310 | 309 | indentation_level = max(n_columns, n_columns + n_columns_diff) |
|
311 | 310 | for (line, logstr) in zip(lines, log_strings): |
|
312 | 311 | ui.write(format_line(line, indentation_level, logstr)) |
|
313 | 312 | |
|
314 |
# ...and start over |
|
|
313 | # ... and start over | |
|
315 | 314 | prev_node_index = node_index |
|
316 | 315 | prev_n_columns_diff = n_columns_diff |
|
317 | 316 |
General Comments 0
You need to be logged in to leave comments.
Login now