/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to viz/linegraph.py

  • Committer: Gary van der Merwe
  • Date: 2007-09-22 15:01:53 UTC
  • mfrom: (256.4.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070922150153-zkqtq9gfj9d3pwrk
Merge viz changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
def linegraph(branch, start, maxnum):
15
15
    """Produce a directed graph of a bzr branch.
16
16
 
17
 
    Returns a list of tuples of (revid,
18
 
                                 node,
19
 
                                 lines,
20
 
                                 parents,
21
 
                                 children,
22
 
                                 revno_sequence).
 
17
    Returns a tuple of (line_graph, revid_index, columns_len) where
 
18
    * line_graph is a list of tuples of (revid,
 
19
                                         node,
 
20
                                         lines,
 
21
                                         parents,
 
22
                                         children,
 
23
                                         revno_sequence),
 
24
    * revid_index is a dict of each revision with the key being the revid, and
 
25
      the value the row index, and
 
26
    * columns_len is the number of columns need to draw the line graph.
 
27
    
23
28
 
24
29
    Node is a tuple of (column, colour) with column being a zero-indexed
25
30
    column number of the graph that this revision represents and colour
287
292
                 parent_color))
288
293
            
289
294
    
290
 
    return (linegraph, revid_index)
 
295
    return (linegraph, revid_index, len(columns))
291
296
 
292
297
def _branch_line_col_search_order(columns, parent_col_index):
293
298
    return range(parent_col_index, len(columns)) + \