~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

Abbreviate pack_stat struct format to '>6L'

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
        def check_format(format, url):
137
137
            dir = format._matchingbzrdir.initialize(url)
138
138
            format.initialize(dir)
139
 
            t = transport.get_transport(url)
 
139
            t = transport.get_transport_from_path(url)
140
140
            found_format = repository.RepositoryFormat.find_format(dir)
141
141
            self.assertIsInstance(found_format, format.__class__)
142
142
        check_format(repository.format_registry.get_default(), "bar")
1602
1602
        self.addCleanup(target.unlock)
1603
1603
        source = source_tree.branch.repository._get_source(target._format)
1604
1604
        self.orig_pack = target.pack
1605
 
        target.pack = self.log_pack
 
1605
        self.overrideAttr(target, "pack", self.log_pack)
1606
1606
        search = target.search_missing_revision_ids(
1607
1607
            source_tree.branch.repository, revision_ids=[tip])
1608
1608
        stream = source.get_stream(search)
1626
1626
        self.addCleanup(target.unlock)
1627
1627
        source = source_tree.branch.repository
1628
1628
        self.orig_pack = target.pack
1629
 
        target.pack = self.log_pack
 
1629
        self.overrideAttr(target, "pack", self.log_pack)
1630
1630
        target.fetch(source)
1631
1631
        if expect_pack_called:
1632
1632
            self.assertLength(1, self.calls)
1660
1660
    def test_IDS_format_same_no(self):
1661
1661
        # When the formats are the same, pack is not called.
1662
1662
        self.run_fetch('2a', '2a', False)
 
1663
 
 
1664
 
 
1665
class Test_LazyListJoin(tests.TestCase):
 
1666
 
 
1667
    def test__repr__(self):
 
1668
        lazy = repository._LazyListJoin(['a'], ['b'])
 
1669
        self.assertEqual("bzrlib.repository._LazyListJoin((['a'], ['b']))",
 
1670
                         repr(lazy))