diff --git a/dvc/repo/index.py b/dvc/repo/index.py index a32a9c737a..f23fb42f04 100644 --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -154,6 +154,20 @@ def _load_data_from_outs(index, prefix, outs): ) +def _dump_data_to_outs(index, outs): + for out in outs: + if not out.use_cache: + continue + + _, key = out.index_key + entry = index.get(key) + if entry is None: + continue + + out.meta = entry.meta + out.hash_info = entry.hash_info + + def _load_storage_from_out(storage_map, key, out): from dvc.cachemgr import LEGACY_HASH_NAMES from dvc.config import NoRemoteError