~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-02 01:44:26 UTC
  • mfrom: (6518 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120402014426-0o5qtysohyl006b2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from bzrlib import (
31
31
    bencode,
32
32
    branch as _mod_branch,
33
 
    bzrdir,
 
33
    controldir,
34
34
    errors,
35
35
    gpg,
36
36
    inventory_delta,
121
121
        stream = [('text', [versionedfile.FulltextContentFactory(('k1',), None,
122
122
            None, 'foo')]),('text', [
123
123
            versionedfile.FulltextContentFactory(('k2',), None, None, 'bar')])]
124
 
        fmt = bzrdir.format_registry.get('pack-0.92')().repository_format
 
124
        fmt = controldir.format_registry.get('pack-0.92')().repository_format
125
125
        bytes = smart_repo._stream_to_byte_stream(stream, fmt)
126
126
        streams = []
127
127
        # Iterate the resulting iterable; checking that we get only one stream
333
333
        self.make_bzrdir('.')
334
334
        request_class = smart_dir.SmartServerRequestCreateRepository
335
335
        request = request_class(backing)
336
 
        reference_bzrdir_format = bzrdir.format_registry.get('pack-0.92')()
 
336
        reference_bzrdir_format = controldir.format_registry.get('pack-0.92')()
337
337
        reference_format = reference_bzrdir_format.repository_format
338
338
        network_name = reference_format.network_name()
339
339
        expected = smart_req.SuccessfulSmartServerResponse(
493
493
        request = smart_dir.SmartServerRequestInitializeBzrDir(backing)
494
494
        self.assertEqual(smart_req.SmartServerResponse(('ok', )),
495
495
            request.execute(''))
496
 
        made_dir = bzrdir.BzrDir.open_from_transport(backing)
 
496
        made_dir = controldir.ControlDir.open_from_transport(backing)
497
497
        # no branch, tree or repository is expected with the current
498
498
        # default formart.
499
499
        self.assertRaises(errors.NoWorkingTree, made_dir.open_workingtree)
533
533
                                           'False', '', '', '')),
534
534
            request.execute(name, '', 'True', 'False', 'False', '', '', '', '',
535
535
                            'False'))
536
 
        made_dir = bzrdir.BzrDir.open_from_transport(backing)
 
536
        made_dir = controldir.ControlDir.open_from_transport(backing)
537
537
        # no branch, tree or repository is expected with the current
538
538
        # default format.
539
539
        self.assertRaises(errors.NoWorkingTree, made_dir.open_workingtree)
2691
2691
            versionedfile.FulltextContentFactory('somerev', None, None,
2692
2692
                self._get_serialized_inventory_delta(
2693
2693
                    t.branch.repository, 'null:', 'somerev'))])]
2694
 
        fmt = bzrdir.format_registry.get('2a')().repository_format
 
2694
        fmt = controldir.format_registry.get('2a')().repository_format
2695
2695
        self.assertEquals(
2696
2696
            "".join(response.body_stream),
2697
2697
            "".join(smart_repo._stream_to_byte_stream(stream, fmt)))