~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-07 12:59:07 UTC
  • mto: This revision was merged to the branch mainline in revision 6466.
  • Revision ID: jelmer@samba.org-20120207125907-8nq0ng38wwmnucfy
Use bool_from_store, fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
508
508
    info = _get_package_branch_info(the_branch.base)
509
509
    if info is None:
510
510
        return
511
 
    c = the_branch.get_configs_stack()
 
511
    c = the_branch.get_config_stack()
512
512
    verbosity = c.get('launchpad.packaging_verbosity')
513
513
    if not verbosity:
514
514
        trace.mutter('not checking %s because verbosity is turned off'
577
577
    _launchpad_help,
578
578
    'Using Bazaar with Launchpad.net')
579
579
 
580
 
def packaging_verbosity_from_store(text):
581
 
    if text.lower() == 'off':
582
 
        return False
583
 
    return True
584
 
 
585
580
_mod_config.option_registry.register(
586
 
    Option('launchpad.packaging_verbosity', default=None,
587
 
          from_unicode=packaging_verbosity_from_store,
 
581
    _mod_config.Option('launchpad.packaging_verbosity', default=True,
 
582
          from_unicode=_mod_config.bool_from_store,
588
583
          help="""\
589
584
Whether to warn if a UDD package import branch is accessed that is out of date.
590
585
 
591
586
Setting this option to 'off' will disable verbosity.
592
587
"""))
593
588
_mod_config.option_registry.register(
594
 
    Option('launchpad_username', default=None,
 
589
    _mod_config.Option('launchpad_username', default=None,
595
590
        help="The username to login with when conneting to Launchpad."))