~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/repository_implementations/test_repository.py

Teach knit fetching and branching to only duplicate relevant data avoiding unnecessary reconciles.

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
        inv_weave = repo.get_inventory_weave()
357
357
        self.assertEqual(['ghost'], inv_weave.get_ancestry(['ghost']))
358
358
 
359
 
    def test_corrupt_revision_access_asserts(self):
 
359
    def test_corrupt_revision_access_asserts_if_reported_wrong(self):
360
360
        repo = repository.Repository.open('inventory_with_unnecessary_ghost')
 
361
        reported_wrong = False
 
362
        try:
 
363
            if repo.get_ancestry('ghost') != [None, 'the_ghost', 'ghost']:
 
364
                reported_wrong = True
 
365
        except errors.CorruptRepository:
 
366
            # caught the bad data:
 
367
            return
 
368
        if not reported_wrong:
 
369
            return
361
370
        self.assertRaises(errors.CorruptRepository, repo.get_revision, 'ghost')
362
371
 
363
372
    def test_corrupt_revision_get_revision_reconcile(self):