[Pkg-bazaar-commits] ./bzr-gtk/unstable r142: Move some files to the top-level directory, add first test.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:49:36 UTC 2009


------------------------------------------------------------
revno: 142
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2007-02-03 11:25:09 +0100
message:
  Move some files to the top-level directory, add first test.
renamed:
  olive/branch.py => branch.py
  olive/checkout.py => checkout.py
  olive/commit.py => commit.py
  olive/push.py => push.py
  olive/ui.py => ui.py
modified:
  __init__.py
  annotate/gannotate.py
  nautilus-bzr.py
  olive-gtk
  olive/__init__.py
  olive/bookmark.py
  olive/menu.py
  tests/__init__.py
  commit.py
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2007-02-01 16:41:53 +0000
+++ b/__init__.py	2007-02-03 10:25:09 +0000
@@ -74,7 +74,7 @@
 
 def set_ui_factory():
     pygtk = import_pygtk()
-    from olive.ui import GtkUIFactory
+    from ui import GtkUIFactory
     import bzrlib.ui
     bzrlib.ui.ui_factory = GtkUIFactory()
 
@@ -92,7 +92,7 @@
             if str(e) == "could not open display":
                 raise NoDisplayError
 
-        from bzrlib.plugins.gtk.olive.branch import BranchDialog
+        from bzrlib.plugins.gtk.branch import BranchDialog
 
         set_ui_factory()
         dialog = BranchDialog(os.path.abspath('.'))
@@ -113,7 +113,7 @@
             if str(e) == "could not open display":
                 raise NoDisplayError
 
-        from bzrlib.plugins.gtk.olive.checkout import CheckoutDialog
+        from bzrlib.plugins.gtk.checkout import CheckoutDialog
 
         set_ui_factory()
         dialog = CheckoutDialog(os.path.abspath('.'))
@@ -137,7 +137,7 @@
             if str(e) == "could not open display":
                 raise NoDisplayError
 
-        from bzrlib.plugins.gtk.olive.push import PushDialog
+        from push import PushDialog
 
         set_ui_factory()
         dialog = PushDialog(branch)
@@ -323,7 +323,7 @@
                 raise NoDisplayError
 
         set_ui_factory()
-        from olive.commit import CommitDialog
+        from commit import CommitDialog
         from bzrlib.commit import Commit
         from bzrlib.errors import (BzrCommandError,
                                    NotBranchError,
@@ -364,4 +364,3 @@
     result = TestSuite()
     result.addTest(tests.test_suite())
     return result
-

=== modified file 'annotate/gannotate.py'
--- a/annotate/gannotate.py	2007-01-26 11:48:08 +0000
+++ b/annotate/gannotate.py	2007-02-03 10:25:09 +0000
@@ -29,7 +29,6 @@
 
 from colormap import AnnotateColorMap, AnnotateColorSaturation
 from logview import LogView
-from spanselector import SpanSelector
 
 
 (

=== renamed file 'olive/branch.py' => 'branch.py'
=== renamed file 'olive/checkout.py' => 'checkout.py'
=== renamed file 'olive/commit.py' => 'commit.py'
--- a/olive/commit.py	2007-01-30 11:33:28 +0000
+++ b/commit.py	2007-02-03 10:25:09 +0000
@@ -21,7 +21,6 @@
     pass
 
 import gtk
-import gtk.glade
 import gobject
 import pango
 

=== modified file 'nautilus-bzr.py'
--- a/nautilus-bzr.py	2006-10-15 20:15:05 +0000
+++ b/nautilus-bzr.py	2007-02-03 10:25:09 +0000
@@ -118,7 +118,7 @@
         if vfs_file.get_uri_scheme() != 'file':
             return
 
-        from bzrlib.plugins.gtk.olive.branch import BranchDialog
+        from bzrlib.plugins.gtk.branch import BranchDialog
         
         dialog = BranchDialog(vfs_file.get_name())
         dialog.display()
@@ -134,7 +134,7 @@
         except NotBranchError:
             return
 
-        from bzrlib.plugins.gtk.olive.commit import CommitDialog
+        from bzrlib.plugins.gtk.commit import CommitDialog
         dialog = CommitDialog(tree, path)
         dialog.display()
         gtk.main()
@@ -170,7 +170,7 @@
         except NotBranchError:
             return
 
-        from bzrlib.plugins.gtk.olive.pull import PullDialog
+        from bzrlib.plugins.gtk.pull import PullDialog
         dialog = PullDialog(tree, path)
         dialog.display()
         gtk.main()
@@ -188,7 +188,7 @@
         except NotBranchError:
             return
 
-        from bzrlib.plugins.gtk.olive.merge import MergeDialog
+        from bzrlib.plugins.gtk.merge import MergeDialog
         dialog = MergeDialog(tree, path)
         dialog.display()
         gtk.main()

=== modified file 'olive-gtk'
--- a/olive-gtk	2006-10-26 13:16:07 +0000
+++ b/olive-gtk	2007-02-03 10:25:09 +0000
@@ -84,8 +84,8 @@
 load_plugins()
 
 import bzrlib.ui
-import olive.ui
-bzrlib.ui.ui_factory = olive.ui.GtkUIFactory()
+import ui
+bzrlib.ui.ui_factory = ui.GtkUIFactory()
 
 app = OliveGtk()
 gtk.main()

=== modified file 'olive/__init__.py'
--- a/olive/__init__.py	2007-02-01 14:41:43 +0000
+++ b/olive/__init__.py	2007-02-03 10:25:09 +0000
@@ -45,6 +45,8 @@
     from bzrlib.plugins.gtk.viz.branchwin import BranchWindow
     from bzrlib.plugins.gtk.annotate.gannotate import GAnnotateWindow
     from bzrlib.plugins.gtk.annotate.config import GAnnotateConfig
+    from bzrlib.plugins.gtk.commit import CommitDialog
+    from bzrlib.plugins.gtk.push import PushDialog
 except ImportError:
     # olive+bzr-gtk not installed. try to import from sources
     path = os.path.dirname(os.path.dirname(__file__))
@@ -67,7 +69,7 @@
         
         self.window = self.toplevel.get_widget('window_main')
         
-        self.pref = OlivePreferences()
+        self.pref = Preferences()
         
         self.path = None
 
@@ -248,7 +250,6 @@
     
     def on_menuitem_branch_commit_activate(self, widget):
         """ Branch/Commit... menu handler. """
-        from commit import CommitDialog
         commit = CommitDialog(self.wt, self.wtpath, self.notbranch, self.get_selected_right(), self.window)
         response = commit.run()
         if response != gtk.RESPONSE_NONE:
@@ -321,7 +322,6 @@
     
     def on_menuitem_branch_push_activate(self, widget):
         """ Branch/Push... menu handler. """
-        from push import PushDialog
         push = PushDialog(self.wt.branch, self.window)
         response = push.run()
         if response != gtk.RESPONSE_NONE:
@@ -930,7 +930,7 @@
 
 import ConfigParser
 
-class OlivePreferences:
+class Preferences:
     """ A class which handles Olive's preferences. """
     def __init__(self):
         """ Initialize the Preferences class. """

=== modified file 'olive/bookmark.py'
--- a/olive/bookmark.py	2007-02-01 14:52:43 +0000
+++ b/olive/bookmark.py	2007-02-03 10:25:09 +0000
@@ -22,7 +22,7 @@
 
 import gtk
 
-from olive import OlivePreferences
+from olive import Preferences
 from dialog import error_dialog
 
 
@@ -36,7 +36,7 @@
                                   flags=0,
                                   buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
         
-        self.pref = OlivePreferences()
+        self.pref = Preferences()
         
         # Get arguments
         self.selected = selected

=== modified file 'olive/menu.py'
--- a/olive/menu.py	2007-02-01 14:52:43 +0000
+++ b/olive/menu.py	2007-02-03 10:25:09 +0000
@@ -31,7 +31,7 @@
 from dialog import error_dialog, info_dialog, warning_dialog
 from errors import show_bzr_error
 from launch import launch
-from olive import OlivePreferences, DiffWindow
+from olive import Preferences, DiffWindow
 
 class OliveMenu:
     """ This class is responsible for building the context menus. """
@@ -42,7 +42,7 @@
         self.uifile = UIFILENAME
 
         # Preferences handler
-        self.pref = OlivePreferences()
+        self.pref = Preferences()
         
         # Set default values
         self.path = path

=== renamed file 'olive/push.py' => 'push.py'
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2007-02-01 15:50:40 +0000
+++ b/tests/__init__.py	2007-02-03 10:25:09 +0000
@@ -15,10 +15,15 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 from unittest import TestLoader, TestSuite
+from bzrlib.tests import TestUtil
+
 
 def test_suite():
     result = TestSuite()
 
-    loader = TestLoader()
+    loader = TestUtil.TestLoader()
+
+    testmod_names = ['test_preferences']
+    result.addTest(loader.loadTestsFromModuleNames(["%s.%s" % (__name__, i) for i in testmod_names]))
     return result
 

=== renamed file 'olive/ui.py' => 'ui.py'


More information about the Pkg-bazaar-commits mailing list