/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: Jelmer Vernooij
  • Date: 2009-04-10 01:35:07 UTC
  • Revision ID: jelmer@samba.org-20090410013507-ua401fzhnytf1a4c
Use NULL_REVISION rather than None.

Show diffs side-by-side

added added

removed removed

Lines of Context:
439
439
        parents  = self.treeview.get_parents()
440
440
 
441
441
        if len(parents) == 0:
442
 
            parent_id = None
 
442
            parent_id = NULL_REVISION
443
443
        else:
444
444
            parent_id = parents[0]
445
445
 
616
616
            value = '%sx%s' % (width, height)
617
617
            self.config.set_user_option(name, value)
618
618
 
619
 
    def show_diff(self, revid=None, parentid=None):
 
619
    def show_diff(self, revid=None, parentid=NULL_REVISION):
620
620
        """Open a new window to show a diff between the given revisions."""
621
621
        from bzrlib.plugins.gtk.diff import DiffWindow
622
622
        window = DiffWindow(parent=self)
623
623
 
624
 
        if parentid is None:
625
 
            parentid = NULL_REVISION
626
 
 
627
624
        rev_tree    = self.branch.repository.revision_tree(revid)
628
625
        parent_tree = self.branch.repository.revision_tree(parentid)
629
626
 
638
635
 
639
636
        if not revision: # default to selected row
640
637
            revision = self.treeview.get_revision()
641
 
        if (not revision) or (revision == NULL_REVISION):
 
638
        if revision == NULL_REVISION:
642
639
            return
643
640
 
644
641
        if not parents: # default to selected row's parents
645
642
            parents  = self.treeview.get_parents()
646
643
        if len(parents) == 0:
647
 
            parent_id = None
 
644
            parent_id = NULL_REVISION
648
645
        else:
649
646
            parent_id = parents[0]
650
647