/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-01-26 22:15:58 UTC
  • mto: (2255.1.1 bzr.ab.integration)
  • mto: This revision was merged to the branch mainline in revision 2256.
  • Revision ID: abentley@panoramicfeedback.com-20070126221558-yvlrk159l9ctsn8p
Remove RepositoryFormat.set_default_format, deprecate get_format_type

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    merge as _mod_merge,
38
38
    osutils,
39
39
    repository,
 
40
    symbol_versioning,
40
41
    transport,
41
42
    tree as _mod_tree,
42
43
    ui,
93
94
    return tree, new_list
94
95
 
95
96
 
 
97
@symbol_versioning.deprecated_function(symbol_versioning.zero_fifteen)
96
98
def get_format_type(typestring):
97
99
    """Parse and return a format specifier."""
98
100
    # Have to use BzrDirMetaFormat1 directly, so that
1094
1096
                                 ' formats are: default, knit, metaweave and'
1095
1097
                                 ' weave. Default is knit; metaweave and'
1096
1098
                                 ' weave are deprecated',
 
1099
                            converter=bzrdir.format_registry.make_bzrdir,
1097
1100
                            registry=bzrdir.format_registry,
1098
 
                            converter=get_format_type,
1099
1101
                            value_switches=True),
1100
1102
                     ]
1101
1103
    def run(self, location=None, format=None):
1102
1104
        if format is None:
1103
 
            format = get_format_type('default')
 
1105
            format = bzrdir.format_registry.make_bzrdir('default')
1104
1106
        if location is None:
1105
1107
            location = u'.'
1106
1108
 
1155
1157
                                 ' metaweave and weave. Default is knit;'
1156
1158
                                 ' metaweave and weave are deprecated',
1157
1159
                            registry=bzrdir.format_registry,
1158
 
                            converter=get_format_type,
 
1160
                            converter=bzrdir.format_registry.make_bzrdir,
1159
1161
                            value_switches=True),
1160
1162
                     Option('trees',
1161
1163
                             help='Allows branches in repository to have'
1163
1165
    aliases = ["init-repo"]
1164
1166
    def run(self, location, format=None, trees=False):
1165
1167
        if format is None:
1166
 
            format = get_format_type('default')
 
1168
            format = bzrdir.format_registry.make_bzrdir('default')
1167
1169
 
1168
1170
        if location is None:
1169
1171
            location = '.'
1987
1989
                             ' Default is knit; metaweave and weave are'
1988
1990
                             ' deprecated',
1989
1991
                        registry=bzrdir.format_registry,
1990
 
                        converter=get_format_type,
 
1992
                        converter=bzrdir.format_registry.make_bzrdir,
1991
1993
                        value_switches=True),
1992
1994
                    ]
1993
1995
 
1995
1997
    def run(self, url='.', format=None):
1996
1998
        from bzrlib.upgrade import upgrade
1997
1999
        if format is None:
1998
 
            format = get_format_type('default')
 
2000
            format = bzrdir.format_registry.make_bzrdir('default')
1999
2001
        upgrade(url, format)
2000
2002
 
2001
2003