~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-16 09:33:16 UTC
  • mfrom: (6059.3.6 747050-config-help)
  • Revision ID: pqm@pqm.ubuntu.com-20110816093316-favbhalxcbqwxhuw
(vila) Implement per-config option help (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
 
        # 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'
 
509
        from bzrlib import help_topics
 
510
        result += help_topics._format_see_also(additional_see_also)
520
511
        return result
521
512
 
522
513
    def get_help_topic(self):
523
 
        """Return the modules help topic - its __name__ after bzrlib.plugins.."""
 
514
        """Return the module help topic: its basename."""
524
515
        return self.module.__name__[len('bzrlib.plugins.'):]
525
516
 
526
517