/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/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-02-02 06:10:04 UTC
  • mfrom: (2255.1.1 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070202061004-5fdd6c2715ccaaa9
remove default repository format, deprecate get_format_type

Show diffs side-by-side

added added

removed removed

Lines of Context:
1190
1190
            raise errors.UnknownFormatError(format=format_string)
1191
1191
 
1192
1192
    @classmethod
1193
 
    @deprecated_method(symbol_versioning.zero_fourteen)
1194
 
    def set_default_format(klass, format):
1195
 
        klass._set_default_format(format)
1196
 
 
1197
 
    @classmethod
1198
 
    def _set_default_format(klass, format):
1199
 
        """Set the default format for new Repository creation.
1200
 
 
1201
 
        The format must already be registered.
1202
 
        """
1203
 
        format_registry.default_key = format.get_format_string()
1204
 
 
1205
 
    @classmethod
1206
1193
    def register_format(klass, format):
1207
1194
        format_registry.register(format.get_format_string(), format)
1208
1195
 
1213
1200
    @classmethod
1214
1201
    def get_default_format(klass):
1215
1202
        """Return the current default format."""
1216
 
        return format_registry.get(format_registry.default_key)
 
1203
        from bzrlib import bzrdir
 
1204
        return bzrdir.format_registry.make_bzrdir('default').repository_format
1217
1205
 
1218
1206
    def _get_control_store(self, repo_transport, control_files):
1219
1207
        """Return the control store for this repository."""
1819
1807
# formats which have no format string are not discoverable
1820
1808
# and not independently creatable, so are not registered.
1821
1809
RepositoryFormat.register_format(RepositoryFormat7())
1822
 
# KEEP in sync with bzrdir.format_registry default, which controls the overall
1823
 
# default control directory format
1824
 
_default_format = RepositoryFormatKnit1()
1825
 
RepositoryFormat.register_format(_default_format)
 
1810
# KEEP in sync with bzrdir.format_registry default
 
1811
RepositoryFormat.register_format(RepositoryFormatKnit1())
1826
1812
RepositoryFormat.register_format(RepositoryFormatKnit2())
1827
 
RepositoryFormat._set_default_format(_default_format)
1828
1813
_legacy_formats = [RepositoryFormat4(),
1829
1814
                   RepositoryFormat5(),
1830
1815
                   RepositoryFormat6()]