705
705
# versions of the file.
706
706
self.assertEqual(file_1_details[0][:3], file_2_details[0][:3])
708
def test_fetch_combines_groups(self):
709
builder = self.make_branch_builder('source', format='2a')
710
builder.start_series()
711
builder.build_snapshot('1', None, [
712
('add', ('', 'root-id', 'directory', '')),
713
('add', ('file', 'file-id', 'file', 'content\n'))])
714
builder.build_snapshot('2', ['1'], [
715
('modify', ('file-id', 'content-2\n'))])
716
builder.finish_series()
717
source = builder.get_branch()
718
target = self.make_repository('target', format='2a')
719
target.fetch(source.repository)
721
self.addCleanup(target.unlock)
722
details = target.texts._index.get_build_details(
723
[('file-id', '1',), ('file-id', '2',)])
724
file_1_details = details[('file-id', '1')]
725
file_2_details = details[('file-id', '2')]
726
# The index, and what to read off disk, should be the same for both
727
# versions of the file.
728
self.assertEqual(file_1_details[0][:3], file_2_details[0][:3])
708
730
def test_format_pack_compresses_True(self):
709
731
repo = self.make_repository('repo', format='2a')
710
732
self.assertTrue(repo._format.pack_compresses)