/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_pack_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2010-04-30 11:35:43 UTC
  • mfrom: (5195 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5197.
  • Revision ID: jelmer@samba.org-20100430113543-tiqqhmqa3d8no4iu
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
        repo._pack_collection._clear_obsolete_packs()
289
289
        self.assertTrue(repo_transport.has('obsolete_packs/.nfsblahblah'))
290
290
 
 
291
    def test_pack_collection_sets_sibling_indices(self):
 
292
        """The CombinedGraphIndex objects in the pack collection are all
 
293
        siblings of each other, so that search-order reorderings will be copied
 
294
        to each other.
 
295
        """
 
296
        repo = self.make_repository('repo')
 
297
        pack_coll = repo._pack_collection
 
298
        indices = set([pack_coll.revision_index, pack_coll.inventory_index,
 
299
                pack_coll.text_index, pack_coll.signature_index])
 
300
        if pack_coll.chk_index is not None:
 
301
            indices.add(pack_coll.chk_index)
 
302
        combined_indices = set(idx.combined_index for idx in indices)
 
303
        for combined_index in combined_indices:
 
304
            self.assertEqual(
 
305
                combined_indices.difference([combined_index]),
 
306
                combined_index._sibling_indices)
 
307
 
291
308
    def test_pack_after_two_commits_packs_everything(self):
292
309
        format = self.get_format()
293
310
        tree = self.make_branch_and_tree('.', format=format)