727
727
# versions of the file.
728
728
self.assertEqual(file_1_details[0][:3], file_2_details[0][:3])
730
def test_fetch_combines_groups(self):
731
builder = self.make_branch_builder('source', format='2a')
732
builder.start_series()
733
builder.build_snapshot('1', None, [
734
('add', ('', 'root-id', 'directory', '')),
735
('add', ('file', 'file-id', 'file', 'content\n'))])
736
builder.build_snapshot('2', ['1'], [
737
('modify', ('file-id', 'content-2\n'))])
738
builder.finish_series()
739
source = builder.get_branch()
740
target = self.make_repository('target', format='2a')
741
target.fetch(source.repository)
743
self.addCleanup(target.unlock)
744
details = target.texts._index.get_build_details(
745
[('file-id', '1',), ('file-id', '2',)])
746
file_1_details = details[('file-id', '1')]
747
file_2_details = details[('file-id', '2')]
748
# The index, and what to read off disk, should be the same for both
749
# versions of the file.
750
self.assertEqual(file_1_details[0][:3], file_2_details[0][:3])
730
752
def test_format_pack_compresses_True(self):
731
753
repo = self.make_repository('repo', format='2a')
732
754
self.assertTrue(repo._format.pack_compresses)