Rev 16: we shouldn't auto-load plugins, that is handled by the --no-plugins switch. in http://bzr.arbash-meinel.com/plugins/service

John Arbash Meinel john at arbash-meinel.com
Mon Apr 9 17:14:59 BST 2007


At http://bzr.arbash-meinel.com/plugins/service

------------------------------------------------------------
revno: 16
revision-id: john at arbash-meinel.com-20070409161447-bx0ejor36p9vmafm
parent: john at arbash-meinel.com-20070409161248-5vm9h7sp3bmubuh8
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: service
timestamp: Mon 2007-04-09 11:14:47 -0500
message:
  we shouldn't auto-load plugins, that is handled by the --no-plugins switch.
modified:
  service.py                     service.py-20070405221539-6zh4ehzyz16xp8h4-1
  test_service.py                test_service.py-20070405220302-ux8e51mgs25fakhk-2
-------------- next part --------------
=== modified file 'service.py'
--- a/service.py	2007-04-09 16:12:48 +0000
+++ b/service.py	2007-04-09 16:14:47 +0000
@@ -117,7 +117,7 @@
         return _possible_modules
     # Ignore all bzrlib.tests modules, but watch out for something like
     # 'testament'
-    ignore_test_re = re.compile(r'tests$')
+    ignore_test_re = re.compile(r'(tests$)|(plugins$)')
     return find_all_modules(bzrlib_dir, ignore_test_re.match)
 
 

=== modified file 'test_service.py'
--- a/test_service.py	2007-04-09 16:12:48 +0000
+++ b/test_service.py	2007-04-09 16:14:47 +0000
@@ -83,6 +83,8 @@
                          'tests/', 'tests/__init__.py', 'tests/test.py',
                          # But not things that just start with tests
                          'testsay.py',
+                         # ignore plugins, too
+                         'plugin.py', 'plugins/', 'plugins/__init__.py',
                         ])
         import bzrlib
         orig_file = bzrlib.__file__
@@ -90,7 +92,7 @@
             # use an OS path for this.
             bzrlib.__file__ = os.path.join(os.getcwd(), '__init__.py')
             self.assertEqual(sorted(['a', 'c', 'c.foo', 'c.d', 'c.d.bar',
-                                     'testsay']),
+                                     'testsay', 'plugin']),
                              sorted(service.find_bzrlib_modules()))
         finally:
             bzrlib.__file__ = orig_file



More information about the bazaar-commits mailing list