3
from bzrlib import errors, merge_directive
4
from bzrlib.plugin import load_plugins
5
from bzrlib.plugins.gtk.commands import open_display
12
print "Usage: handle-patch <path>"
19
from bzrlib.plugins.gtk.diff import (DiffController,
20
MergeDirectiveController)
22
lines = sys.stdin.readlines()
24
lines = open(path, 'rb').readlines()
25
lines = [l.replace('\r\n', '\n') for l in lines]
27
directive = merge_directive.MergeDirective.from_lines(lines)
28
except errors.NotAMergeDirective:
29
controller = DiffController(path, lines, allow_dirty=True)
31
controller = MergeDirectiveController(path, directive)
32
window = controller.window
35
window.connect("destroy", gtk.main_quit)
37
from bzrlib.plugins.gtk.dialog import error_dialog
38
error_dialog('Error', str(e))