~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-15 02:57:23 UTC
  • mfrom: (4676.4.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090915025723-80e5kn5xyizsb2f1
(mbp) merge 2.0rc2, sphinx, and various fixes back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
727
727
        # versions of the file.
728
728
        self.assertEqual(file_1_details[0][:3], file_2_details[0][:3])
729
729
 
 
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)
 
742
        target.lock_read()
 
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])
 
751
 
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)