##// END OF EJS Templates
graphlog: rename some vars prior to refactoring
Peter Arrenbrecht -
r7324:3a2cbf68 default
parent child Browse files
Show More
@@ -225,10 +225,10 b' def graphlog(ui, repo, path=None, **opts'
225 prev_node_index = 0
225 prev_node_index = 0
226
226
227 for (rev, node, node_index, edges, n_columns, n_columns_diff) in grapher:
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 the graph
228 # node_lines is the list of all text lines to draw alongside the graph
229 ui.pushbuffer()
229 ui.pushbuffer()
230 cs_printer.show(rev, node)
230 cs_printer.show(rev, node)
231 log_strings = ui.popbuffer().split("\n")[:-1]
231 node_lines = ui.popbuffer().split("\n")[:-1]
232
232
233 if n_columns_diff == -1:
233 if n_columns_diff == -1:
234 # Transform
234 # Transform
@@ -246,7 +246,7 b' def graphlog(ui, repo, path=None, **opts'
246 # | / / | | | # <--- padding line
246 # | / / | | | # <--- padding line
247 # o | | | / /
247 # o | | | / /
248 # o | |
248 # o | |
249 add_padding_line = (len(log_strings) > 2 and
249 add_padding_line = (len(node_lines) > 2 and
250 n_columns_diff == -1 and
250 n_columns_diff == -1 and
251 [x for (x, y) in edges if x + 1 < y])
251 [x for (x, y) in edges if x + 1 < y])
252
252
@@ -257,7 +257,7 b' def graphlog(ui, repo, path=None, **opts'
257 # | o | | into | o / / # <--- fixed nodeline tail
257 # | o | | into | o / / # <--- fixed nodeline tail
258 # | |/ / | |/ /
258 # | |/ / | |/ /
259 # o | | o | |
259 # o | | o | |
260 fix_nodeline_tail = len(log_strings) <= 2 and not add_padding_line
260 fix_nodeline_tail = len(node_lines) <= 2 and not add_padding_line
261
261
262 # nodeline is the line containing the node character (typically o)
262 # nodeline is the line containing the node character (typically o)
263 nodeline = ["|", " "] * node_index
263 nodeline = ["|", " "] * node_index
@@ -298,16 +298,16 b' def graphlog(ui, repo, path=None, **opts'
298
298
299 # make sure that there are as many graph lines as there are
299 # make sure that there are as many graph lines as there are
300 # log strings
300 # log strings
301 while len(log_strings) < len(lines):
301 while len(node_lines) < len(lines):
302 log_strings.append("")
302 node_lines.append("")
303 if len(lines) < len(log_strings):
303 if len(lines) < len(node_lines):
304 extra_interline = ["|", " "] * (n_columns + n_columns_diff)
304 extra_interline = ["|", " "] * (n_columns + n_columns_diff)
305 while len(lines) < len(log_strings):
305 while len(lines) < len(node_lines):
306 lines.append(extra_interline)
306 lines.append(extra_interline)
307
307
308 # print lines
308 # print lines
309 indentation_level = max(n_columns, n_columns + n_columns_diff)
309 indentation_level = max(n_columns, n_columns + n_columns_diff)
310 for (line, logstr) in zip(lines, log_strings):
310 for (line, logstr) in zip(lines, node_lines):
311 ui.write(format_line(line, indentation_level, logstr))
311 ui.write(format_line(line, indentation_level, logstr))
312
312
313 # ... and start over
313 # ... and start over
General Comments 0
You need to be logged in to leave comments. Login now