622
622
raise NotImplementedError(self.clone_on_transport)
625
class MetaComponentFormat(object):
625
class ControlComponentFormat(object):
626
626
"""A component that can live inside of a .bzr meta directory."""
628
628
def get_format_string(self):
629
"""The format string to be used."""
629
"""Return the format of this format, if usable in meta directories."""
630
630
raise NotImplementedError(self.get_format_string)
633
class ControlDirComponentFormatRegistry(registry.FormatRegistry):
634
"""A registry for BzrDirMeta components."""
632
def get_format_description(self):
633
"""Return the short description for this format."""
634
raise NotImplementedError(self.get_format_description)
637
class ControlComponentFormatRegistry(registry.FormatRegistry):
638
"""A registry for control components (branch, workingtree, repository)."""
636
640
def __init__(self, other_registry=None):
637
super(ControlDirComponentFormatRegistry, self).__init__(other_registry)
641
super(ControlComponentFormatRegistry, self).__init__(other_registry)
638
642
self._extra_formats = []
640
644
def register(self, format):
641
645
"""Register a new format."""
642
super(ControlDirComponentFormatRegistry, self).register(
646
super(ControlComponentFormatRegistry, self).register(
643
647
format.get_format_string(), format)
645
649
def remove(self, format):
646
650
"""Remove a registered format."""
647
super(ControlDirComponentFormatRegistry, self).remove(
651
super(ControlComponentFormatRegistry, self).remove(
648
652
format.get_format_string())
650
654
def register_extra(self, format):