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

  • Committer: David Allouche
  • Date: 2006-05-08 12:36:08 UTC
  • mfrom: (37.1.3 trunk)
  • Revision ID: david.allouche@canonical.com-20060508123608-43014b1fbcc6ba23
[merge] lifeless graphing and performance improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
238
238
 
239
239
        return vbox
240
240
 
241
 
    def set_branch(self, branch, start, robust, accurate, maxnum):
 
241
    def set_branch(self, branch, start, robust, maxnum):
242
242
        """Set the branch and start position for this window.
243
243
 
244
244
        Creates a new TreeModel and populates it with information about
257
257
        index = 0
258
258
 
259
259
        last_lines = []
260
 
        (revids, self.revisions, colours, self.children, self.parent_ids) \
261
 
                 = distances(branch, start, robust, accurate, maxnum)
 
260
        (self.revisions, colours, self.children, self.parent_ids, merge_sorted) \
 
261
                 = distances(branch, start, robust, maxnum)
262
262
        for revision, node, lines in graph(
263
 
                revids, self.revisions, colours, self.parent_ids):
 
263
                self.revisions, colours, merge_sorted):
 
264
            # FIXME: at this point we should be able to show the graph order and
 
265
            # lines with no message or commit data - and then incrementally fill
 
266
            # the timestamp, committer etc data as desired.
264
267
            message = revision.message.split("\n")[0]
265
268
            if revision.committer is not None:
266
269
                timestamp = format_date(revision.timestamp, revision.timezone)
267
270
            else:
268
271
                timestamp = None
269
 
 
270
272
            self.model.append([ revision, node, last_lines, lines,
271
273
                                message, revision.committer, timestamp ])
272
274
            self.index[revision] = index
286
288
        self.fwd_button.set_sensitive(len(self.children[revision]) > 0)
287
289
 
288
290
        if revision.committer is not None:
289
 
            branchnick = ""
 
291
            branchnick = ""
290
292
            committer = revision.committer
291
293
            timestamp = format_date(revision.timestamp, revision.timezone)
292
294
            message = revision.message
293
 
            try:
294
 
                branchnick = revision.properties['branch-nick']
295
 
            except KeyError:
296
 
                pass
 
295
            try:
 
296
                branchnick = revision.properties['branch-nick']
 
297
            except KeyError:
 
298
                pass
297
299
 
298
300
        else:
299
301
            committer = ""
300
302
            timestamp = ""
301
303
            message = ""
302
 
            branchnick = ""
 
304
            branchnick = ""
303
305
 
304
306
        self.revid_label.set_text(revision.revision_id)
305
 
        self.branchnick_label.set_text(branchnick)
 
307
        self.branchnick_label.set_text(branchnick)
306
308
 
307
309
        self.committer_label.set_text(committer)
308
310
        self.timestamp_label.set_text(timestamp)