From aa9ad735cd71ca6d31bba6bc4a0f2db35b935999 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sat, 23 Sep 2023 01:49:58 +0300 Subject: [PATCH] index: add dump_data_to_outs --- dvc/repo/index.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dvc/repo/index.py b/dvc/repo/index.py index a32a9c737a9..f23fb42f04a 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