/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-20 18:04:49 UTC
  • mto: (256.2.54 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070920180449-ku5pz9088foodjin
Tweek order that branch lines are processed for more understandable results.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                          revno_sequence])
91
91
 
92
92
    branch_ids = branch_lines.keys()
93
 
    branch_ids.sort()
94
 
    #branch_ids.reverse()
 
93
    def branch_id_cmp(x, y):
 
94
        len_x = len(x)
 
95
        len_y = len(y)
 
96
        if len_x == len_y:
 
97
            return -cmp(x, y)
 
98
        return cmp(len_x, len_y)
 
99
        
 
100
    branch_ids.sort(branch_id_cmp)
95
101
    inter_branch_lines = {}
96
102
    all_lines = []
97
103