/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugin.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-21 03:58:42 UTC
  • mfrom: (7490.3.4 work)
  • mto: This revision was merged to the branch mainline in revision 7495.
  • Revision ID: jelmer@jelmer.uk-20200221035842-j97r6b74q8cgxb21
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
    state.plugins = {}
77
77
 
78
78
 
79
 
def load_plugins(path=None, state=None, warn_load_problems=True):
 
79
def load_plugins(path=None, state=None):
80
80
    """Load breezy plugins.
81
81
 
82
82
    The environment variable BRZ_PLUGIN_PATH is considered a delimited
103
103
    if (None, 'entrypoints') in _env_plugin_path():
104
104
        _load_plugins_from_entrypoints(state)
105
105
    state.plugins = plugins()
106
 
    if warn_load_problems:
107
 
        for plugin, errors in state.plugin_warnings.items():
108
 
            for error in errors:
109
 
                trace.warning('%s', error)
110
106
 
111
107
 
112
108
def _load_plugins_from_entrypoints(state):
193
189
def _env_disable_plugins(key='BRZ_DISABLE_PLUGINS'):
194
190
    """Gives list of names for plugins to disable from environ key."""
195
191
    disabled_names = []
196
 
    env = os.environ.get(key)
 
192
    env = osutils.path_from_environ(key)
197
193
    if env:
198
194
        for name in env.split(os.pathsep):
199
195
            name = _expect_identifier(name, key, env)
205
201
def _env_plugins_at(key='BRZ_PLUGINS_AT'):
206
202
    """Gives list of names and paths of specific plugins from environ key."""
207
203
    plugin_details = []
208
 
    env = os.environ.get(key)
 
204
    env = osutils.path_from_environ(key)
209
205
    if env:
210
206
        for pair in env.split(os.pathsep):
211
207
            if '@' in pair:
226
222
    'path', or None and one of the values 'user', 'core', 'entrypoints', 'site'.
227
223
    """
228
224
    path_details = []
229
 
    env = os.environ.get(key)
 
225
    env = osutils.path_from_environ(key)
230
226
    defaults = {
231
227
        "user": not env,
232
228
        "core": True,