~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Jonathan Riddell
  • Date: 2011-06-22 11:20:03 UTC
  • mto: This revision was merged to the branch mainline in revision 6003.
  • Revision ID: jriddell@canonical.com-20110622112003-fnwrezf919ofbwij
add a config option to validate signatures

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
create_signatures=always|never|when-required(default)
30
30
gpg_signing_command=name-of-program
31
31
log_format=name-of-format
 
32
validate_signatures_in_log=true|false(default)
32
33
 
33
34
in locations.conf, you specify the url of a branch and options for it.
34
35
Wildcards may be used - * and ? as normal in shell completion. Options
39
40
email= as above
40
41
check_signatures= as above
41
42
create_signatures= as above.
 
43
validate_signatures_in_log=as above
42
44
 
43
45
explanation of options
44
46
----------------------
52
54
                    branch is configured to require them.
53
55
log_format - this option sets the default log format.  Possible values are
54
56
             long, short, line, or a plugin can register new formats.
 
57
validate_signatures_in_log - show GPG signature validity in log output
55
58
 
56
59
In bazaar.conf you can also define aliases in the ALIASES sections, example
57
60
 
427
430
        """See log_format()."""
428
431
        return None
429
432
 
 
433
    def validate_signatures_in_log(self):
 
434
        """Show GPG signature validity in log"""
 
435
        result = self._validate_signatures_in_log()
 
436
        if result == "true":
 
437
            result = True
 
438
        else:
 
439
            result = False
 
440
        return result
 
441
 
 
442
    def _validate_signatures_in_log(self):
 
443
        """See validate_signatures_in_log()."""
 
444
        return None
 
445
 
430
446
    def post_commit(self):
431
447
        """An ordered list of python functions to call.
432
448
 
830
846
        """See Config.log_format."""
831
847
        return self._get_user_option('log_format')
832
848
 
 
849
    def _validate_signatures_in_log(self):
 
850
        """See Config.log_format."""
 
851
        return self._get_user_option('validate_signatures_in_log')
 
852
 
833
853
    def _post_commit(self):
834
854
        """See Config.post_commit."""
835
855
        return self._get_user_option('post_commit')
1410
1430
        """See Config.log_format."""
1411
1431
        return self._get_best_value('_log_format')
1412
1432
 
 
1433
    def _validate_signatures_in_log(self):
 
1434
        """See Config.validate_signatures_in_log."""
 
1435
        return self._get_best_value('_validate_signatures_in_log')
 
1436
 
1413
1437
 
1414
1438
def ensure_config_dir_exists(path=None):
1415
1439
    """Make sure a configuration directory exists.