/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-09 18:42:30 UTC
  • mto: (256.2.37 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070909184230-sez7vi5x386p349v
Remove line counting which was intended to be used to calculate the 
best order for branchs such that as few lines as possible cross. 
Maybe this can come back later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        else:
75
75
            branch_line = branch_lines[branch_id]
76
76
        branch_line["rev_indexes"].append(index)
 
77
        if index > branch_line["max_index"]:
 
78
            branch_line["max_index"] = index
77
79
        
78
80
        parents = graph_parents[revid]
79
81
        for parent_revid in parents:
92
94
    
93
95
    for branch_id in branch_ids:
94
96
        branch_line = branch_lines[branch_id]
95
 
        branch_line["inward_line_ends"] = []
96
 
        for rev_index in branch_line["rev_indexes"]:
97
 
            (sequence_number,
98
 
                 revid,
99
 
                 merge_depth,
100
 
                 revno_sequence,
101
 
                 end_of_merge) = merge_sorted_revisions[rev_index]
102
 
            for parent_revid in graph_parents[revid]:
103
 
                if parent_revid in revid_index:
104
 
                    parent_index = revid_index[parent_revid]
105
 
                    parent_merge_depth = merge_sorted_revisions[parent_index][2]
106
 
                    if parent_merge_depth < merge_depth:
107
 
                        branch_line["inward_line_ends"].append(parent_index)
108
 
                        if branch_line["max_index"] < parent_index:
109
 
                            branch_line["max_index"] =parent_index
110
 
            
111
 
            for child_revid in graph_children[revid]:
112
 
                if child_revid in revid_index:
113
 
                    child_index = revid_index[child_revid]
114
 
                    child_merge_depth = merge_sorted_revisions[child_index][2]
115
 
                    if child_merge_depth < merge_depth:
116
 
                        branch_line["inward_line_ends"].append(child_index)
 
97
        if len(branch_id) >= 2:
 
98
            branch_parent_revno = branch_id[0:-1]
 
99
            if branch_parent_revno in revno_index:
 
100
                branch_line["max_index"] = revno_index[branch_parent_revno]
117
101
        
118
102
        col_index = None
119
103
        start_col_index = 0