Comment 2 for bug 150860

Revision history for this message
Vincent Ladeuil (vila) wrote :

From the comment above, I'd say _port in Transport objects should represent what the user have provided.

At connection time if port is None, then, and only then we may force the default value for tranports that requires it (and as Martin said, it may well be outside of bzrlib).

I don't think we will lose anything by not being able to recognize that proto://foo/ and proto://foo:defaultport/ are really the same thing.

Historically that's what bzr has always done.

Then by refactoring transport I introduced a bug for the bzr scheme trying to handle the default port (bug #133965).
Then Andrew did the right thing to fix that bug but introduced another one (bug #146715).

The solution seems to be to unroll those fixes an fix the first bug by making RemoteTransport specify 4155 in _build_medium when no port have been specified by the user.

Summary: port in brzlib is what the user provided, if still None at connection time scheme default port is used.