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

James Westby jw+debian at jameswestby.net
Thu Aug 23 22:13:57 BST 2007


On (24/08/07 06:50), Robert Collins wrote:
> This is clearly wrong.
> 
> The right way to handle this is to use the default port number if none
> has been explicitly provided.
> 
> E.g. to do a comparison with http, you need to supply 80, for https 443,
> etc.

Hi,

I'm not really sure how to proceed, so I have recorded my understanding
in the hope that it will help someone to see the light.

Ok, for explicit ports in the url everything is fine, so we only need to
consider default ports.

When the user provides a url they do not put a port in it, and so
_split_url returns None for the port.

For most transports self._port is None in the default case, and so this
works out fine.

For bzr:// if the port is None when the transport is created then
self._port is set to BZR_DEFAULT_PORT. This then means that the url that
was used to create the transport is no longer a child of it, as the
ports differ, giving rise to the bug.

Why does the bzr:// transport differ here in that it explicitly sets
its port to the default?

Is the best way to change all transports to explicitly set the default
port? Can the default be dropped from bzr://?

I'm not going to have time to complete this tonight, so if someone can
come up with a fix I would appreciate it.

Thanks,

James

-- 
  James Westby   --    GPG Key ID: B577FE13    --     http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256



More information about the bazaar mailing list