Comment 6 for bug 75721

Revision history for this message
John A Meinel (jameinel) wrote :

In debugging this, the first time it actually opens a connection is in the
BzrDir.open_from_transport() call. Because the Transport doesn't connect until necessary.

The second time is in BzrDir.clone() which calls self._make_tail(). _make_tail() also *only* works in a URL, not a Transport, so it has to create a new connection.

The final connection is BzrDir.clone() at self._format.initialize() Which also uses only a URL.

After that initialize we have an actual BzrDir object, so it maintains a transport which gets re-used.

The fix which seems most reasonable is to:

1) Update BzrDir.clone() to take a transport
2) Fix BzrDir._make_tail() to use a transport rather than a URL
3) Use BzrDirFormat.initialize_on_transport() rather than initialize()