[MERGE] new help topic: urlspec ( repost )
Goffredo Baroncelli
kreijack at alice.it
Sat Apr 21 14:11:21 BST 2007
Hi all,
this patch was posted already, but even tough was reviewed by several people (
John, Robert [*] ) it was never merged.
The patch adds a new topics, called "urlspec" [**]
$ ./bzr help topics
basic Basic commands
checkouts Information on what a checkout is
commands Basic help for all commands
formats Directory formats
global-options Options that can be used with any command
hidden-commands All hidden commands
launchpad Using Bazaar with Launchpad.net
revisionspec Explain how to use --revision
topics Topics list
urlspec Supported transport protocols
$ ./bzr help urlspec
Supported URL prefix
--------------------
aftp:// Access using active FTP.
bzr:// Fast access using the Bazaar smart server.
bzr+ssh:// Fast access using the Bazaar smart server over SSH.
file:// Access using the standard filesystem (default)
ftp:// Access using passive FTP.
http:// Read-only access of branches exported on the web.
https:// Read-only access of branches exported on the web using
SSL.
sftp:// Access using SFTP (most SSH servers provide SFTP).
The patch implements a new class (TransportListRegistry) derived from the
registry.Registry class.
This class is used in order to manage the different transport ( http, ftp,
aftp ) and the different transport providers ( http+urllib, http+pycurl,
ftp ).
$ grep -A 13 "class TransportListRegistry" bzrlib/transport/__init__.py
class TransportListRegistry(registry.Registry):
"""A registry which simplifies tracking available Transports.
A registration of a new protocol requires two step:
1) register the prefix with the function register_transport( )
2) register the protocol provider with the function
register_transport_provider( ) ( and the "lazy" variant )
This in needed because:
a) a single provider can support multple protcol ( like the ftp
privider which supports both the ftp:// and the aftp:// protocols )
b) a single protocol can have multiple providers ( like the http://
protocol which is supported by both the urllib and pycurl privider )
"""
$ diffstat /tmp/transport_help_topics.diff
NEWS | 6 +
bzrlib/help_topics.py | 49 +++++++++
bzrlib/tests/blackbox/test_help.py | 12 ++
bzrlib/tests/test_transport.py | 24 ++--
bzrlib/transport/__init__.py | 196 +++++++++++++++++++++++--------------
5 files changed, 205 insertions(+), 82 deletions(-)
Goffredo
[*] https://lists.ubuntu.com/archives/bazaar/2007q1/022206.html
[**] The name was suggested by Alexander Belchenko
--
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack at inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87 87C0 BB86 505C 6B2A CFF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transport_help_topics.diff
Type: text/x-diff
Size: 188674 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070421/9a6a1c6a/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070421/9a6a1c6a/attachment-0001.pgp
More information about the bazaar
mailing list