/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/export_pot.py

  • Committer: Jelmer Vernooij
  • Date: 2017-08-30 04:41:26 UTC
  • mfrom: (6759.4.7 initialization)
  • Revision ID: jelmer@jelmer.uk-20170830044126-jq95dme3hbybw1qo
Merge lp:~jelmer/brz/initialization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    errors,
38
38
    help_topics,
39
39
    option,
 
40
    plugin as _mod_plugin,
40
41
    help,
41
42
    )
42
43
from .trace import (
250
251
        note(gettext("Exporting messages from builtin command: %s"), cmd_name)
251
252
        _write_command_help(exporter, command)
252
253
 
253
 
    plugins = breezy.global_state.plugins
254
 
    if plugin_name is not None and plugin_name not in breezy.global_state.plugins:
 
254
    plugins = _mod_plugin.plugins()
 
255
    if plugin_name is not None and plugin_name not in plugins:
255
256
        raise errors.BzrError(gettext('Plugin %s is not loaded' % plugin_name))
256
 
    core_plugins = set(name for name in plugins
257
 
        if plugins[name].path().startswith(breezy.__path__[0]))
 
257
    core_plugins = set(
 
258
            name for name in plugins
 
259
            if plugins[name].path().startswith(breezy.__path__[0]))
258
260
    # plugins
259
261
    for cmd_name in _mod_commands.plugin_command_names():
260
262
        command = _mod_commands.get_cmd_object(cmd_name, False)
261
263
        if command.hidden:
262
264
            continue
263
265
        if plugin_name is not None and command.plugin_name() != plugin_name:
264
 
            # if we are exporting plugin commands, skip plugins we have not specified.
 
266
            # if we are exporting plugin commands, skip plugins we have not
 
267
            # specified.
265
268
            continue
266
269
        if plugin_name is None and command.plugin_name() not in core_plugins:
267
270
            # skip non-core plugins