~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-19 08:21:17 UTC
  • mfrom: (2425.1.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070419082117-znciscush3qbaky1
(robertc) Merge see-also support for command help. (Robert Collins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
        if self.__doc__ == Command.__doc__:
234
234
            warn("No help message set for %r" % self)
235
235
 
 
236
    def get_see_also(self):
 
237
        """Return a list of help topics that are related to this ommand.
 
238
        
 
239
        The list is derived from the content of the _see_also attribute. Any
 
240
        duplicates are removed and the result is in lexical order.
 
241
        :return: A list of help topics.
 
242
        """
 
243
        return sorted(set(getattr(self, '_see_also', [])))
 
244
 
236
245
    def options(self):
237
246
        """Return dict of valid options for this command.
238
247