Part of bzrlib.smart.repository View In Hierarchy
Known subclasses: bzrlib.smart.repository.SmartServerRepositoryGetStream_1_19
|Method||do_repository_request||Get a stream for inserting into a to_format repository.|
|Method||do_body||Called if the client sends a body with the request.|
|Method||_should_fake_unknown||Return True if we should return UnknownMethod to the client.|
Inherited from SmartServerRepositoryRequest:
|Method||do||Execute a repository request.|
|Method||recreate_search||Recreate a search from its serialised form.|
|Method||recreate_search_from_recipe||Recreate a specific revision search (vs a from-tip search).|
|Method||execute||Public entry point to execute this request.|
|Method||do_chunk||Called with each body chunk if the request has a streamed body.|
|Method||do_end||Called when the end of the request has been received.|
|Method||translate_client_path||Translate a path received from a network client into a local|
|Method||transport_from_client_path||Get a backing transport corresponding to the location referred to by|
|Method||_check_enabled||Raises DisabledMethod if this method is disabled.|
The request body is 'search_bytes', a description of the revisions being requested.
In 2.3 this verb added support for search_bytes == 'everything'. Older implementations will respond with a BadSearch error, and clients should catch this and fallback appropriately.
|Parameters||repository||The repository to stream from.|
|to_network_name||The network name of the format of the target repository.|
This is a workaround for bugs in pre-1.19 clients that claim to support receiving streams of CHK repositories. The pre-1.19 client expects inventory records to be serialized in the format defined by to_network_name, but in pre-1.19 (at least) that format definition tries to use the xml5 serializer, which does not correctly handle rich-roots. After 1.19 the client can also accept inventory-deltas (which avoids this issue), and those clients will use the Repository.get_stream_1.19 verb instead of this one. So: if this repository is CHK, and the to_format doesn't match, we should just fake an UnknownSmartMethod error so that the client will fallback to VFS, rather than sending it a stream we know it cannot handle.
The do() method is still called, and must have returned None.
Must return a SmartServerResponse.