~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-10 16:03:37 UTC
  • mto: (5712.4.8 bzrdir-weave)
  • mto: This revision was merged to the branch mainline in revision 5716.
  • Revision ID: jelmer@samba.org-20110310160337-ty8sw12y2s8nqvd7
Add Prober.known_formats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1746
1746
        """Register a new BzrDir format.
1747
1747
        """
1748
1748
        BzrProber.formats.register(format.get_format_string(), format)
1749
 
        controldir.ControlDirFormat.register_format(
1750
 
            format.get_format_string(), format)
1751
 
 
1752
 
    @classmethod
1753
 
    def register_lazy_format(klass, format_string, module_name, member_name):
1754
 
        """Lazily register a new BzrDir format.
1755
 
 
1756
 
        :param format_string: Format string
1757
 
        :param module_name: Name of module with the BzrDirFormat subclass
1758
 
        :param member_name: Class name of the BzrDirFormat
1759
 
        """
1760
 
        BzrProber.formats.register_lazy(format_string, module_name,
1761
 
            member_name)
1762
 
        controldir.ControlDirFormat.register_lazy_format(format_string,
1763
 
            module_name, member_name)
1764
1749
 
1765
1750
    def _supply_sub_formats_to(self, other_format):
1766
1751
        """Give other_format the same values for sub formats as this has.
1777
1762
    @classmethod
1778
1763
    def unregister_format(klass, format):
1779
1764
        BzrProber.formats.remove(format.get_format_string())
1780
 
        controldir.ControlDirFormat.unregister_format(format.get_format_string())
1781
1765
 
1782
1766
 
1783
1767
class BzrDirFormat4(BzrDirFormat):