/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/branchwin.py

  • Committer: Gary van der Merwe
  • Date: 2007-08-26 12:30:45 UTC
  • mto: (256.2.37 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070826123045-iogmcthus927bhsq
Refactor so that line graph is more contained.

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
                                   gobject.TYPE_PYOBJECT,
174
174
                                   gobject.TYPE_PYOBJECT,
175
175
                                   str, str, str)
176
 
        self.index = {}
177
176
        self.set_title(branch.nick + " - bzrk")
178
177
        gobject.idle_add(self.populate_model, start, maxnum)
179
178
 
180
179
    def populate_model(self, start, maxnum):
181
 
        revids = []
182
 
        for (index, revid) in enumerate(reversed( \
183
 
                self.branch.repository.get_ancestry(start))):
184
 
            if revid is not None:
185
 
                revids.append(revid)
186
 
                self.index[revid] = index
187
 
            if maxnum is not None and index > maxnum:
188
 
                break
189
 
        
190
 
        
191
 
        self.revisions = self.branch.repository.get_revisions(revids)
192
 
        revisionparents = self.branch.repository.get_graph().get_parents(revids)
193
 
        
 
180
        (linegraphdata, index, revisions) = linegraph(self.branch,
 
181
                                                      start,
 
182
                                                      maxnum)
 
183
        self.index = index
 
184
        self.revisions = revisions
194
185
        
195
186
        last_lines = []
196
187
        for (index,(revision, node, lines, parents, children)) in enumerate( \
197
 
                linegraph(self.revisions, revisionparents, self.index)):
 
188
                linegraphdata):
198
189
            # FIXME: at this point we should be able to show the graph order
199
190
            # and lines with no message or commit data - and then incrementally
200
191
            # fill the timestamp, committer etc data as desired.