Exemple #1
0
 def send_merge_directive(self, item):
     from bzrlib.plugins.gtk.mergedirective import SendMergeDirectiveDialog
     from cStringIO import StringIO
     window = SendMergeDirectiveDialog(self.branch, self.revids[0])
     if window.run() == Gtk.ResponseType.OK:
         outf = StringIO()
         outf.writelines(window.get_merge_directive().to_lines())
         mail_client = self.branch.get_config().get_mail_client()
         mail_client.compose_merge_request(window.get_mail_to(), "[MERGE]",
                                           outf.getvalue())
     window.destroy()
Exemple #2
0
 def run(self):
     (br, path) = branch.Branch.open_containing(".")
     Gtk = open_display()
     from bzrlib.plugins.gtk.mergedirective import SendMergeDirectiveDialog
     from StringIO import StringIO
     dialog = SendMergeDirectiveDialog(br)
     if dialog.run() == Gtk.ResponseType.OK:
         outf = StringIO()
         outf.writelines(dialog.get_merge_directive().to_lines())
         mail_client = br.get_config().get_mail_client()
         mail_client.compose_merge_request(dialog.get_mail_to(), "[MERGE]", 
             outf.getvalue())