/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-16 11:18:01 UTC
  • mto: (256.2.37 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070816111801-o1a22rjj6n7odyyy
Implement color selection

Show diffs side-by-side

added added

removed removed

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