[RFC] race-free-rename ?

Robert Collins robertc at robertcollins.net
Thu Oct 18 04:02:37 BST 2007


On Tue, 2007-10-16 at 10:02 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > So, for packs, I'd like a rename() which is guaranteed race-free. That
> > is, it should fail if it cannot atomically rename the source to the
> > destination (e.g. if the destination already exists and the fs does not
> > support rename-over-the-top).
> > 
> > thoughts? comments on how to expose it?
> > 
> > -Rob
> 
> I thought that is what we have for Transport.rename (versus Transport.move).

Looks like rename is it, and I'm already using it. Yay.

-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/20071018/82f4c3c1/attachment.pgp 


More information about the bazaar mailing list