432
432
('text-d', ['text-c'], test_knit.TEXT_1),
433
433
('text-m', ['text-b', 'text-d'], test_knit.TEXT_1),
435
# This test is actually a bit strict as the order in which they're
436
# returned is not defined. This matches the current (deterministic)
435
438
expected_data_list = [
436
439
# version, options, parents
437
440
('text-a', ['fulltext'], []),
438
441
('text-b', ['line-delta'], ['text-a']),
442
('text-m', ['line-delta'], ['text-b', 'text-d']),
439
443
('text-c', ['fulltext'], []),
440
444
('text-d', ['line-delta'], ['text-c']),
441
('text-m', ['line-delta'], ['text-b', 'text-d']),
443
446
for version_id, parents, lines in test_data:
444
447
k1.add_lines(version_id, parents, test_knit.split_lines(lines))
446
449
bytes = knitrepo._get_stream_as_bytes(
447
k1, ['text-a', 'text-b', 'text-c', 'text-d', 'text-m'])
450
k1, ['text-a', 'text-b', 'text-m', 'text-c', 'text-d', ])
449
452
data = bencode.bdecode(bytes)
450
453
format = data.pop(0)
765
768
class TestKnitPackNoSubtrees(TestCaseWithTransport):
767
770
def get_format(self):
768
return bzrdir.format_registry.make_bzrdir('knitpack-experimental')
771
return bzrdir.format_registry.make_bzrdir('pack-0.92')
770
773
def test_disk_layout(self):
771
774
format = self.get_format()
1158
1161
class TestRepositoryPackCollection(TestCaseWithTransport):
1160
1163
def get_format(self):
1161
return bzrdir.format_registry.make_bzrdir('knitpack-experimental')
1164
return bzrdir.format_registry.make_bzrdir('pack-0.92')
1163
1166
def test__max_pack_count(self):
1164
1167
"""The maximum pack count is a function of the number of revisions."""