~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Patch Queue Manager
  • Date: 2011-10-09 13:52:06 UTC
  • mfrom: (6202.1.3 revno-revision)
  • Revision ID: pqm@pqm.ubuntu.com-20111009135206-t3utsln6mtzv9eut
(jelmer) Add a --revision argument to 'bzr revno'. (Jelmer Vernooij)

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
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