~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

Abbreviate pack_stat struct format to '>6L'

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    errors,
49
49
    trace,
50
50
    )
 
51
from bzrlib.i18n import gettext
51
52
from bzrlib import plugins as _mod_plugins
52
53
""")
53
54
 
137
138
        try:
138
139
            name, path = spec.split('@')
139
140
        except ValueError:
140
 
            raise errors.BzrCommandError(
141
 
                '"%s" is not a valid <plugin_name>@<plugin_path> description '
 
141
            raise errors.BzrCommandError(gettext(
 
142
                '"%s" is not a valid <plugin_name>@<plugin_path> description ')
142
143
                % spec)
143
144
        specs.append((name, path))
144
145
    return specs
272
273
    """Load bzrlib plugins.
273
274
 
274
275
    The environment variable BZR_PLUGIN_PATH is considered a delimited
275
 
    set of paths to look through. Each entry is searched for *.py
 
276
    set of paths to look through. Each entry is searched for `*.py`
276
277
    files (and whatever other extensions are used in the platform,
277
 
    such as *.pyd).
 
278
    such as `*.pyd`).
278
279
 
279
280
    load_from_path() provides the underlying mechanism and is called with
280
281
    the default directory list to provide the normal behaviour.
506
507
            result = self.module.__doc__
507
508
        if result[-1] != '\n':
508
509
            result += '\n'
509
 
        # there is code duplicated here and in bzrlib/help_topic.py's
510
 
        # matching Topic code. This should probably be factored in
511
 
        # to a helper function and a common base class.
512
 
        if additional_see_also is not None:
513
 
            see_also = sorted(set(additional_see_also))
514
 
        else:
515
 
            see_also = None
516
 
        if see_also:
517
 
            result += 'See also: '
518
 
            result += ', '.join(see_also)
519
 
            result += '\n'
 
510
        from bzrlib import help_topics
 
511
        result += help_topics._format_see_also(additional_see_also)
520
512
        return result
521
513
 
522
514
    def get_help_topic(self):
523
 
        """Return the modules help topic - its __name__ after bzrlib.plugins.."""
 
515
        """Return the module help topic: its basename."""
524
516
        return self.module.__name__[len('bzrlib.plugins.'):]
525
517
 
526
518