~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 22:43:26 UTC
  • mfrom: (4617.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090817224326-uhljmr5me5x3xyda
(robertc) Multiple 2a-as-default fixes. (Robert Collins)

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