/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/test_repository.py

  • Committer: Robert Collins
  • Date: 2009-09-04 00:49:55 UTC
  • mfrom: (4671 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4672.
  • Revision ID: robertc@robertcollins.net-20090904004955-suhaz7r608i4j9gm
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
681
681
        self.assertFalse(repo._format.supports_external_lookups)
682
682
 
683
683
 
684
 
class Test2a(TestCaseWithTransport):
 
684
class Test2a(tests.TestCaseWithMemoryTransport):
685
685
 
686
686
    def test_fetch_combines_groups(self):
687
687
        builder = self.make_branch_builder('source', format='2a')
710
710
        self.assertTrue(repo._format.pack_compresses)
711
711
 
712
712
    def test_inventories_use_chk_map_with_parent_base_dict(self):
713
 
        tree = self.make_branch_and_tree('repo', format="2a")
 
713
        tree = self.make_branch_and_memory_tree('repo', format="2a")
 
714
        tree.lock_write()
 
715
        tree.add([''], ['TREE_ROOT'])
714
716
        revid = tree.commit("foo")
 
717
        tree.unlock()
715
718
        tree.lock_read()
716
719
        self.addCleanup(tree.unlock)
717
720
        inv = tree.branch.repository.get_inventory(revid)
726
729
        # at 20 unchanged commits, chk pages are packed that are split into
727
730
        # two groups such that the new pack being made doesn't have all its
728
731
        # pages in the source packs (though they are in the repository).
729
 
        tree = self.make_branch_and_tree('tree', format='2a')
 
732
        # Use a memory backed repository, we don't need to hit disk for this
 
733
        tree = self.make_branch_and_memory_tree('tree', format='2a')
 
734
        tree.lock_write()
 
735
        self.addCleanup(tree.unlock)
 
736
        tree.add([''], ['TREE_ROOT'])
730
737
        for pos in range(20):
731
738
            tree.commit(str(pos))
732
739
 
733
740
    def test_pack_with_hint(self):
734
 
        tree = self.make_branch_and_tree('tree', format='2a')
 
741
        tree = self.make_branch_and_memory_tree('tree', format='2a')
 
742
        tree.lock_write()
 
743
        self.addCleanup(tree.unlock)
 
744
        tree.add([''], ['TREE_ROOT'])
735
745
        # 1 commit to leave untouched
736
746
        tree.commit('1')
737
747
        to_keep = tree.branch.repository._pack_collection.names()