1
# Copyright (C) 2006 Canonical Ltd
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
"""Smart-server protocol, client and server.
19
This code is fairly complex, so it has been split up into a package of modules,
20
rather than being a single large module. Refer to the individual module
21
docstrings for details.
23
Server-side request handlers are registered in the `bzrlib.smart.request`
26
The domain logic is in `bzrlib.remote`: `RemoteBzrDir`, `RemoteBranch`,
29
There is also an plain file-level transport that calls remote methods to
30
manipulate files on the server in `bzrlib.transport.remote`.
32
The protocol is described in doc/developers/network-protocol.txt.
36
# TODO: A plain integer from query_version is too simple; should give some
39
# TODO: Make each request and response self-validatable, e.g. with checksums.
41
# TODO: is it useful to allow multiple chunks in the bulk data?
43
# TODO: If we get an exception during transmission of bulk data we can't just
44
# emit the exception because it won't be seen.
45
# John proposes: I think it would be worthwhile to have a header on each
46
# chunk, that indicates it is another chunk. Then you can send an 'error'
47
# chunk as long as you finish the previous chunk.
50
# Promote some attributes from submodules into this namespace
51
from bzrlib.smart.request import SmartServerRequestHandler