Comment 2 for bug 388908

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 388908] Re: unnecessary stacking upgrade warning with bzr.dev

On Tue, 2009-06-23 at 00:18 +0000, Andrew Bennetts wrote:
> This is a regression in 1.16, I think.
>
> It's a messy one, though. When
> RemoteBzrDirFormat.initialize_on_transport_ex invokes require_stacking()
> it has no knowledge of the source format (despite the message it
> emits!), so it's difficult to fix.
>
> My initial feeling is that initialize_on_transport_ex is the problem: it
> is half-way between a simple function and a comprehensive one.
> Specifically, it handles bzrdirs and repositories, but not branches. My
> suspicion is that the right fix will be to extend
> initialize_on_transport_ex (or make a new variant) that also initializes
> branches.

Hmm, I found that exceedingly tricky to do when I was tackling it
- ..._ex was as much as I could slice without needing callbacks. Its
worth looking for more - but I think the whole area needs cleaned up.

I don't think you've analysed it quite right anyhow - because I had the
same feeling when I first looked at it. Tracing through it though showed
me that the original format is cloned and parameterised, and *that*
object is indeed passed to ..._ex.

-Rob