/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: 2012-03-01 21:29:00 UTC
  • mto: This revision was merged to the branch mainline in revision 781.
  • Revision ID: jelmer@samba.org-20120301212900-de4j4ugoxi1sga1g
Properly handle popup menus when there is no selected revision in 'bzr viz'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
        else:
479
479
            parent_id = parents[0]
480
480
 
481
 
        self.show_diff(revision.revision_id, parent_id)
 
481
        if revision is not None:
 
482
            self.show_diff(revision.revision_id, parent_id)
 
483
        else:
 
484
            self.show_diff(NULL_REVISION)
482
485
        self.treeview.grab_focus()
483
486
 
484
487
    def _back_clicked_cb(self, *args):
654
657
            return width, height
655
658
        return None
656
659
 
657
 
    def show_diff(self, revid=None, parentid=NULL_REVISION):
 
660
    def show_diff(self, revid, parentid=NULL_REVISION):
658
661
        """Open a new window to show a diff between the given revisions."""
659
662
        from bzrlib.plugins.gtk.diff import DiffWindow
660
663
        window = DiffWindow(parent=self)