Hang at commit time when using sftp or bzr+ssh

Martin Pool mbp at canonical.com
Wed Dec 7 19:43:24 UTC 2011


On 8 December 2011 06:29, Stephen Auyeung <stephen at ck12.org> wrote:
> Martin,
>
> I did not explicitly open new ssh transports. Was it done inside commit? If so, why wasn't the disconnect called?

OK, I think there is a bug where transports that are automatically
opened from a url during an operation like this will not be closed
automatically.  It will only be a concrete problem in cases like yours
where you have a long lived process opening multiple trees bound to
remote locations, but it is worth fixing.  We could add a __del__
method, or have some kind of scope that tells it when to disconnect.
Perhaps when the branch is opened, the tree that opens it should add a
cleanup on itself to close it again.

In the past del methods have been deprecated because they tend to
inhibit python gc and to make the time of disconnection unpredictable.

Would you like to try fixing this?

-- 
Martin



More information about the bazaar mailing list