43
40
check_signatures= as above
44
41
create_signatures= as above.
45
validate_signatures_in_log=as above
46
acceptable_keys=as above
48
43
explanation of options
49
44
----------------------
50
45
editor - this option sets the pop up editor to use during commits.
51
46
email - this option sets the user id bzr will use when committing.
52
check_signatures - this option will control whether bzr will require good gpg
47
check_signatures - this option controls whether bzr will require good gpg
53
48
signatures, ignore them, or check them if they are
54
present. Currently it is unused except that check_signatures
55
turns on create_signatures.
56
50
create_signatures - this option controls whether bzr will always create
57
gpg signatures or not on commits. There is an unused
58
option which in future is expected to work if
59
branch settings require signatures.
51
gpg signatures, never create them, or create them if the
52
branch is configured to require them.
60
53
log_format - this option sets the default log format. Possible values are
61
54
long, short, line, or a plugin can register new formats.
62
validate_signatures_in_log - show GPG signature validity in log output
63
acceptable_keys - comma separated list of key patterns acceptable for
64
verify-signatures command
66
56
In bazaar.conf you can also define aliases in the ALIASES sections, example
438
427
"""See log_format()."""
441
def validate_signatures_in_log(self):
442
"""Show GPG signature validity in log"""
443
result = self._validate_signatures_in_log()
450
def _validate_signatures_in_log(self):
451
"""See validate_signatures_in_log()."""
454
def acceptable_keys(self):
455
"""Comma separated list of key patterns acceptable to
456
verify-signatures command"""
457
result = self._acceptable_keys()
460
def _acceptable_keys(self):
461
"""See acceptable_keys()."""
464
430
def post_commit(self):
465
431
"""An ordered list of python functions to call.
2274
2216
value, in which config files it can be stored, etc (TBC).
2277
def __init__(self, name, default=None, help=None):
2219
def __init__(self, name, default=None):
2278
2220
self.name = name
2279
2221
self.default = default
2282
2223
def get_default(self):
2283
2224
return self.default
2286
class OptionRegistry(registry.Registry):
2287
"""Register config options by their name.
2289
This overrides ``registry.Registry`` to simplify registration by acquiring
2290
some information from the option object itself.
2293
def register(self, option):
2294
"""Register a new option to its name.
2296
:param option: The option to register. Its name is used as the key.
2298
super(OptionRegistry, self).register(option.name, option,
2301
def register_lazy(self, key, module_name, member_name):
2302
"""Register a new option to be loaded on request.
2304
:param key: This is the key to use to request the option later. Since
2305
the registration is lazy, it should be provided and match the
2308
:param module_name: The python path to the module. Such as 'os.path'.
2310
:param member_name: The member of the module to return. If empty or
2311
None, get() will return the module itself.
2313
super(OptionRegistry, self).register_lazy(key,
2314
module_name, member_name)
2316
def get_help(self, key=None):
2317
"""Get the help text associated with the given key"""
2318
option = self.get(key)
2319
the_help = option.help
2320
if callable(the_help):
2321
return the_help(self, key)
2325
option_registry = OptionRegistry()
2328
# Registered options in lexicographical order
2330
option_registry.register(
2331
Option('dirstate.fdatasync', default=True,
2333
Flush dirstate changes onto physical disk?
2335
If true (default), working tree metadata changes are flushed through the
2336
OS buffers to physical disk. This is somewhat slower, but means data
2337
should not be lost if the machine crashes. See also repository.fdatasync.
2339
option_registry.register(
2340
Option('default_format', default='2a',
2341
help='Format used when creating branches.'))
2342
option_registry.register(
2344
help='The command called to launch an editor to enter a message.'))
2345
option_registry.register(
2347
help='Language to translate messages into.'))
2348
option_registry.register(
2349
Option('output_encoding',
2350
help= 'Unicode encoding for output'
2351
' (terminal encoding if not specified).'))
2352
option_registry.register(
2353
Option('repository.fdatasync', default=True,
2355
Flush repository changes onto physical disk?
2357
If true (default), repository changes are flushed through the OS buffers
2358
to physical disk. This is somewhat slower, but means data should not be
2359
lost if the machine crashes. See also dirstate.fdatasync.
2229
option_registry = registry.Registry()
2232
option_registry.register(
2233
'editor', Option('editor'),
2234
help='The command called to launch an editor to enter a message.')
2363
2237
class Section(object):