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

  • Committer: Aaron Bentley
  • Date: 2008-01-15 05:34:43 UTC
  • Revision ID: aaron@aaronbentley.com-20080115053443-6iq8bgfwktkdzy2x
Add merge button when displaying merge directives

Show diffs side-by-side

added added

removed removed

Lines of Context:
678
678
    takes_args = ['path']
679
679
 
680
680
    def run(self, path):
681
 
        from bzrlib.plugins.gtk.diff import DiffWindow
682
 
        window = DiffWindow()
 
681
        from bzrlib.plugins.gtk.diff import DiffWindow, MergeDirectiveWindow
683
682
        lines = open(path, 'rb').readlines()
684
683
        try:
685
684
            directive = merge_directive.MergeDirective.from_lines(lines)
686
685
        except errors.NotAMergeDirective:
 
686
            window = DiffWindow()
687
687
            window.set_diff_text(path, lines)
688
688
        else:
 
689
            window = MergeDirectiveWindow()
689
690
            window.set_diff_text(path, directive.patch.splitlines(True))
690
691
        window.show()
691
692
        gtk = self.open_display()