[PATCH] Enabling writable http transports (allows plugins to extend bzr)

Robert Collins robertc at robertcollins.net
Wed Aug 23 08:16:06 BST 2006


On Mon, 2006-08-21 at 09:41 -0500, John Arbash Meinel wrote:
> 
> I'm also a little concerned that is_readonly() is not going to be a
> cheap function in the future, so it may not be proper to call it for
> every abspath() call.
> 
> In discussion with Robert on IRC, the thought is that 'is_readonly()'
> is
> actually meant to check if Transport.base is writable. So it actually
> should go to the remote host, and ask if it can write to that
> directory.
> It isn't meant as just a test for the Transport as a whole.
> 
> Now, it is possible that is_readonly() should cache the status, making
> the assumption that the readonly status won't change during the
> lifetime
> of a Transport object.
> 
> I'd like to get Robert's thoughts on this.

In general I am against caches and memoisation

Long lived uses are likely to get tripped up by such things.

I think, if we want to ensure that is_readonly is no expensive, we
should just not call it often :).

-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: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060823/d674a66c/attachment.pgp 


More information about the bazaar mailing list