peterbourgon/diskv — pull request #19 by jonboulle (2014-12-12 01:45:01+00:00)
Title: Import: don't fail for cross-device imports

rename(2) only works on a single device. When trying to import a file
(with move=true) from a different device to the one on which the diskv is
located, we should gracefully fall back to copying the file and then removing
it (like mv(1) does).

@peterbourgon This is a little awkward to test, because we don't want to start making assumptions about filesystems; but rest assured it works, and the reason I know that is because before this diff the tests fail on my laptop ;-) (since tmpfs is a separate filesystem)