~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/client.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
        params = CallHookParams(method, args, body, readv_body, self._medium)
67
67
        for hook in _SmartClient.hooks['call']:
68
68
            hook(params)
69
 
            
 
69
 
70
70
    def _call_and_read_response(self, method, args, body=None, readv_body=None,
71
71
            body_stream=None, expect_response_body=True):
72
72
        self._run_call_hooks(method, args, body, readv_body)
132
132
 
133
133
    def call_expecting_body(self, method, *args):
134
134
        """Call a method and return the result and the protocol object.
135
 
        
 
135
 
136
136
        The body can be read like so::
137
137
 
138
138
            result, smart_protocol = smart_client.call_expecting_body(...)
180
180
 
181
181
    def remote_path_from_transport(self, transport):
182
182
        """Convert transport into a path suitable for using in a request.
183
 
        
 
183
 
184
184
        Note that the resulting remote path doesn't encode the host name or
185
185
        anything but path, so it is only safe to use it in requests sent over
186
186
        the medium from the matching transport.
194
194
        hooks.Hooks.__init__(self)
195
195
        self['call'] = []
196
196
 
197
 
        
 
197
 
198
198
_SmartClient.hooks = SmartClientHooks()
199
199
 
200
200
 
201
201
class CallHookParams(object):
202
 
    
 
202
 
203
203
    def __init__(self, method, args, body, readv_body, medium):
204
204
        self.method = method
205
205
        self.args = args