~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    osutils,
49
49
    transactions,
50
50
    xml5,
 
51
    xml6,
51
52
    xml7,
52
53
    )
53
54
 
1811
1812
    _serializer = xml5.serializer_v5
1812
1813
 
1813
1814
    def _get_matching_bzrdir(self):
1814
 
        return bzrdir.format_registry.make_bzrdir('knitpack-experimental')
 
1815
        return bzrdir.format_registry.make_bzrdir('pack-0.92')
1815
1816
 
1816
1817
    def _ignore_setting_bzrdir(self, format):
1817
1818
        pass
1848
1849
 
1849
1850
    def _get_matching_bzrdir(self):
1850
1851
        return bzrdir.format_registry.make_bzrdir(
1851
 
            'knitpack-subtree-experimental')
 
1852
            'pack-0.92-subtree')
1852
1853
 
1853
1854
    def _ignore_setting_bzrdir(self, format):
1854
1855
        pass
1870
1871
    def get_format_description(self):
1871
1872
        """See RepositoryFormat.get_format_description()."""
1872
1873
        return "Packs containing knits with subtree support\n"
 
1874
 
 
1875
 
 
1876
class RepositoryFormatKnitPack4(RepositoryFormatPack):
 
1877
    """A rich-root, no subtrees parameterised Pack repository.
 
1878
 
 
1879
    This repository format uses the xml6 serializer to get:
 
1880
     - support for recording full info about the tree root
 
1881
 
 
1882
    This format was introduced in 1.0.
 
1883
    """
 
1884
 
 
1885
    repository_class = KnitPackRepository
 
1886
    _commit_builder_class = PackRootCommitBuilder
 
1887
    rich_root_data = True
 
1888
    supports_tree_reference = False
 
1889
    _serializer = xml6.serializer_v6
 
1890
 
 
1891
    def _get_matching_bzrdir(self):
 
1892
        return bzrdir.format_registry.make_bzrdir(
 
1893
            'rich-root-pack')
 
1894
 
 
1895
    def _ignore_setting_bzrdir(self, format):
 
1896
        pass
 
1897
 
 
1898
    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
 
1899
 
 
1900
    def check_conversion_target(self, target_format):
 
1901
        if not target_format.rich_root_data:
 
1902
            raise errors.BadConversionTarget(
 
1903
                'Does not support rich root data.', target_format)
 
1904
 
 
1905
    def get_format_string(self):
 
1906
        """See RepositoryFormat.get_format_string()."""
 
1907
        return ("Bazaar pack repository format 1 with rich root"
 
1908
                " (needs bzr 1.0)\n")
 
1909
 
 
1910
    def get_format_description(self):
 
1911
        """See RepositoryFormat.get_format_description()."""
 
1912
        return "Packs containing knits with rich root support\n"