[MERGE][0.91][Bug 133965] PathNotChild, port mismatch with "bzr info" for bzr:// smartserver

Andrew Bennetts andrew at canonical.com
Wed Sep 26 08:38:43 BST 2007

Vincent Ladeuil wrote:
> >>>>> "vila" == Vincent Ladeuil <v.ladeuil+lp at free.fr> writes:
> <snip/>
>     vila> I thought you tried the class attribute approach in a previous
>     vila> version why did you change your mind ?
> Assuming you didn't answer by lack of time, do you mind if I try
> the class attribute approach ?
> Or do you have some stronger reasons against it ?

You're welcome to try it.  I did try it initially, but it didn't fit right for
me.  I don't remember exactly why, although there is the issue that Transports
don't correspond with protocols, so from that perspective it certainly fits more
neatly at register_transport_proto than in the Transport class hierarchy.

Certainly the parsing of URLs does not belong in Transports (a URL should mean
exactly the same thing no matter which transport object happens to be dissecting
it), so parameterising the parsing of URLs in transport isn't correct.  e.g.
ConnectedTransport._reuse_for can expect to be given URLs referring to other
protocols, so default ports for this protocol/transport are irrelevant.  (Really
_split_url etc should not be on ConnectedTransport, URL parsing should be
independent of the transport object's type and state.)

Perhaps there's a nice way to make it work, but register_transport_proto seemed
most appropriate to me so that's what I did.


More information about the bazaar mailing list