Hang at commit time when using sftp or bzr+ssh
Martin Packman
martin.packman at canonical.com
Thu Dec 8 23:49:26 UTC 2011
On 08/12/2011, Aaron Bentley <aaron at aaronbentley.com> wrote:
>
> Any time you're thinking about scopes and destructors, it's worth
> considering using a ContextManager. The transport itself could
> implement __exit__()
Half the time it seems thinking about context manager means your code
is already going down the wrong route.
In this case, it takes the problem of "doing this results in 9 ssh
connections that then hang around for a bit" and turns it into "doing
this seems to work but is massively slow because it's repeatedly
creating one ssh connection after another".
What seems to be needed instead of prompt cleanup is proper transport reuse.
Martin
More information about the bazaar
mailing list