~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit_signature_commands.py

  • Committer: Jonathan Riddell
  • Date: 2011-06-22 12:23:03 UTC
  • mto: This revision was merged to the branch mainline in revision 6003.
  • Revision ID: jriddell@canonical.com-20110622122303-esr4qqrl63fva5bz
add an option for acceptable_keys in config, also make config docs match reality for signature options

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        branch = bzrdir.open_branch()
122
122
        repo = branch.repository
123
123
        branch_config = branch.get_config()
124
 
 
125
124
        gpg_strategy = gpg.GPGStrategy(branch_config)
126
 
        if acceptable_keys is not None:
 
125
 
 
126
        acceptable_keys_config = branch_config.acceptable_keys()
 
127
        try:
 
128
            acceptable_keys_config = str(acceptable_keys_config)
 
129
        except UnicodeEncodeError:
 
130
            raise errors.BzrCommandError('Only ASCII permitted in option names')
 
131
 
 
132
        if acceptable_keys_config is not None:
 
133
            gpg_strategy.set_acceptable_keys(acceptable_keys_config)
 
134
        if acceptable_keys is not None: #command line overrides config
127
135
            gpg_strategy.set_acceptable_keys(acceptable_keys)
128
136
 
129
137
        count = {gpg.SIGNATURE_VALID: 0,