[MERGE] Give nicer errors for some write operations on read-only transports.

James Westby jw+debian at jameswestby.net
Mon Sep 3 22:39:29 BST 2007


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.

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.

Thanks,

James

-- 
  James Westby   --    GPG Key ID: B577FE13    --     http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256



More information about the bazaar mailing list