Fwd: [Pkg-bazaar-maint] Bug#444545: bzr: bzr+ssh:// broken with non-standard ports

John Arbash Meinel john at arbash-meinel.com
Mon Oct 1 16:40:41 BST 2007


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

Vincent Ladeuil wrote:
> Just a quick note as I lack time to go further.
> 
> I think we need to reproduce this cleanly to get a better understanding.
> 
> AIUI Andrew's patch *should* not be the cause of the bug.
> 
> The essence of the patch is to process default_port and None with
> the same semantic and *never* force port to default_port.
> 
> So your patch does not seem correct in that regard.
> 
> Just a heads-up, better safe than sorry, if-I-am-wrong-the-better, etc,
> 
>      Vincent
> 

No, his patch has a specific:

if port is None:
  port = transport_list_registry.get_default_port(scheme)
return (scheme, user, password, host port, path)

In _split_url().

Which means that if you pass:

t = get_transport('sftp://host/path')

you will get:

('sftp', None, None, 'host', 22, 'path')

Which has *explicitly* set the port to 22. Which we don't ever want to
do for an SSH based connection.

So I guess we could change the test to have:

self.assertEqual(('sftp', None, None, 'host', None, 'path),
                 Transport._split_url('sftp://host/path'))
self.assertEqual(('bzr+ssh', None, None, 'host', None, 'path),
                 Transport._split_url('bzr+ssh://host/path'))
self.assertEqual(('bzr', None, None, 'host', 4155, 'path),
                 Transport._split_url('bzr://host/path'))

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHART5JdeBCYSNAAMRAo47AJ9qFdvAXGcJ2t/q48Si/0urX3KAdgCeOiJa
jFIHTulK1tHzizQ6vsXtBzk=
=73HA
-----END PGP SIGNATURE-----



More information about the bazaar mailing list