[Pkg-bazaar-commits] ./bzr-gtk/unstable r97: Merge from trunk.

Szilveszter Farkas (Phanatic) Szilveszter.Farkas at gmail.com
Fri Apr 10 07:49:24 UTC 2009


------------------------------------------------------------
revno: 97
committer: Szilveszter Farkas (Phanatic) <Szilveszter.Farkas at gmail.com>
branch nick: bzr-gtk
timestamp: Tue 2006-10-17 23:39:39 +0200
message:
  Merge from trunk.
modified:
  nautilus-bzr.py
    ------------------------------------------------------------
    revno: 91.1.4
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: bzr-gtk
    timestamp: Sun 2006-10-15 22:15:05 +0200
    message:
      List pull and merge in nautilus-bzr.
    modified:
      nautilus-bzr.py
-------------- next part --------------
=== modified file 'nautilus-bzr.py'
--- a/nautilus-bzr.py	2006-10-08 21:57:40 +0000
+++ b/nautilus-bzr.py	2006-10-15 20:15:05 +0000
@@ -157,6 +157,42 @@
 
         return
 
+    def pull_cb(self, menu, vfs_file):
+        # We can only cope with local files
+        if vfs_file.get_uri_scheme() != 'file':
+            return
+
+        file = vfs_file.get_uri()
+
+        # We only want to continue here if we get a NotBranchError
+        try:
+            tree, path = WorkingTree.open_containing(file)
+        except NotBranchError:
+            return
+
+        from bzrlib.plugins.gtk.olive.pull import PullDialog
+        dialog = PullDialog(tree, path)
+        dialog.display()
+        gtk.main()
+
+    def merge_cb(self, menu, vfs_file):
+        # We can only cope with local files
+        if vfs_file.get_uri_scheme() != 'file':
+            return
+
+        file = vfs_file.get_uri()
+
+        # We only want to continue here if we get a NotBranchError
+        try:
+            tree, path = WorkingTree.open_containing(file)
+        except NotBranchError:
+            return
+
+        from bzrlib.plugins.gtk.olive.merge import MergeDialog
+        dialog = MergeDialog(tree, path)
+        dialog.display()
+        gtk.main()
+
     def get_background_items(self, window, vfs_file):
         items = []
         file = vfs_file.get_uri()
@@ -183,6 +219,18 @@
         item.connect('activate', self.log_cb, vfs_file)
         items.append(item)
 
+        item = nautilus.MenuItem('BzrNautilus::pull',
+                             'Pull',
+                             'Pull from another branch')
+        item.connect('activate', self.pull_cb, vfs_file)
+        items.append(item)
+
+        item = nautilus.MenuItem('BzrNautilus::merge',
+                             'Merge',
+                             'Merge from another branch')
+        item.connect('activate', self.merge_cb, vfs_file)
+        items.append(item)
+
         item = nautilus.MenuItem('BzrNautilus::commit',
                              'Commit',
                              'Commit Changes')



More information about the Pkg-bazaar-commits mailing list