~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-17 18:13:57 UTC
  • mfrom: (5268.7.29 transport-segments)
  • Revision ID: pqm@pqm.ubuntu.com-20110817181357-y5q5eth1hk8bl3om
(jelmer) Allow specifying the colocated branch to use in the branch URL,
 and retrieving the branch name using ControlDir._get_selected_branch.
 (Jelmer Vernooij)

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