~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Vincent Ladeuil
  • Date: 2011-08-15 07:20:04 UTC
  • mfrom: (6015.9.12 2.4)
  • mto: This revision was merged to the branch mainline in revision 6070.
  • Revision ID: v.ladeuil+lp@free.fr-20110815072004-qpjh00pbf9vrh1n6
Merge 2.4 into trunk

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