rpms/bzr-gtk/FC-6 bzr-gtk-disable-nautilus-pull.patch, NONE, 1.1 bzr-gtk-nautilus-protocol.patch, NONE, 1.1 bzr-gtk-nautilus.patch, NONE, 1.1 .cvsignore, 1.7, 1.8 bzr-gtk.spec, 1.9, 1.10 sources, 1.7, 1.8

Toshio Ernie Kuratomi (toshio) fedora-extras-commits at redhat.com
Sat Oct 6 00:06:05 UTC 2007


Author: toshio

Update of /cvs/pkgs/rpms/bzr-gtk/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32403

Modified Files:
	.cvsignore bzr-gtk.spec sources 
Added Files:
	bzr-gtk-disable-nautilus-pull.patch 
	bzr-gtk-nautilus-protocol.patch bzr-gtk-nautilus.patch 
Log Message:
- Olive must be moved to an arch specific directory as well for now.
  If rpm could have noarch subpackages, this would be fine to leave in
  python_sitelib.
- Disable nautilus extension on FC-6 as it has never been built for FC-6 and
  I don't have an FC-6 box on which to test nautilus integration.


bzr-gtk-disable-nautilus-pull.patch:

--- NEW FILE bzr-gtk-disable-nautilus-pull.patch ---
Index: bzr-gtk-0.15.2/nautilus-bzr.py
===================================================================
--- bzr-gtk-0.15.2.orig/nautilus-bzr.py
+++ bzr-gtk-0.15.2/nautilus-bzr.py
@@ -165,24 +165,6 @@ class BzrExtension(nautilus.MenuProvider
 
         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.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':
@@ -227,12 +209,6 @@ class BzrExtension(nautilus.MenuProvider
         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')

bzr-gtk-nautilus-protocol.patch:

--- NEW FILE bzr-gtk-nautilus-protocol.patch ---
Index: bzr-gtk-0.15.2/nautilus-bzr.py
===================================================================
--- bzr-gtk-0.15.2.orig/nautilus-bzr.py
+++ bzr-gtk-0.15.2/nautilus-bzr.py
@@ -12,6 +12,7 @@ import bzrlib
 from bzrlib.bzrdir import BzrDir
 from bzrlib.errors import NotBranchError
 from bzrlib.errors import NoWorkingTree
+from bzrlib.errors import UnsupportedProtocol
 from bzrlib.workingtree import WorkingTree
 from bzrlib.branch import Branch
 from bzrlib.tree import file_status
@@ -206,6 +207,8 @@ class BzrExtension(nautilus.MenuProvider
         file = vfs_file.get_uri()
         try:
             tree, path = WorkingTree.open_containing(file)
+        except UnsupportedProtocol:
+            return
         except NotBranchError:
             item = nautilus.MenuItem('BzrNautilus::newtree',
                                  'Make directory versioned',

bzr-gtk-nautilus.patch:

--- NEW FILE bzr-gtk-nautilus.patch ---
Index: bzr-gtk-0.15.2/nautilus-bzr.py
===================================================================
--- bzr-gtk-0.15.2.orig/nautilus-bzr.py
+++ bzr-gtk-0.15.2/nautilus-bzr.py
@@ -6,11 +6,14 @@
 #
 # Published under the GNU GPL
 
+import gtk
 import nautilus
 import bzrlib
 from bzrlib.bzrdir import BzrDir
 from bzrlib.errors import NotBranchError
+from bzrlib.errors import NoWorkingTree
 from bzrlib.workingtree import WorkingTree
+from bzrlib.branch import Branch
 from bzrlib.tree import file_status
 
 from bzrlib.plugin import load_plugins
@@ -78,7 +81,7 @@ class BzrExtension(nautilus.MenuProvider
         except NotBranchError:
             return
 
-        from bzrlib.plugins.gtk.viz.diff import DiffWindow
+        from bzrlib.plugins.gtk.diff import DiffWindow
         window = DiffWindow()
         window.set_diff(tree.branch.nick, tree, tree.branch.basis_tree())
         window.show()
@@ -96,7 +99,7 @@ class BzrExtension(nautilus.MenuProvider
         try:
             tree, path = WorkingTree.open_containing(file)
         except NotBranchError:
-            BzrDir.create_branch_and_repo(file)
+            BzrDir.create_standalone_workingtree(file)
 
     def remove_cb(self, menu, vfs_file):
         # We can only cope with local files
@@ -129,7 +132,10 @@ class BzrExtension(nautilus.MenuProvider
         from bzrlib.plugins.gtk.branch import BranchDialog
         
         dialog = BranchDialog(vfs_file.get_name())
-        dialog.display()
+        response = dialog.run()
+        if response != gtk.RESPONSE_NONE:
+            dialog.hide()
+            dialog.destroy()
  
     def commit_cb(self, menu, vfs_file=None):
         # We can only cope with local files
@@ -137,15 +143,27 @@ class BzrExtension(nautilus.MenuProvider
             return
 
         file = vfs_file.get_uri()
+        tree = None
+        branch = None
         try:
             tree, path = WorkingTree.open_containing(file)
-        except NotBranchError:
-            return
+            branch = tree.branch
+        except NotBranchError, e:
+            path = e.path
+            #return
+        except NoWorkingTree, e:
+            path = e.base
+            try:
+                (branch, path) = Branch.open_containing(path)
+            except NotBranchError, e:
+                path = e.path
 
         from bzrlib.plugins.gtk.commit import CommitDialog
-        dialog = CommitDialog(tree, path)
-        dialog.display()
-        gtk.main()
+        dialog = CommitDialog(tree, path, not branch)
+        response = dialog.run()
+        if response != gtk.RESPONSE_NONE:
+            dialog.hide()
+            dialog.destroy()
 
     def log_cb(self, menu, vfs_file):
         # We can only cope with local files
@@ -227,6 +245,7 @@ class BzrExtension(nautilus.MenuProvider
     def get_file_items(self, window, files):
         items = []
 
+        wtfiles = {}
         for vfs_file in files:
             # We can only cope with local files
             if vfs_file.get_uri_scheme() != 'file':
@@ -243,10 +262,15 @@ class BzrExtension(nautilus.MenuProvider
                                      'Create new Bazaar tree in %s' % vfs_file.get_name())
                 item.connect('activate', self.newtree_cb, vfs_file)
                 return item,
+            # Refresh the list of filestatuses in the working tree
+            if path not in wtfiles.keys():
+                tree.lock_read()
+                for rpath, file_class, kind, id, entry in tree.list_files():
+                    wtfiles[rpath] = file_class
+                tree.unlock()
+                wtfiles[u''] = 'V'
 
-            file_class = tree.file_class(path)
-
-            if file_class == '?':
+            if wtfiles[path] == '?':
                 item = nautilus.MenuItem('BzrNautilus::add',
                                      'Add',
                                      'Add as versioned file')
@@ -258,13 +282,13 @@ class BzrExtension(nautilus.MenuProvider
                                      'Ignore file for versioning')
                 item.connect('activate', self.ignore_cb, vfs_file)
                 items.append(item)
-            elif file_class == 'I':
+            elif wtfiles[path] == 'I':
                 item = nautilus.MenuItem('BzrNautilus::unignore',
                                      'Unignore',
                                      'Unignore file for versioning')
                 item.connect('activate', self.unignore_cb, vfs_file)
                 items.append(item)
-            elif file_class == 'V':
+            elif wtfiles[path] == 'V':
                 item = nautilus.MenuItem('BzrNautilus::log',
                                  'Log',
                                  'List changes')


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/bzr-gtk/FC-6/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- .cvsignore	3 Apr 2007 20:44:58 -0000	1.7
+++ .cvsignore	6 Oct 2007 00:05:13 -0000	1.8
@@ -1 +1 @@
-bzr-gtk-0.15.2.tar.gz
+bzr-gtk-0.91.0.tar.gz


Index: bzr-gtk.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bzr-gtk/FC-6/bzr-gtk.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- bzr-gtk.spec	18 Apr 2007 23:08:14 -0000	1.9
+++ bzr-gtk.spec	6 Oct 2007 00:05:13 -0000	1.10
@@ -1,25 +1,38 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+
+# Oh the horrors of arch dependent noarch packages!
+# (bzrlib is arch dependent.  Thus bzrlib plugins are also arch dependent.)
+%define debug_package %{nil}
 
 Name:           bzr-gtk
-Version:        0.15.2
+Version:        0.91.0
 Release:        2%{?dist}
 Summary:        Bazaar plugin for GTK+ interfaces to most Bazaar operations
 
 Group:          Development/Tools
-License:        GPL
+License:        GPLv2+
 URL:            http://bazaar-vcs.org/bzr-gtk
-Source0:        http://samba.org/~jelmer/bzr/bzr-gtk-%{version}.tar.gz
+Source0:        https://launchpad.net/bzr-gtk/0.91/%{version}/+download/bzr-gtk-%{version}.tar.gz
+# We can't use the notifier functionality without a bzr-dbus-package.
 Patch0:         bzr-gtk-disable-notifier.patch
+# Fix some bugs in the nautilus integration.  Submitted upstream
+Patch1:         bzr-gtk-nautilus.patch
+Patch2:         bzr-gtk-nautilus-protocol.patch
+# This requires some nonexistent functionality.  Bug filed upstream.  Disabled
+# for now.
+Patch3:         bzr-gtk-disable-nautilus-pull.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildArch:      noarch
-BuildRequires:  python-devel bzr
+BuildRequires:  python-devel
+BuildRequires:  bzr
 BuildRequires:  gettext
-Requires:       bzr >= 0.15
-# These enable the commit-notify and nautilus browse functionality resp.  But
-# neither are packaged for Fedora yet.
+Requires:       bzr >= 0.18
+# This enables the commit-notify functionality but it's not packaged for
+# Fedora yet.
 #Requires:       bzr-dbus
-#Requires:       python-nautilus
 
 %description
 bzr-gtk is a plugin for Bazaar that aims to provide GTK+ interfaces to most
@@ -34,9 +47,23 @@
 Olive aims to be a full-featured graphical frontend for Bazaar.  It will
 expose all core functionality of Bazaar in a user-friendly GUI.
 
+#%package -n nautilus-bzr
+#Summary: Nautilus plugin for the bazaar revision control system
+#Group: User Interface/Desktops
+#Requires: %{name} = %{version}-%{release}
+#Requires:       nautilus-python >= 0.4.3-4
+#
+#%description -n nautilus-bzr
+#nautilus-bzr is an extension for Nautilus, the GNOME file manager.  It
+#allows you to perform some revision control commands on Bazaar Working Trees
+#from within Nautilus.
+
 %prep
 %setup -q
-%patch -p1 -b .disable
+%patch0 -p1 -b .disable
+%patch1 -p1 -b .nautilusfixes
+%patch2 -p1 -b .nautilusprotocol
+%patch3 -p1 -b .nautilusdisable
 
 %build
 %{__python} setup.py build
@@ -44,8 +71,21 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-# mv $RPM_BUILD_ROOT%{python_sitelib}/bzrlib/plugins/gtk/nautilus* $RPM_BUILD_ROOT%{_prefix}/lib/nautilus/extensions-1.0/python/
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+if test "%{python_sitelib}" != "%{python_sitearch}" ; then
+    install -d -m 0755 $RPM_BUILD_ROOT%{python_sitearch}/bzrlib/plugins/
+    mv $RPM_BUILD_ROOT%{python_sitelib}/bzrlib/plugins/gtk $RPM_BUILD_ROOT%{python_sitearch}/bzrlib/plugins
+    mv $RPM_BUILD_ROOT%{python_sitelib}/olive $RPM_BUILD_ROOT%{python_sitearch}
+fi
+
+install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-1.0/python/
+mv $RPM_BUILD_ROOT%{python_sitearch}/bzrlib/plugins/gtk/nautilus* $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-1.0/python/
+
+# No translations yet
+#%find_lang olive
+
+# This won't do anything until after we add bzr-dbus.
+rm -rf $RPM_BUILD_ROOT%{_datadir}/applications/bzr-notify.desktop
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -54,20 +94,55 @@
 %files
 %defattr(-,root,root,-)
 %doc COPYING README
-%{python_sitelib}/bzrlib/plugins/gtk/
+%{python_sitearch}/bzrlib/plugins/gtk/
+%{_datadir}/applications/bazaar-properties.desktop
+%exclude %{_libdir}/nautilus/extensions-1.0/python/*
 
+#%files -n olive -f olive.lang
 %files -n olive
 %defattr(-,root,root,-)
 %{_bindir}/*
-%{python_sitelib}/olive
+%{python_sitearch}/olive/
 %{_datadir}/olive/
 %{_datadir}/pixmaps/olive-gtk.png
 %{_datadir}/applications/olive-gtk.desktop
 
-#%files nautilus
-#%{_prefix}/lib/nautilus/extensions-1.0/python/*
+#%files -n nautilus-bzr
+#%{_libdir}/nautilus/extensions-1.0/python/*
 
 %changelog
+* Wed Sep 26 2007 Toshio Kuratomi <a.badger at gmail.com> 0.91.0-2
+- Olive must be moved to an arch specific directory as well for now.
+  If rpm could have noarch subpackages, this would be fine to leave in
+  python_sitelib.
+- Disable nautilus extension on FC-6 as it has never been built for FC-6 and
+  I don't have an FC-6 box on which to test nautilus integration.
+
+* Wed Sep 26 2007 Toshio Kuratomi <a.badger at gmail.com> 0.91.0-1
+- Update to 0.91.0.
+
+* Thu Aug 30 2007 Toshio Kuratomi <a.badger at gmail.com> 0.90.0-2
+- Move the plugins manually as distutils doesn't know that bzr is arch
+  specific.
+
+* Tue Aug 28 2007 Toshio Kuratomi <a.badger at gmail.com> 0.90.0-1
+- Update to 0.90.0.
+- Update license tag to the new Licensing Guidelines.
+- Bzr is now arch specific so all its plugins have to be as well.
+
+* Wed Jul 25 2007 Warren Togami <wtogami at redhat.com> 0.18.0-1
+- Update to 0.18.0.
+
+* Thu Jun 28 2007 Warren Togami <wtogami at redhat.com> 0.17.0-1
+- Update to 0.17.0.
+
+* Fri May 11 2007 Toshio Kuratomi <toshio at tiki-lounge.com> 0.16.0-1
+- Update to 0.16.0.
+- Apply patch to fix traceback in nautilus module.
+
+* Mon Apr 30 2007 Toshio Kuratomi <toshio at tiki-lounge.com> 0.15.2-3
+- Add a nautilus subpackage as there's now a nautilus-python package in Fedora.
+
 * Wed Apr 18 2007 Toshio Kuratomi <toshio at tiki-lounge.com> 0.15.2-2
 - Fix olive description.
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/bzr-gtk/FC-6/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources	3 Apr 2007 20:44:58 -0000	1.7
+++ sources	6 Oct 2007 00:05:13 -0000	1.8
@@ -1 +1 @@
-33e79c61d8f367e126a7a4f5d7092038  bzr-gtk-0.15.2.tar.gz
+3b5d9c517494988a83d7ccaae8a18e2f  bzr-gtk-0.91.0.tar.gz




More information about the fedora-extras-commits mailing list