~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/controldir.py

  • Committer: Jelmer Vernooij
  • Date: 2011-02-24 12:17:19 UTC
  • mto: (5676.1.5 per_interrepo-extra)
  • mto: This revision was merged to the branch mainline in revision 5686.
  • Revision ID: jelmer@samba.org-20110224121719-nvhwz19krifo3xov
Consistent naming.

Show diffs side-by-side

added added

removed removed

Lines of Context:
622
622
        raise NotImplementedError(self.clone_on_transport)
623
623
 
624
624
 
625
 
class MetaComponentFormat(object):
 
625
class ControlComponentFormat(object):
626
626
    """A component that can live inside of a .bzr meta directory."""
627
627
 
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)
631
631
 
632
 
 
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)
 
635
 
 
636
 
 
637
class ControlComponentFormatRegistry(registry.FormatRegistry):
 
638
    """A registry for control components (branch, workingtree, repository)."""
635
639
 
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 = []
639
643
 
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)
644
648
 
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())
649
653
 
650
654
    def register_extra(self, format):