2601
2593
_serializer=self._serializer)
2604
class RepositoryFormatKnitPack1(RepositoryFormatPack):
2605
"""A no-subtrees parameterized Pack repository.
2607
This format was introduced in 0.92.
2610
repository_class = KnitPackRepository
2611
_commit_builder_class = PackCommitBuilder
2613
def _serializer(self):
2614
return xml5.serializer_v5
2615
# What index classes to use
2616
index_builder_class = InMemoryGraphIndex
2617
index_class = GraphIndex
2619
def _get_matching_bzrdir(self):
2620
return bzrdir.format_registry.make_bzrdir('pack-0.92')
2622
def _ignore_setting_bzrdir(self, format):
2625
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2627
def get_format_string(self):
2628
"""See RepositoryFormat.get_format_string()."""
2629
return "Bazaar pack repository format 1 (needs bzr 0.92)\n"
2631
def get_format_description(self):
2632
"""See RepositoryFormat.get_format_description()."""
2633
return "Packs containing knits without subtree support"
2636
class RepositoryFormatKnitPack3(RepositoryFormatPack):
2637
"""A subtrees parameterized Pack repository.
2639
This repository format uses the xml7 serializer to get:
2640
- support for recording full info about the tree root
2641
- support for recording tree-references
2643
This format was introduced in 0.92.
2646
repository_class = KnitPackRepository
2647
_commit_builder_class = PackRootCommitBuilder
2648
rich_root_data = True
2650
supports_tree_reference = True
2652
def _serializer(self):
2653
return xml7.serializer_v7
2654
# What index classes to use
2655
index_builder_class = InMemoryGraphIndex
2656
index_class = GraphIndex
2658
def _get_matching_bzrdir(self):
2659
return bzrdir.format_registry.make_bzrdir(
2660
'pack-0.92-subtree')
2662
def _ignore_setting_bzrdir(self, format):
2665
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2667
def get_format_string(self):
2668
"""See RepositoryFormat.get_format_string()."""
2669
return "Bazaar pack repository format 1 with subtree support (needs bzr 0.92)\n"
2671
def get_format_description(self):
2672
"""See RepositoryFormat.get_format_description()."""
2673
return "Packs containing knits with subtree support\n"
2676
class RepositoryFormatKnitPack4(RepositoryFormatPack):
2677
"""A rich-root, no subtrees parameterized Pack repository.
2679
This repository format uses the xml6 serializer to get:
2680
- support for recording full info about the tree root
2682
This format was introduced in 1.0.
2685
repository_class = KnitPackRepository
2686
_commit_builder_class = PackRootCommitBuilder
2687
rich_root_data = True
2688
supports_tree_reference = False
2690
def _serializer(self):
2691
return xml6.serializer_v6
2692
# What index classes to use
2693
index_builder_class = InMemoryGraphIndex
2694
index_class = GraphIndex
2696
def _get_matching_bzrdir(self):
2697
return bzrdir.format_registry.make_bzrdir(
2700
def _ignore_setting_bzrdir(self, format):
2703
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2705
def get_format_string(self):
2706
"""See RepositoryFormat.get_format_string()."""
2707
return ("Bazaar pack repository format 1 with rich root"
2708
" (needs bzr 1.0)\n")
2710
def get_format_description(self):
2711
"""See RepositoryFormat.get_format_description()."""
2712
return "Packs containing knits with rich root support\n"
2715
class RepositoryFormatKnitPack5(RepositoryFormatPack):
2716
"""Repository that supports external references to allow stacking.
2720
Supports external lookups, which results in non-truncated ghosts after
2721
reconcile compared to pack-0.92 formats.
2724
repository_class = KnitPackRepository
2725
_commit_builder_class = PackCommitBuilder
2726
supports_external_lookups = True
2727
# What index classes to use
2728
index_builder_class = InMemoryGraphIndex
2729
index_class = GraphIndex
2732
def _serializer(self):
2733
return xml5.serializer_v5
2735
def _get_matching_bzrdir(self):
2736
return bzrdir.format_registry.make_bzrdir('1.6')
2738
def _ignore_setting_bzrdir(self, format):
2741
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2743
def get_format_string(self):
2744
"""See RepositoryFormat.get_format_string()."""
2745
return "Bazaar RepositoryFormatKnitPack5 (bzr 1.6)\n"
2747
def get_format_description(self):
2748
"""See RepositoryFormat.get_format_description()."""
2749
return "Packs 5 (adds stacking support, requires bzr 1.6)"
2752
class RepositoryFormatKnitPack5RichRoot(RepositoryFormatPack):
2753
"""A repository with rich roots and stacking.
2755
New in release 1.6.1.
2757
Supports stacking on other repositories, allowing data to be accessed
2758
without being stored locally.
2761
repository_class = KnitPackRepository
2762
_commit_builder_class = PackRootCommitBuilder
2763
rich_root_data = True
2764
supports_tree_reference = False # no subtrees
2765
supports_external_lookups = True
2766
# What index classes to use
2767
index_builder_class = InMemoryGraphIndex
2768
index_class = GraphIndex
2771
def _serializer(self):
2772
return xml6.serializer_v6
2774
def _get_matching_bzrdir(self):
2775
return bzrdir.format_registry.make_bzrdir(
2778
def _ignore_setting_bzrdir(self, format):
2781
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2783
def get_format_string(self):
2784
"""See RepositoryFormat.get_format_string()."""
2785
return "Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6.1)\n"
2787
def get_format_description(self):
2788
return "Packs 5 rich-root (adds stacking support, requires bzr 1.6.1)"
2791
class RepositoryFormatKnitPack5RichRootBroken(RepositoryFormatPack):
2792
"""A repository with rich roots and external references.
2796
Supports external lookups, which results in non-truncated ghosts after
2797
reconcile compared to pack-0.92 formats.
2799
This format was deprecated because the serializer it uses accidentally
2800
supported subtrees, when the format was not intended to. This meant that
2801
someone could accidentally fetch from an incorrect repository.
2804
repository_class = KnitPackRepository
2805
_commit_builder_class = PackRootCommitBuilder
2806
rich_root_data = True
2807
supports_tree_reference = False # no subtrees
2809
supports_external_lookups = True
2810
# What index classes to use
2811
index_builder_class = InMemoryGraphIndex
2812
index_class = GraphIndex
2815
def _serializer(self):
2816
return xml7.serializer_v7
2818
def _get_matching_bzrdir(self):
2819
matching = bzrdir.format_registry.make_bzrdir(
2821
matching.repository_format = self
2824
def _ignore_setting_bzrdir(self, format):
2827
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2829
def get_format_string(self):
2830
"""See RepositoryFormat.get_format_string()."""
2831
return "Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)\n"
2833
def get_format_description(self):
2834
return ("Packs 5 rich-root (adds stacking support, requires bzr 1.6)"
2837
def is_deprecated(self):
2841
class RepositoryFormatKnitPack6(RepositoryFormatPack):
2842
"""A repository with stacking and btree indexes,
2843
without rich roots or subtrees.
2845
This is equivalent to pack-1.6 with B+Tree indices.
2848
repository_class = KnitPackRepository
2849
_commit_builder_class = PackCommitBuilder
2850
supports_external_lookups = True
2851
# What index classes to use
2852
index_builder_class = btree_index.BTreeBuilder
2853
index_class = btree_index.BTreeGraphIndex
2856
def _serializer(self):
2857
return xml5.serializer_v5
2859
def _get_matching_bzrdir(self):
2860
return bzrdir.format_registry.make_bzrdir('1.9')
2862
def _ignore_setting_bzrdir(self, format):
2865
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2867
def get_format_string(self):
2868
"""See RepositoryFormat.get_format_string()."""
2869
return "Bazaar RepositoryFormatKnitPack6 (bzr 1.9)\n"
2871
def get_format_description(self):
2872
"""See RepositoryFormat.get_format_description()."""
2873
return "Packs 6 (uses btree indexes, requires bzr 1.9)"
2876
class RepositoryFormatKnitPack6RichRoot(RepositoryFormatPack):
2877
"""A repository with rich roots, no subtrees, stacking and btree indexes.
2879
1.6-rich-root with B+Tree indices.
2882
repository_class = KnitPackRepository
2883
_commit_builder_class = PackRootCommitBuilder
2884
rich_root_data = True
2885
supports_tree_reference = False # no subtrees
2886
supports_external_lookups = True
2887
# What index classes to use
2888
index_builder_class = btree_index.BTreeBuilder
2889
index_class = btree_index.BTreeGraphIndex
2892
def _serializer(self):
2893
return xml6.serializer_v6
2895
def _get_matching_bzrdir(self):
2896
return bzrdir.format_registry.make_bzrdir(
2899
def _ignore_setting_bzrdir(self, format):
2902
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2904
def get_format_string(self):
2905
"""See RepositoryFormat.get_format_string()."""
2906
return "Bazaar RepositoryFormatKnitPack6RichRoot (bzr 1.9)\n"
2908
def get_format_description(self):
2909
return "Packs 6 rich-root (uses btree indexes, requires bzr 1.9)"
2912
class RepositoryFormatPackDevelopment2Subtree(RepositoryFormatPack):
2913
"""A subtrees development repository.
2915
This format should be retained in 2.3, to provide an upgrade path from this
2916
to RepositoryFormat2aSubtree. It can be removed in later releases.
2918
1.6.1-subtree[as it might have been] with B+Tree indices.
2921
repository_class = KnitPackRepository
2922
_commit_builder_class = PackRootCommitBuilder
2923
rich_root_data = True
2925
supports_tree_reference = True
2926
supports_external_lookups = True
2927
# What index classes to use
2928
index_builder_class = btree_index.BTreeBuilder
2929
index_class = btree_index.BTreeGraphIndex
2932
def _serializer(self):
2933
return xml7.serializer_v7
2935
def _get_matching_bzrdir(self):
2936
return bzrdir.format_registry.make_bzrdir(
2937
'development5-subtree')
2939
def _ignore_setting_bzrdir(self, format):
2942
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
2944
def get_format_string(self):
2945
"""See RepositoryFormat.get_format_string()."""
2946
return ("Bazaar development format 2 with subtree support "
2947
"(needs bzr.dev from before 1.8)\n")
2949
def get_format_description(self):
2950
"""See RepositoryFormat.get_format_description()."""
2951
return ("Development repository format, currently the same as "
2952
"1.6.1-subtree with B+Tree indices.\n")
2955
2596
class RetryPackOperations(errors.RetryWithNewPacks):
2956
2597
"""Raised when we are packing and we find a missing file.