~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/option.py

  • Committer: Jelmer Vernooij
  • Date: 2011-10-05 12:45:41 UTC
  • mfrom: (6190 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20111005124541-chv6scmle72z72gq
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
475
475
    Option.STD_OPTIONS[name] = Option(name, **kwargs)
476
476
    Option.OPTIONS[name] = Option.STD_OPTIONS[name]
477
477
 
 
478
def _standard_list_option(name, **kwargs):
 
479
    """Register a standard option."""
 
480
    # All standard options are implicitly 'global' ones
 
481
    Option.STD_OPTIONS[name] = ListOption(name, **kwargs)
 
482
    Option.OPTIONS[name] = Option.STD_OPTIONS[name]
 
483
 
478
484
 
479
485
def _global_option(name, **kwargs):
480
486
    """Register a global option."""
531
537
# Declare the standard options
532
538
_standard_option('help', short_name='h',
533
539
                 help='Show help message.')
 
540
_standard_option('quiet', short_name='q',
 
541
                 help="Only display errors and warnings.",
 
542
                 custom_callback=_verbosity_level_callback)
534
543
_standard_option('usage',
535
544
                 help='Show usage message and options.')
536
545
_standard_option('verbose', short_name='v',
537
546
                 help='Display more information.',
538
547
                 custom_callback=_verbosity_level_callback)
539
 
_standard_option('quiet', short_name='q',
540
 
                 help="Only display errors and warnings.",
541
 
                 custom_callback=_verbosity_level_callback)
542
548
 
543
549
# Declare commonly used options
544
550
_global_option('all')