[patch] lockdir contention detection on sftp

Martin Pool mbp at sourcefrog.net
Thu Apr 20 02:16:16 BST 2006

On 20 Apr 2006, Robert Collins <robertc at robertcollins.net> wrote:
> On Wed, 2006-04-19 at 18:10 +1000, Martin Pool wrote:
> > At present sftp operations raise NoSuchFile if they get a generic
> > failure message.  This means that lock contention over sftp isn't
> > properly detected as such, and in general it seems a bit strange to
> > assume NoSuchFile is best.
> > 
> > This patch is one way to fix it: raise a generic PathError if we get a
> > generic failure from sftp.  Another way would be to treat any
> > transport-related error while trying to take the lock as possibly
> > indicating contention.
> Perhaps it should raise TransportError not PathError - PathError is a
> BzrNewError, but not a TransportError.

The errors it previously raised were subclasses of PathError so I'm
going to leave them there for the moment.

> Or perhaps we should have PathError be a TransportError.
> I mention this because it seems desirable that all the errors raised
> from Transport be TransportErrors.

We should probably unify PathError and TransportError.


More information about the bazaar mailing list