Rev 5950: (jameinel) Improve import_tarriff isolation by leaving BZR_PLUGIN_PATH in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Jun 1 11:38:09 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5950 [merge]
revision-id: pqm at pqm.ubuntu.com-20110601113806-ekutxdri87ratrfg
parent: pqm at pqm.ubuntu.com-20110601104714-d421mcfal6nx8sz0
parent: v.ladeuil+lp at free.fr-20110601100346-zpf0vaxulj1qm5aw
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-06-01 11:38:06 +0000
message:
  (jameinel) Improve import_tarriff isolation by leaving BZR_PLUGIN_PATH
   available. (Vincent Ladeuil)
modified:
  bzrlib/tests/test_import_tariff.py test_import_tariff.p-20100207155145-ff9infp7goncs7zh-1
=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py	2011-05-31 06:15:24 +0000
+++ b/bzrlib/tests/test_import_tariff.py	2011-06-01 10:03:46 +0000
@@ -69,7 +69,8 @@
 
     def setUp(self):
         self.preserved_env_vars = {}
-        for name in ('BZR_DISABLE_PLUGINS', 'BZR_PLUGINS_AT'):
+        for name in ('BZR_PLUGIN_PATH', 'BZR_DISABLE_PLUGINS', 'BZR_PLUGINS_AT'
+                     ):
             self.preserved_env_vars[name] = os.environ.get(name)
         super(TestImportTariffs, self).setUp()
 
@@ -85,12 +86,7 @@
         # more likely to always show everything.  And we use the environment
         # variable rather than 'python -v' in the hope it will work even if
         # bzr is frozen and python is not explicitly specified. -- mbp 20100208
-        # We use BZR_PLUGIN_PATH to explicitly set the subprocess to use the
-        # same plugins as this process.
-        plugin_path = os.pathsep.join(
-            ['-core', '-site'] + _mod_plugins.__path__)
-        env_changes = dict(PYTHONVERBOSE='1', BZR_PLUGIN_PATH=plugin_path)
-        env_changes.update(self.preserved_env_vars)
+        env_changes = dict(PYTHONVERBOSE='1', **self.preserved_env_vars)
         trace.mutter('Setting env for bzr subprocess: %r', env_changes)
         kwargs = dict(env_changes=env_changes,
                       allow_plugins=(not are_plugins_disabled()))




More information about the bazaar-commits mailing list