~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Robert Collins
  • Date: 2009-09-07 03:35:06 UTC
  • mfrom: (4634.6.24 2.0)
  • mto: This revision was merged to the branch mainline in revision 4676.
  • Revision ID: robertc@robertcollins.net-20090907033506-2voaobfg5n4yxyjr
MergeĀ 2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
705
705
        # versions of the file.
706
706
        self.assertEqual(file_1_details[0][:3], file_2_details[0][:3])
707
707
 
 
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)
 
720
        target.lock_read()
 
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])
 
729
 
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)