~bzr-pqm/bzr/bzr.dev

6133.4.44 by John Arbash Meinel
Move the code into bzrlib.smart.signals.
1
# Copyright (C) 2006,2011 Canonical Ltd
2018.5.19 by Andrew Bennetts
Add docstrings to all the new modules, and a few other places.
2
#
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.
7
#
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.
12
#
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
4183.7.1 by Sabin Iacob
update FSF mailing address
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2018.5.19 by Andrew Bennetts
Add docstrings to all the new modules, and a few other places.
16
17
"""Smart-server protocol, client and server.
18
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.
22
2777.4.1 by Andrew Bennetts
Move HPSS protocol description from bzrlib.smart docstring into doc/developers.
23
Server-side request handlers are registered in the `bzrlib.smart.request`
24
module.
25
26
The domain logic is in `bzrlib.remote`: `RemoteBzrDir`, `RemoteBranch`,
27
and so on.
2432.2.8 by Andrew Bennetts
NEWS entry, greatly improved docstring in bzrlib.smart.
28
29
There is also an plain file-level transport that calls remote methods to
30
manipulate files on the server in `bzrlib.transport.remote`.
31
2777.4.1 by Andrew Bennetts
Move HPSS protocol description from bzrlib.smart docstring into doc/developers.
32
The protocol is described in doc/developers/network-protocol.txt.
33
2018.5.19 by Andrew Bennetts
Add docstrings to all the new modules, and a few other places.
34
"""
35
36
# TODO: A plain integer from query_version is too simple; should give some
37
# capabilities too?
38
39
# TODO: Make each request and response self-validatable, e.g. with checksums.
40
#
41
# TODO: is it useful to allow multiple chunks in the bulk data?
42
#
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.
48
#
49
50
# Promote some attributes from submodules into this namespace
2018.5.21 by Andrew Bennetts
Move bzrlib.transport.smart to bzrlib.smart
51
from bzrlib.smart.request import SmartServerRequestHandler
2018.5.19 by Andrew Bennetts
Add docstrings to all the new modules, and a few other places.
52
2018.5.14 by Andrew Bennetts
Move SmartTCPServer to smart/server.py, and SmartServerRequestHandler to smart/request.py.
53