TreeTransform assumes whole tree is on one filesystem; gives "invalid cross-device link"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned | ||
Breezy |
Triaged
|
Low
|
Unassigned |
Bug Description
Following error occurs when .bzr directory resides on different partition compared to versioned files.
den-notebook usr # LANG=C bzr revert /usr/src/
+N usr/src/
bzr: ERROR: [Errno 18] Invalid cross-device link
In my case I store all my Linux system settings in bazaar. So I have .bzr directory at the root of root file system and /usr/src/
Further strace usage showed:
) = 126###########- ] Revert phase:Apply phase 2/3
gettimeofday(
) = 126###########\ ] Revert phase:Apply phase:adding file 0/1
rename(
lstat64(
unlink(
lstat64(
rmdir("
I think it means that bzr tries to simply rename file instead of moving across different partitions.
Please fix.
P.S. Tested on bzr 1.17
tags: | added: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: |
added: treetransform removed: check-for-breezy |
I have a feeling this is a dupe but I can't find it.
As you identified the problem is that bzr assumes it can directly move files from the limbo directory in .bzr into the tree.
As a cheap but slow workaround we could just change the rename to a copy. It would probably be a cheap fix if you'd like to try.
Doing so would somewhat defeat the purpose of writing things into limbo first, and perhaps it would be better to identify a directory next to the source files where they should be written. Doing that would need to take into account that in extreme cases people's actual working tree may span filesystems.