~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Andrew Bennetts
  • Date: 2008-03-28 08:05:51 UTC
  • mto: This revision was merged to the branch mainline in revision 3321.
  • Revision ID: andrew.bennetts@canonical.com-20080328080551-n7f6rejuycnzn0p8
Change _SmartClient's API to accept a medium and a base, rather than a _SharedConnection.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2415
2415
    def initialize_on_transport(self, transport):
2416
2416
        try:
2417
2417
            # hand off the request to the smart server
2418
 
            shared_medium = transport.get_shared_medium()
 
2418
            client_medium = transport.get_smart_medium()
2419
2419
        except errors.NoSmartMedium:
2420
2420
            # TODO: lookup the local format from a server hint.
2421
2421
            local_dir_format = BzrDirMetaFormat1()
2422
2422
            return local_dir_format.initialize_on_transport(transport)
2423
 
        client = _SmartClient(shared_medium)
 
2423
        client = _SmartClient(client_medium, transport.base)
2424
2424
        path = client.remote_path_from_transport(transport)
2425
 
        response = _SmartClient(shared_medium).call('BzrDirFormat.initialize',
2426
 
                                                    path)
 
2425
        response = client.call('BzrDirFormat.initialize', path)
2427
2426
        assert response[0] in ('ok', ), 'unexpected response code %s' % (response,)
2428
2427
        return remote.RemoteBzrDir(transport)
2429
2428