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.
This is a regression in 1.16, I think.
It's a messy one, though. When RemoteBzrDirFor mat.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.