mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-12 07:18:23 +01:00
index: use out.hash_info for complete imports
This commit is contained in:
+5
-1
@@ -136,7 +136,11 @@ def _load_data_from_outs(index, prefix, outs):
|
||||
if out.stage.is_import and not out.stage.is_repo_import:
|
||||
dep = out.stage.deps[0]
|
||||
entry.meta = dep.meta
|
||||
entry.hash_info = dep.hash_info
|
||||
if out.hash_info:
|
||||
entry.hash_info = out.hash_info
|
||||
else:
|
||||
# partial import
|
||||
entry.hash_info = dep.hash_info
|
||||
|
||||
# FIXME PyGTrie-based DataIndex doesn't remove entry.key during
|
||||
# index.add, so we have to set the entry manually here to make
|
||||
|
||||
@@ -150,6 +150,8 @@ class TestImportURLVersionAware:
|
||||
|
||||
dvc.pull()
|
||||
assert (tmp_dir / "data_dir" / "subdir" / "file").read_text() == "file"
|
||||
|
||||
dvc.commit(force=True)
|
||||
assert dvc.status() == {}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ dependencies = [
|
||||
"configobj>=5.0.6",
|
||||
"distro>=1.3",
|
||||
"dpath<3,>=2.1.0",
|
||||
"dvc-data>=1.7.0,<1.8.0",
|
||||
"dvc-data>=1.8.0,<1.9.0",
|
||||
"dvc-http>=2.29.0",
|
||||
"dvc-render>=0.3.1,<1",
|
||||
"dvc-studio-client>=0.9.2,<1",
|
||||
|
||||
Reference in New Issue
Block a user