Rev 255: Add Merge Directive option to revision menu. in file:///data/jelmer/bzr-gtk/trunk/

Jelmer Vernooij jelmer at samba.org
Sun Aug 5 02:03:36 BST 2007


At file:///data/jelmer/bzr-gtk/trunk/

------------------------------------------------------------
revno: 255
revision-id: jelmer at samba.org-20070805010335-1js1cwqxtcvbljw1
parent: jelmer at samba.org-20070802173934-618dijbujohkcp9q
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sun 2007-08-05 03:03:35 +0200
message:
  Add Merge Directive option to revision menu.
added:
  mergedirective.py              mergedirective.py-20070805005518-41uc6l5dle4e2trw-1
modified:
  revisionmenu.py                revisionmenu.py-20070715160146-pd4ew0wtlevga2mx-1
=== added file 'mergedirective.py'
--- a/mergedirective.py	1970-01-01 00:00:00 +0000
+++ b/mergedirective.py	2007-08-05 01:03:35 +0000
@@ -0,0 +1,52 @@
+# Copyright (C) 2007 by Jelmer Vernooij <jelmer at samba.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+try:
+    import pygtk
+    pygtk.require("2.0")
+except:
+    pass
+
+import bzrlib
+import gtk
+import os
+
+class CreateMergeDirectiveDialog(gtk.Dialog):
+    def __init__(self, branch, stop_revid=None):
+        super(CreateMergeDirectiveDialog, self).__init__()
+        self.branch = branch
+        self.stop_revid = stop_revid
+        self._create()
+
+    def _create(self):
+        # TODO: Create a frame with information about the revision that will be 
+        # submittted
+
+        # TODO: Create a frame with a the ability to select a branch
+        
+        # TODO: Create a frame with a button for selecting a file name 
+        # for the bundle
+        pass
+
+
+class SendMergeDirectiveDialog(gtk.Dialog):
+    def __init__(self):
+        super(SendMergeDirectiveDialog, self).__init__()
+
+
+class ApplyMergeDirectiveDialog(gtk.Dialog):
+    def __init__(self):
+        super(ApplyMergeDirectiveDialog, self).__init__()

=== modified file 'revisionmenu.py'
--- a/revisionmenu.py	2007-07-15 18:39:52 +0000
+++ b/revisionmenu.py	2007-08-05 01:03:35 +0000
@@ -49,6 +49,16 @@
             self.append(item)
             self.show_all()
 
+            item = gtk.MenuItem("_Merge Directive")
+            item.connect('activate', self.store_merge_directive)
+            self.append(item)
+            self.show_all()
+
+    def store_merge_directive(self, item):
+        from bzrlib.plugins.gtk.mergedirective import CreateMergeDirectiveDialog
+        window = CreateMergeDirectiveDialog(self.branch, self.revids[0])
+        window.show()
+
     def show_diff(self, item):
         from bzrlib.plugins.gtk.diff import DiffWindow
         window = DiffWindow()




More information about the bazaar-commits mailing list