~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-11 19:40:55 UTC
  • mto: (5712.4.12 bzrdir-weave)
  • mto: This revision was merged to the branch mainline in revision 5716.
  • Revision ID: jelmer@canonical.com-20110311194055-l3dcrlv114rmdxk5
Register BzrMetaDir1 as a class in the BzrDir subformat registry. This subformat registry inherits from bzrlib.controldir.network_format_registry, which previously contained classes rather than instances.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1502
1502
    def known_formats(cls):
1503
1503
        result = set()
1504
1504
        for name, format in cls.formats.iteritems():
 
1505
            if callable(format):
 
1506
                format = format()
1505
1507
            result.add(format)
1506
1508
        return result
1507
1509
 
2182
2184
BzrProber.formats.register(BzrDirFormat4.get_format_string(), BzrDirFormat4())
2183
2185
BzrProber.formats.register(BzrDirFormat5.get_format_string(), BzrDirFormat5())
2184
2186
BzrProber.formats.register(BzrDirFormat6.get_format_string(), BzrDirFormat6())
2185
 
__default_format = BzrDirMetaFormat1()
2186
 
BzrProber.formats.register(__default_format.get_format_string(), __default_format)
2187
 
controldir.ControlDirFormat._default_format = __default_format
 
2187
BzrProber.formats.register(BzrDirMetaFormat1.get_format_string(),
 
2188
    BzrDirMetaFormat1)
 
2189
controldir.ControlDirFormat._default_format = BzrDirMetaFormat1()
2188
2190
 
2189
2191
 
2190
2192
class ConvertBzrDir4To5(controldir.Converter):