fs: transfer: try reflink (#6853)

If supported, reflink, will provide the fastest transfer possible.
That being said, right now we use `move` in most of the places,
which still takes presidence.

Pre-requisite for #6387
This commit is contained in:
Ruslan Kuprieiev
2021-10-24 22:46:02 +03:00
committed by GitHub
parent 5017c2f282
commit 38cbebfb28
5 changed files with 34 additions and 21 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ def test_clear_on_download_err(tmp_dir, dvc, index, mocker):
assert list(index.hashes())
mocker.patch("dvc.fs.local.LocalFileSystem.upload", side_effect=Exception)
mocker.patch("dvc.fs.utils.transfer", side_effect=Exception)
with pytest.raises(DownloadError):
dvc.pull()
assert not list(index.hashes())
@@ -83,7 +83,7 @@ def test_partial_upload(tmp_dir, dvc, index, mocker):
raise Exception("stop baz")
return original(self, from_file, to_info, name, **kwargs)
mocker.patch.object(LocalFileSystem, "upload", unreliable_upload)
mocker.patch("dvc.fs.utils.transfer", unreliable_upload)
with pytest.raises(UploadError):
dvc.push()
assert not list(index.hashes())