~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/remote.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:
35
35
    urlutils,
36
36
    )
37
37
from bzrlib.smart import client, medium, protocol
 
38
from bzrlib.symbol_versioning import (deprecated_method, one_four)
38
39
 
39
40
 
40
41
class _SmartStat(object):
104
105
            self._shared_connection = transport._SharedConnection(medium,
105
106
                                                                  credentials,
106
107
                                                                  self.base)
 
108
        else:
 
109
            if medium is None:
 
110
                # No medium was specified, so share the medium from the
 
111
                # _from_transport.
 
112
                medium = self._shared_connection.connection
107
113
 
108
114
        if _client is None:
109
 
            self._client = client._SmartClient(self.get_shared_medium())
 
115
            self._client = client._SmartClient(medium, self.base)
110
116
        else:
111
117
            self._client = _client
112
118
 
144
150
    def get_smart_medium(self):
145
151
        return self._get_connection()
146
152
 
 
153
    @deprecated_method(one_four)
147
154
    def get_shared_medium(self):
148
155
        return self._get_shared_connection()
149
156