46
46
def register_formats():
47
if getattr(_mod_branch, 'MetaDirBranchFormatFactory', None):
48
branch_formats = [_mod_branch.MetaDirBranchFormatFactory(format_string,
49
"bzrlib.plugins.loom.branch", format_class) for
50
(format_string, format_class) in _LOOM_FORMATS.iteritems()]
52
# Compat for folk not running bleeding edge. Like me as I commit this.
55
branch.BzrBranchLoomFormat1(),
56
branch.BzrBranchLoomFormat6(),
57
branch.BzrBranchLoomFormat7(),
60
format_registry = getattr(_mod_branch, 'format_registry')
61
register = format_registry.register
62
except AttributeError: # bzr < 2.4
63
register = _mod_branch.BranchFormat.register_format
65
map(register, branch_formats)
47
branch_formats = [_mod_branch.MetaDirBranchFormatFactory(format_string,
48
"bzrlib.plugins.loom.branch", format_class) for
49
(format_string, format_class) in _LOOM_FORMATS.iteritems()]
50
format_registry = getattr(_mod_branch, 'format_registry')
51
map(format_registry.register, branch_formats)
68
54
def require_loom_branch(branch):