Comment 15 for bug 257217

Revision history for this message
Martin Pool (mbp) wrote :

<https://code.launchpad.net/~mbp/bzr/220464-stale-locks/+merge/62582> should soon be ready to merge and should handle well the specific reported case of closing a window or killing a local process, by removing the lock the next time bzr runs.

Based on our experience with similar situations, I think trying to catch the sigterm or sighup and do nontrivial processing from there is likely to either not work or cause knock-on bugs. A few reasons: one is that signals tend to also kill the ssh process we're using to talk to the server; another is that Python error unwinding and signal handling is not all one might want.

Locally we can easily detect it's stale; remotely our connection is likely to have been killed or to be problematic to reopen. Over hpss we should concentrate on having the server process release the lock if the client goes away. Over sftp it's inherently hard but there I suppose we can work on just holding locks for the minimum time.