[BUG](regression) 'bzr pull' into a bound branch fails
Andrew Bennetts
andrew at canonical.com
Mon Oct 22 02:28:24 BST 2007
John Arbash Meinel wrote:
[...]
>
> Basically, the schemes need to be registered where the protocol is registered.
> Rather than in the file they are imported in. (In bzrlib/transport/__init__.py
> rather than in bzrlib/transport/<protocol>.py)
I agree.
John Arbash Meinel also wrote:
[...]
>
> I just wanted to comment that since this is an import-time ordering bug, I'm
> not sure that we can write a test case for it.
>
> But we certainly can go through and move all 'register_netloc' calls into
> bzrlib/transport/__init__.py
>
> Though honestly, maybe we should just have it as part of the
> 'register_transport' functionality. In fact, I think the only ones that
> wouldn't be registered are http[s] (because it is already there) and file:///
> (doesn't use a host, though it might still be netloc safe with a host of ''),
> and maybe sftp.
>
> We could just have a "register_lazy_transport(..., register_netloc=False)" for
> those. (Yes, I would rather default it to True, though if that is considered an
> API break, we could do the opposite.)
Hmm, I think it should be on register_transport_proto, rather than
register_lazy_transport. I'm ambivalent about the choice of default value, but
True is probably ok.
Otherwise I agree that this is probably the best approach; it leaves no room to
have the protocol registrations out-of-sync with the URL parsing, so this
approach seems to me to be obviously The Right Thing.
-Andrew.
More information about the bazaar
mailing list