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

  • Committer: Adrian Wilkins
  • Date: 2008-04-24 15:26:14 UTC
  • mto: This revision was merged to the branch mainline in revision 470.
  • Revision ID: adrian.wilkins@gmail.com-20080424152614-2rnnljbro6vzqvf7
Detect the reserved null: revision in appropriate places. 

This removes a huge shower of stack traces that get dumped to console when 
you look at the bottom of a log.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
class StatusDialog(gtk.Dialog):
26
26
    """ Display Status window and perform the needed actions. """
27
 
    def __init__(self, wt, wtpath):
 
27
    def __init__(self, wt, wtpath, revision=None):
28
28
        """ Initialize the Status window. """
29
29
        super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
30
30
        self.set_title("Working tree changes")
31
31
        self._create()
32
32
        self.wt = wt
33
33
        self.wtpath = wtpath
 
34
        
 
35
        if revision is None:
 
36
            revision = self.wt.branch.last_revision()
 
37
            
34
38
        # Set the old working tree
35
 
        self.old_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
 
39
        self.old_tree = self.wt.branch.repository.revision_tree(revision)
36
40
        # Generate status output
37
41
        self._generate_status()
38
42