~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-01-05 21:58:21 UTC
  • mto: This revision was merged to the branch mainline in revision 2240.
  • Revision ID: abentley@panoramicfeedback.com-20070105215821-nur051ztenymnrrr
Implement RegistryOption on init

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
""")
52
52
 
53
53
from bzrlib.commands import Command, display_command
54
 
from bzrlib.option import Option
 
54
from bzrlib.option import Option, RegistryOption
55
55
from bzrlib.progress import DummyProgress, ProgressPhase
56
56
from bzrlib.trace import mutter, note, log_error, warning, is_quiet, info
57
57
 
1084
1084
    """
1085
1085
    takes_args = ['location?']
1086
1086
    takes_options = [
1087
 
                     Option('format', 
 
1087
                     RegistryOption('format', 
1088
1088
                            help='Specify a format for this branch. Current'
1089
1089
                                 ' formats are: default, knit, metaweave and'
1090
1090
                                 ' weave. Default is knit; metaweave and'
1091
1091
                                 ' weave are deprecated',
1092
 
                            type=get_format_type),
 
1092
                            registry=bzrdir.format_registry, 
 
1093
                            converter=get_format_type,
 
1094
                            value_switches=True),
1093
1095
                     ]
1094
1096
    def run(self, location=None, format=None):
1095
1097
        if format is None: