[MERGE] Re: windows-only problem with launchpad plugin
Alexander Belchenko
bialix at ukr.net
Tue Jul 10 21:15:41 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This fix is somewhat wrong:
@@ -253,13 +257,8 @@
continue
try:
- - plugin = ziobj.load_module(plugin_name)
- - setattr(plugins, plugin_name, plugin)
+ exec "import bzrlib.plugins.%s" % plugin_name in {}
^-- "import bzrlib.plugins.%s" is wrong.
As I wrote in my another message, function load_from_zip() is designed to be general zipimporter
rather than only for bzrlib.plugins. If you want to use such ad-hoc, it's need to change the overall
codepath of importing built-in plugins by checking is bzr running as python script, or as standalone
bzr.exe.
In latter case all that stuff with prefix and searching of names in zip-archive has very little
sense, because we know most of the info apriori.
Also this hardcoded path does break selftest: bzrlib.tests.test_plugins.TestPluginFromZip is failed.
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGk+jtzYr338mxwCURAk7cAJ9Ny+0oQ+6J4144Dw0kDD4S3h264wCdF1mZ
vL7pexo9rLvLuvLDRGYV70M=
=IeJW
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list