From 36f6f29ac8c7426b81d4d17a9c89d5e6651ca6d5 Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Tue, 6 Sep 2022 19:14:52 +0900 Subject: [PATCH] index: set source fs/path for import data index entries --- dvc/repo/index.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dvc/repo/index.py b/dvc/repo/index.py index bfc725d65..dfae2aee0 100644 --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -252,7 +252,7 @@ class Index: if out.files: out.obj = out.get_obj() - data_index[key] = DataIndexEntry( + entry = DataIndexEntry( meta=out.meta, obj=out.obj, hash_info=out.hash_info, @@ -260,6 +260,11 @@ class Index: cache=out.odb, remote=remote, ) + if out.stage.is_import and not out.stage.is_repo_import: + entry.fs = out.stage.deps[0].fs + entry.path = out.stage.deps[0].fs_path + entry.cache = out.odb + data_index[key] = entry return dict(by_workspace)