1009
1009
broken_repo = self.make_broken_repository()
1010
1010
empty_repo = self.make_repository('empty-repo')
1011
# See bug https://bugs.launchpad.net/bzr/+bug/389141 for information
1012
# about why this was turned into expectFailure
1013
self.expectFailure('new Stream fetch fills in missing compression'
1014
' parents (bug #389141)',
1015
self.assertRaises, (errors.RevisionNotPresent, errors.BzrCheckError),
1016
empty_repo.fetch, broken_repo)
1017
self.assertRaises((errors.RevisionNotPresent, errors.BzrCheckError),
1018
empty_repo.fetch, broken_repo)
1012
empty_repo.fetch(broken_repo)
1013
except (errors.RevisionNotPresent, errors.BzrCheckError):
1014
# Test successful: compression parent not being copied leads to
1017
empty_repo.lock_read()
1018
self.addCleanup(empty_repo.unlock)
1019
text = empty_repo.texts.get_record_stream(
1020
[('file2-id', 'rev3')], 'topological', True).next()
1021
self.assertEqual('line\n', text.get_bytes_as('fulltext'))
1021
1024
class TestRepositoryPackCollection(TestCaseWithTransport):