~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

Use registry default key.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2555
2555
class RegistryOption(Option):
2556
2556
    """Option for a choice from a registry."""
2557
2557
 
2558
 
    def __init__(self, name, registry, default=None, default_from_env=None,
 
2558
    def __init__(self, name, registry, default_from_env=None,
2559
2559
                 help=None, invalid=None):
2560
2560
        """A registry based Option definition.
2561
2561
 
2563
2563
        can take quoting into account.
2564
2564
        """
2565
2565
        super(RegistryOption, self).__init__(
2566
 
            name, default=default, default_from_env=default_from_env,
 
2566
            name, default=lambda: unicode(registry.default_key),
 
2567
            default_from_env=default_from_env,
2567
2568
            from_unicode=self.from_unicode, help=help,
2568
2569
            invalid=invalid, unquote=False)
2569
2570
        self.registry = registry