250
252
committer, revprops, revision_id)
255
class KnitRepository3(KnitRepository2):
257
def __init__(self, _format, a_bzrdir, control_files, _revision_store,
258
control_store, text_store):
259
KnitRepository2.__init__(self, _format, a_bzrdir, control_files,
260
_revision_store, control_store, text_store)
261
self._serializer = xml7.serializer_v7
253
264
class RepositoryFormatKnit(MetaDirRepositoryFormat):
254
265
"""Bzr repository knit format (generalized).
437
452
text_store = self._get_text_store(repo_transport, control_files)
438
453
control_store = self._get_control_store(repo_transport, control_files)
439
454
_revision_store = self._get_revision_store(repo_transport, control_files)
440
return KnitRepository2(_format=self,
442
control_files=control_files,
443
_revision_store=_revision_store,
444
control_store=control_store,
445
text_store=text_store)
455
return self.repository_class(_format=self,
457
control_files=control_files,
458
_revision_store=_revision_store,
459
control_store=control_store,
460
text_store=text_store)
463
class RepositoryFormatKnit3(RepositoryFormatKnit2):
464
"""Bzr repository knit format 2.
466
THIS FORMAT IS EXPERIMENTAL
467
This repository format has:
468
- knits for file texts and inventory
469
- hash subdirectory based stores.
470
- knits for revisions and signatures
471
- TextStores for revisions and signatures.
472
- a format marker of its own
473
- an optional 'shared-storage' flag
474
- an optional 'no-working-trees' flag
476
- support for recording full info about the tree root
477
- support for recording tree-references
480
repository_class = KnitRepository3
481
support_tree_reference = True
483
def _get_matching_bzrdir(self):
484
return bzrdir.format_registry.make_bzrdir('experimental-knit3')
486
def _ignore_setting_bzrdir(self, format):
489
_matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
491
def check_conversion_target(self, target_format):
492
RepositoryFormatKnit2.check_conversion_target(self, target_format)
493
if not getattr(target_format, 'support_tree_reference', False):
494
raise errors.BadConversionTarget(
495
'Does not support nested trees', target_format)
498
def get_format_string(self):
499
"""See RepositoryFormat.get_format_string()."""
500
return "Bazaar Knit Repository Format 3\n"
502
def get_format_description(self):
503
"""See RepositoryFormat.get_format_description()."""
504
return "Knit repository format 3"