67
67
def do_body(self, body_bytes):
68
68
"""Called if the client sends a body with the request.
70
The do() method is still called, and must have returned None.
70
72
Must return a SmartServerResponse.
106
108
other.body_stream is self.body_stream)
108
110
def __repr__(self):
109
return "<SmartServerResponse %r args=%r body=%r>" % (
110
self.is_successful(), self.args, self.body)
111
return ("<SmartServerResponse successful=%s args=%r body=%r>"
112
% (self.is_successful(), self.args, self.body))
113
115
class FailedSmartServerResponse(SmartServerResponse):
284
286
request_handlers.register_lazy(
285
287
'Branch.unlock', 'bzrlib.smart.branch', 'SmartServerBranchRequestUnlock')
286
288
request_handlers.register_lazy(
287
'BzrDir.find_repository', 'bzrlib.smart.bzrdir', 'SmartServerRequestFindRepository')
289
'BzrDir.find_repository', 'bzrlib.smart.bzrdir', 'SmartServerRequestFindRepositoryV1')
290
request_handlers.register_lazy(
291
'BzrDir.find_repositoryV2', 'bzrlib.smart.bzrdir', 'SmartServerRequestFindRepositoryV2')
288
292
request_handlers.register_lazy(
289
293
'BzrDirFormat.initialize', 'bzrlib.smart.bzrdir', 'SmartServerRequestInitializeBzrDir')
290
294
request_handlers.register_lazy(
318
322
request_handlers.register_lazy('Repository.gather_stats',
319
323
'bzrlib.smart.repository',
320
324
'SmartServerRepositoryGatherStats')
325
request_handlers.register_lazy('Repository.get_parent_map',
326
'bzrlib.smart.repository',
327
'SmartServerRepositoryGetParentMap')
321
328
request_handlers.register_lazy(
322
'Repository.stream_knit_data_for_revisions', 'bzrlib.smart.repository',
329
'Repository.stream_knit_data_for_revisions',
330
'bzrlib.smart.repository',
323
331
'SmartServerRepositoryStreamKnitDataForRevisions')
324
332
request_handlers.register_lazy(
333
'Repository.stream_revisions_chunked',
334
'bzrlib.smart.repository',
335
'SmartServerRepositoryStreamRevisionsChunked')
336
request_handlers.register_lazy(
325
337
'Repository.get_revision_graph', 'bzrlib.smart.repository', 'SmartServerRepositoryGetRevisionGraph')
326
338
request_handlers.register_lazy(
327
339
'Repository.has_revision', 'bzrlib.smart.repository', 'SmartServerRequestHasRevision')