[win32] Permission denied in fancy_rename
Robert Collins
robertc at robertcollins.net
Thu May 4 01:43:47 BST 2006
On Wed, 2006-05-03 at 19:27 -0500, John Arbash Meinel wrote:
> Robert Collins wrote:
> > On Wed, 2006-05-03 at 19:17 -0500, John Arbash Meinel wrote:
> >> Robert Collins wrote:
>
> ...
>
> >>>
> >> Well, you can just make it part of the api that you must run the
> >> generator to completion, and then the file will close itself.
> >
> > Dunno about you, but pulling multi mb files over wet spaghetti because
> > our interface doesn't allow closing when we have what we wanted would
> > really suck.
> >
> > Rob
> >
>
> If you know what you want, shouldn't you have used readv?
If you dont know what you want... is what I was describing. Of course
readv is better if you know.
> Most of our files are such that you really want the end of the file, not
> the beginning. What files would you be opening with a full get_bytes(),
> that you only want a little bit at the beginning?
In assessing an interface, it helps to look at failure modes,
particularly ones that wont be obvious. Having 'this file will be open
because you neglected to read it' is such a failure mode.
> Besides, we are still supporting the get() interface, if you want to be
> able to close early. It is just for when we are copying all of the file
> between two locations like with:
> t1.put('foo', t2.get('foo'))
>
> That we want to switch to get_bytes/put_bytes.
Erm, surely t2.copy_to(['foo'], t1) is nicer than put(get) anyway?
(because it allows fast-path optimisations which the less expressive
'I'm doing a put and a get' doesn't.
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/20060504/7decf782/attachment.pgp
More information about the bazaar
mailing list