~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-09 12:34:00 UTC
  • mfrom: (6056.2.5 option-registry)
  • Revision ID: pqm@pqm.ubuntu.com-20110809123400-x521f2j9jkxx8ze2
(vila) Introduce OptionRegistry (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
506
506
            result = self.module.__doc__
507
507
        if result[-1] != '\n':
508
508
            result += '\n'
509
 
        from bzrlib import help_topics
510
 
        result += help_topics._format_see_also(additional_see_also)
 
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'
511
520
        return result
512
521
 
513
522
    def get_help_topic(self):
514
 
        """Return the module help topic: its basename."""
 
523
        """Return the modules help topic - its __name__ after bzrlib.plugins.."""
515
524
        return self.module.__name__[len('bzrlib.plugins.'):]
516
525
 
517
526