/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: Breezy landing bot
  • Author(s): Martin
  • Date: 2017-06-05 01:55:02 UTC
  • mfrom: (6651.4.3 plugin_rewrite)
  • Revision ID: breezy.the.bot@gmail.com-20170605015502-tqiyvpz3qt00fge1
Rewrite of plugin module

Merged from https://code.launchpad.net/~gz/brz/plugin_rewrite/+merge/325033

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import inspect
32
32
import os
33
33
 
 
34
import breezy
34
35
from . import (
35
36
    commands as _mod_commands,
36
37
    errors,
37
38
    help_topics,
38
39
    option,
39
 
    plugin,
40
40
    help,
41
41
    )
42
42
from .trace import (
238
238
    This respects the Bazaar cmdtable/table convention and will
239
239
    only extract docstrings from functions mentioned in these tables.
240
240
    """
241
 
    from glob import glob
242
241
 
243
242
    # builtin commands
244
243
    for cmd_name in _mod_commands.builtin_command_names():
251
250
        note(gettext("Exporting messages from builtin command: %s"), cmd_name)
252
251
        _write_command_help(exporter, command)
253
252
 
254
 
    plugin_path = plugin.get_core_plugin_path()
255
 
    core_plugins = glob(plugin_path + '/*/__init__.py')
256
 
    core_plugins = [os.path.basename(os.path.dirname(p))
257
 
                        for p in core_plugins]
 
253
    plugins = breezy.global_state.plugins
 
254
    core_plugins = set(name for name in plugins
 
255
        if plugins[name].path().startswith(breezy.__path__[0]))
258
256
    # plugins
259
257
    for cmd_name in _mod_commands.plugin_command_names():
260
258
        command = _mod_commands.get_cmd_object(cmd_name, False)