Comment 5 for bug 519608

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 519608] [NEW] Fails to start if bzr can't load all plugins

Andrew Starr-Bochicchio пишет:
> Ahh.. I see. In explorer/lib/app_suite.py we have:
>
> try:
> import bzrlib.plugins.gtk
> app_suite_registry.register("gtk", ApplicationSuite("gtk",
> _GTK_STATELESS_MAPPING, _GTK_LOCAL_MAPPING, _GTK_REMOTE_MAPPING,
> fallbacks=['qbzr']),
> help="Applets from the bzr-gtk plugin")
> except ImportError:
> pass
>
> and in qbzr/lib/log.py we have:
>
> try:
> from bzrlib.plugins.svn.repository import SvnRepository
> has_svn = True
> except ImportError:
> has_svn = False
>
>
> These will both cause explorer not to start as there is no
> ImportError, but the plugins still can't be used.

Sorry, but you're wrong. Both this construct will catch ImportError and
don't block Explorer. The messages you see:

Unable to load plugin 'svn'. It requested API version (2, 0, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'git'. It requested API version (1, 18, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'gtk'. It requested API version (1, 17, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'rebase'. It requested API version (1, 17, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)

is generated by bzr itself when it loads plugins at startup, even before
command "explorer" is started.