22
22
gcommit GTK+ commit dialog.
23
23
gconflicts GTK+ conflicts.
24
24
gdiff Show differences in working tree in a GTK+ Window.
25
ghandle-patch Display and optionally merge a merge directive or patch.
25
26
ginit Initialise a new branch.
26
27
gmissing GTK+ missing revisions dialog.
27
28
gpreferences GTK+ preferences dialog.
305
307
window = GAnnotateWindow(all, plain)
306
308
window.connect("destroy", lambda w: gtk.main_quit())
307
window.set_title(path + " - gannotate")
308
309
config = GAnnotateConfig(window)
672
673
register_command(cmd_test_gtk)
676
class cmd_ghandle_patch(GTKCommand):
677
"""Display a patch or merge directive, possibly merging.
679
This is a helper, meant to be launched from other programs like browsers
680
or email clients. Since these programs often do not allow parameters to
681
be provided, a "handle-patch" script is included.
684
takes_args = ['path']
688
from bzrlib.plugins.gtk.diff import (DiffWindow,
689
MergeDirectiveWindow)
690
lines = open(path, 'rb').readlines()
691
lines = [l.replace('\r\n', '\n') for l in lines]
693
directive = merge_directive.MergeDirective.from_lines(lines)
694
except errors.NotAMergeDirective:
695
window = DiffWindow()
696
window.set_diff_text(path, lines)
698
window = MergeDirectiveWindow(directive, path)
699
window.set_diff_text(path, directive.patch.splitlines(True))
701
gtk = self.open_display()
702
window.connect("destroy", gtk.main_quit)
704
from dialog import error_dialog
705
error_dialog('Error', str(e))
710
register_command(cmd_ghandle_patch)
676
714
gettext.install('olive-gtk')