~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Robert Collins
  • Date: 2010-06-21 01:30:45 UTC
  • mfrom: (5309 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5310.
  • Revision ID: robertc@robertcollins.net-20100621013045-s59nfjps3rkcn53j
Merge trunk to fix NEWS sections.

Show diffs side-by-side

added added

removed removed

Lines of Context:
397
397
            will not mangled.
398
398
 
399
399
    :cvar hooks: An instance of CommandHooks.
 
400
    :ivar __doc__: The help shown by 'bzr help command' for this command.
 
401
        This is set by assigning explicitly to __doc__ so that -OO can
 
402
        be used::
 
403
 
 
404
        class Foo(Command):
 
405
            __doc__ = "My help goes here"
400
406
    """
401
407
    aliases = []
402
408
    takes_args = []
407
413
 
408
414
    def __init__(self):
409
415
        """Construct an instance of this command."""
410
 
        if self.__doc__ == Command.__doc__:
411
 
            warn("No help message set for %r" % self)
412
416
        # List of standard options directly supported
413
417
        self.supported_std_options = []
414
418
        self._setup_run()
482
486
            message explaining how to obtain full help.
483
487
        """
484
488
        doc = self.help()
485
 
        if doc is None:
486
 
            raise NotImplementedError("sorry, no detailed help yet for %r" % self.name())
 
489
        if not doc:
 
490
            doc = "No help for this command."
487
491
 
488
492
        # Extract the summary (purpose) and sections out from the text
489
493
        purpose,sections,order = self._get_help_parts(doc)