459
460
class RepositoryFormatKnit3(RepositoryFormatKnit):
460
"""Bzr repository knit format 2.
461
"""Bzr repository knit format 3.
462
463
This repository format has:
463
464
- knits for file texts and inventory
503
504
return "Knit repository format 3"
507
class RepositoryFormatKnit4(RepositoryFormatKnit):
508
"""Bzr repository knit format 4.
510
This repository format has everything in format 3, except for
512
- knits for file texts and inventory
513
- hash subdirectory based stores.
514
- knits for revisions and signatures
515
- TextStores for revisions and signatures.
516
- a format marker of its own
517
- an optional 'shared-storage' flag
518
- an optional 'no-working-trees' flag
520
- support for recording full info about the tree root
523
repository_class = KnitRepository
524
_commit_builder_class = RootCommitBuilder
525
rich_root_data = True
526
supports_tree_reference = False
527
_serializer = xml6.serializer_v6
529
def _get_matching_bzrdir(self):
530
return bzrdir.format_registry.make_bzrdir('rich-root')
532
def _ignore_setting_bzrdir(self, format):
535
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
537
def check_conversion_target(self, target_format):
538
if not target_format.rich_root_data:
539
raise errors.BadConversionTarget(
540
'Does not support rich root data.', target_format)
542
def get_format_string(self):
543
"""See RepositoryFormat.get_format_string()."""
544
return 'Bazaar Knit Repository Format 4 (bzr 1.0)\n'
546
def get_format_description(self):
547
"""See RepositoryFormat.get_format_description()."""
548
return "Knit repository format 4"
506
551
def _get_stream_as_bytes(knit, required_versions):
507
552
"""Generate a serialised data stream.