~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-08-17 18:18:18 UTC
  • mfrom: (4618.2.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090817181818-6ks7pxgiwpqvsd3l
(vila) Make selftest --parallel=fork work again

Show diffs side-by-side

added added

removed removed

Lines of Context:
486
486
    _serializer = None
487
487
 
488
488
    def supports_rich_root(self):
489
 
        if self._format is not None:
490
 
            return self._format.rich_root_data
491
489
        return False
492
490
 
493
491
    def get_graph(self):
544
542
        # pair that it returns true on for the is_compatible static method
545
543
        # check
546
544
        dummy_a = DummyRepository()
547
 
        dummy_a._format = RepositoryFormat()
548
545
        dummy_b = DummyRepository()
549
 
        dummy_b._format = RepositoryFormat()
550
546
        repo = self.make_repository('.')
551
547
        # hack dummies to look like repo somewhat.
552
548
        dummy_a._serializer = repo._serializer
553
 
        dummy_a._format.supports_tree_reference = repo._format.supports_tree_reference
554
 
        dummy_a._format.rich_root_data = repo._format.rich_root_data
555
549
        dummy_b._serializer = repo._serializer
556
 
        dummy_b._format.supports_tree_reference = repo._format.supports_tree_reference
557
 
        dummy_b._format.rich_root_data = repo._format.rich_root_data
558
550
        repository.InterRepository.register_optimiser(InterDummy)
559
551
        try:
560
552
            # we should get the default for something InterDummy returns False
1041
1033
 
1042
1034
    def make_packs_and_alt_repo(self, write_lock=False):
1043
1035
        """Create a pack repo with 3 packs, and access it via a second repo."""
1044
 
        tree = self.make_branch_and_tree('.', format=self.get_format())
 
1036
        tree = self.make_branch_and_tree('.')
1045
1037
        tree.lock_write()
1046
1038
        self.addCleanup(tree.unlock)
1047
1039
        rev1 = tree.commit('one')
1357
1349
    """Tests for the packs repository Packer class."""
1358
1350
 
1359
1351
    def test_pack_optimizes_pack_order(self):
1360
 
        builder = self.make_branch_builder('.', format="1.9")
 
1352
        builder = self.make_branch_builder('.')
1361
1353
        builder.start_series()
1362
1354
        builder.build_snapshot('A', None, [
1363
1355
            ('add', ('', 'root-id', 'directory', None)),