~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-01 02:16:14 UTC
  • mfrom: (3313.2.4 _SmartClient-takes-medium)
  • Revision ID: pqm@pqm.ubuntu.com-20080401021614-ec34l5pd7xp7bkku
Deprecate get_shared_medium,
        and pass medium & base directly into _SmartClient. (Andrew Bennetts)

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