[MERGE] Give nicer errors for some write operations on read-only transports.
Robert Collins
robertc at robertcollins.net
Mon Sep 3 22:44:48 BST 2007
On Mon, 2007-09-03 at 22:39 +0100, James Westby wrote:
> On (03/09/07 17:24), Robert Collins wrote:
> > This is the wrong approach to the problem. On local disk we will encounter
> > read only problems from time to time. LBYL should be avoided, instead
> > handle the problem when you fail to write more accurately.
>
> The problem I have with this is that the message that I was displaying
> was trying to hint to people that if they were on http then they could
> use sftp or similar to approach the problem.
>
> If you then involve lack of write permission on local transport then
> changing transport probably wont help.
>
> This means that there may need to be a different approach, as you need
> to differentiate write problems because the transport is unsuitable, and
> to problems for other reasons.
>
> As I understand it your aversion to "look before you leap" was for
> performance issues, but I don't think that would make a big enough
> impact here to rule out a change that will hopefully help confused new
> users find out what they need to do to solve their problem.
If you consider webdav where 'is_readonly' requires a round trip to
establish writability, you're adding (for me) 300ms to write operations
that succeed - which is the common case.
> I will look in to catching and throwing exceptions, but I don't want to
> get to a situation where we attempt to suggest users consider the
> transport they are using when they try and push to a read-only
> directory. This will depend on the exceptions that are currently thrown,
> and it is not very consistent currently.
This paragraph suggests a route to fix the problem :)
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070904/0aed0378/attachment.pgp
More information about the bazaar
mailing list