[RFC] race-free-rename ?

Robert Collins robertc at robertcollins.net
Thu Oct 18 04:01:15 BST 2007


On Tue, 2007-10-16 at 09:04 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Martin Pool wrote:
> > On 10/16/07, Robert Collins <robertc at robertcollins.net> 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).
> 
> So IOW, it has the exact same behavior as the underlying OS's rename?

S/OS/OS or protocol. (Consider SFTP which defines no rename-to-replace
regardless of platform).

-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/051218a8/attachment.pgp 


More information about the bazaar mailing list