~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-23 19:45:15 UTC
  • mto: This revision was merged to the branch mainline in revision 6486.
  • Revision ID: jelmer@samba.org-20120223194515-1ctgfzj362m0tu0k
Use bzrdir.controldir for generic access to control directories.

Show diffs side-by-side

added added

removed removed

Lines of Context:
349
349
class TestRemote(tests.TestCaseWithMemoryTransport):
350
350
 
351
351
    def get_branch_format(self):
352
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
352
        reference_bzrdir_format = controldir.format_registry.get('default')()
353
353
        return reference_bzrdir_format.get_branch_format()
354
354
 
355
355
    def get_repo_format(self):
356
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
356
        reference_bzrdir_format = controldir.format_registry.get('default')()
357
357
        return reference_bzrdir_format.repository_format
358
358
 
359
359
    def assertFinished(self, fake_client):
475
475
        transport = transport.clone('quack')
476
476
        self.make_bzrdir('quack')
477
477
        client = FakeClient(transport.base)
478
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
478
        reference_bzrdir_format = controldir.format_registry.get('default')()
479
479
        control_name = reference_bzrdir_format.network_name()
480
480
        client.add_expected_call(
481
481
            'BzrDir.cloning_metadir', ('quack/', 'False'),
509
509
    def test__get_checkout_format(self):
510
510
        transport = MemoryTransport()
511
511
        client = FakeClient(transport.base)
512
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
512
        reference_bzrdir_format = controldir.format_registry.get('default')()
513
513
        control_name = reference_bzrdir_format.network_name()
514
514
        client.add_expected_call(
515
515
            'BzrDir.checkout_metadir', ('quack/', ),
546
546
    def test_get_branches(self):
547
547
        transport = MemoryTransport()
548
548
        client = FakeClient(transport.base)
549
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
549
        reference_bzrdir_format = controldir.format_registry.get('default')()
550
550
        branch_name = reference_bzrdir_format.get_branch_format().network_name()
551
551
        client.add_success_response_with_body(
552
552
            bencode.bencode({
854
854
        transport = transport.clone('quack')
855
855
        self.make_repository('quack')
856
856
        client = FakeClient(transport.base)
857
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
857
        reference_bzrdir_format = controldir.format_registry.get('default')()
858
858
        reference_format = reference_bzrdir_format.get_branch_format()
859
859
        network_name = reference_format.network_name()
860
860
        reference_repo_fmt = reference_bzrdir_format.repository_format
882
882
        # Client's medium rooted a transport root (not at the bzrdir)
883
883
        client = FakeClient(transport.base)
884
884
        transport = transport.clone('quack')
885
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
885
        reference_bzrdir_format = controldir.format_registry.get('default')()
886
886
        reference_format = reference_bzrdir_format.get_branch_format()
887
887
        network_name = reference_format.network_name()
888
888
        reference_repo_fmt = reference_bzrdir_format.repository_format
918
918
        transport = transport.clone('quack')
919
919
        self.make_bzrdir('quack')
920
920
        client = FakeClient(transport.base)
921
 
        reference_bzrdir_format = bzrdir.format_registry.get('default')()
 
921
        reference_bzrdir_format = controldir.format_registry.get('default')()
922
922
        reference_format = reference_bzrdir_format.repository_format
923
923
        network_name = reference_format.network_name()
924
924
        client.add_expected_call(
3964
3964
        :result: The revision ids in the stream, in the order seen,
3965
3965
            the topological order of revisions in the source.
3966
3966
        """
3967
 
        unordered_format = bzrdir.format_registry.get(format)()
 
3967
        unordered_format = controldir.format_registry.get(format)()
3968
3968
        target_repository_format = unordered_format.repository_format
3969
3969
        # Cross check
3970
3970
        self.assertEqual(order, target_repository_format._fetch_order)
4273
4273
    def test_single_empty(self):
4274
4274
        transport_path = 'quack'
4275
4275
        repo, client = self.setup_fake_client_and_repository(transport_path)
4276
 
        fmt = bzrdir.format_registry.get('2a')().repository_format
 
4276
        fmt = controldir.format_registry.get('2a')().repository_format
4277
4277
        repo._format = fmt
4278
4278
        stream = [('inventory-deltas', [
4279
4279
            versionedfile.FulltextContentFactory('somerevid', None, None,