[patch] Cross-dev error, /etc versioning

Aaron Bentley aaron at aaronbentley.com
Tue Dec 16 16:21:58 GMT 2008


Miroslav Prymek wrote:
> Hello to all, 
> 
> I'am succesfully using bzr to version /etc using small scripts to correctly
> store and retrieve files modes/permitions/flags.
> 
> But there's one problem: when .bzr is on different FS then the versioned files,
> you get "Cross-device link" error with some operations. (see
> https://bugs.launchpad.net/bzr/+bug/286268 )
> 
> I have written a small patch for this problem (below). Please review if it is
> correct (as to the raised exceptions, directories handling etc.) and feel free
> to use it as you wish.
> 
> Please note that this patch breaks atomicity of the _FileMover.rename(...). I
> can't examine if it is a problem for bzr or not.

This is contrary to the purpose of _FileMover and TreeTransform in
general.  By the time we are renaming files into place, we want to know
that they've been successfully created on target filesystem.

Is it really so unreasonable to assume that .bzr inhabits the same
filesystem as the files it controls?

Aaron



More information about the bazaar mailing list