~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-15 10:09:59 UTC
  • mto: This revision was merged to the branch mainline in revision 14522.
  • Revision ID: jelmer@canonical.com-20111215100959-1y8wjq8g3pv7rw0m
Re-merge always loading of foreign plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
__all__ = [
12
12
    'get_bzr_path',
13
13
    'get_BZR_PLUGIN_PATH_for_subprocess',
14
 
    'load_optional_plugin',
15
14
    ]
16
15
 
17
16
 
18
17
import os
19
18
 
20
19
import bzrlib
21
 
from bzrlib import hooks
22
20
from bzrlib.plugin import load_plugins
23
21
 
24
22
from canonical.config import config
61
59
load_plugins([_get_bzr_plugins_path()])
62
60
 
63
61
 
64
 
def load_optional_plugin(plugin_name):
65
 
    """Load the plugin named `plugin_name` from optionalbzrplugins/."""
66
 
    from bzrlib import plugins
67
 
    optional_plugin_dir = os.path.join(config.root, 'bzrplugins/optional')
68
 
    if optional_plugin_dir not in plugins.__path__:
69
 
        plugins.__path__.append(optional_plugin_dir)
70
 
    __import__("bzrlib.plugins.%s" % plugin_name)
71
 
 
72
 
 
73
62
def load_bundled_plugin(plugin_name):
74
63
    """Load a plugin bundled with Bazaar."""
75
64
    from bzrlib.plugin import get_core_plugin_path