[MERGE] bzr help transport [take 3.. or 4]

Alexander Belchenko bialix at ukr.net
Fri Jan 26 22:33:55 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Goffredo Baroncelli пишет:
> Hi all
> 
> Enclosed you can find patch which tries to implement the help transport topic. 
> 
> The patch implements a TransportListRegistry class based on the Registry 
> class. So the transports are register in a Register class like other classes 
> in bazaaar:
> - this is a clean interface in order to browse the transports
> - it is possible to register both the transport and the help ( and/or info)
> - the default protocol definition is more clean
> 
> The interface is based on the two following methods
> - TransportListRegistry.register_transport which registers the protocol prefix 
> with the help
> - TransportListRegistry.register_transport_provider ( and the "lazy" 
> variant ): which registers the engine to a specific protocol.
> 
> This is needed because more engine can be registered under the same prefix  ( 
> like HTTP, which use urllib and/or pycurl ), and because the same engine can 
> be registered under different prefix ( like aftp:// and ftp:// ).
> 
> Also the  patch implements the transport topics. I used the term transport 
> even tough others prefer therms like locationspec or urlspec. I prefer 
> transport but I am open also to other suggestions.

It's not clear why user need to learn about transport when it just try
to checkout branch from http URL. IMO URL (urlspec) is more intuitive
thing and at least could be added as alias for this topic.

> 
> $ ./bzr help transport

I still think that we could use this output to generate documentation
in HTML form so I'd like to suggest some RTSX-ish improvements:

> 
> Supported transport protocols:
> ------------------------------

^-- please remove the colon at the end

> aftp://            Access using active FTP.
> bzr+http://        Fast access using the Bazaar smart server over HTTP.
> bzr+ssh://         Fast access using the Bazaar smart server over SSH.
> bzr://             Fast access using the Bazaar smart server.
> ftp://             Access using passive FTP.
> http+pycurl://     Read-only access of branches exported on the web.
> http+urllib://     Read-only access of branches exported on the web.
> http://            Read-only access of branches exported on the web.
> https+pycurl://    Read-only access of branches exported on the web using SSL.
> https+urllib://    Read-only access of branches exported on the web using SSL.
> https://           Read-only access of branches exported on the web using SSL.
> sftp://            Access using SFTP (most SSH servers provide SFTP).

1) Why this list don't say anything about file:// transport?

2) I think it's better to sorting protocol names without trailing '://',
because in this case 'http://' will appear first as generic base protocol,
and http+XXX later as special cases.

3) From RSTX point of view: it's better to arrange this list as simple RSTX
table by adding before and after something like:

================   ============================================================
aftp://            Access using active FTP.
bzr+http://        Fast access using the Bazaar smart server over HTTP.
 ...
https://           Read-only access of branches exported on the web using SSL.
sftp://            Access using SFTP (most SSH servers provide SFTP).
================   ============================================================

This will eats only 2 lines.

Or may be we need special flag --rstx for help command to provide valid RSTX
output?
I think we can internally generate rich RTSX text and during output on the screen
as plain text (without such flag) simply filter out RTSX markup. Thoughts?

> Supported modifiers:
> -------------------

^-- please remove the colon at the end

> readonly+           This modifier converts any transport to be readonly.
> 

Again, this could be formatted as RSTX table.

> 
> Comments are welcome

I think someone give you code review as well.

- --
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFuoHTzYr338mxwCURApK9AJ9fhQ7gIp+7aaQ5pgWK4rWe0Q1/cACdHzsS
rPfEGDAUMdGVGeLl37RDLyg=
=y9Vm
-----END PGP SIGNATURE-----




More information about the bazaar mailing list