Skip to content

Commit

Permalink
index: fix index entries for partial import stages
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed Feb 8, 2023
1 parent 676b1e4 commit 93c556a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dvc/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ def get_entry(self) -> "DataIndexEntry":
if not dep.obj and dep.files:
dep.obj = dep.get_obj()
entry.obj = dep.obj
if not entry.hash_info and dep.obj:
entry.hash_info = dep.obj.hash_info
return entry

def changed_checksum(self):
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def _data_prefixes(self) -> Dict[str, "_DataPrefixes"]:
workspace, key = out.index_key
if filter_info and out.fs.path.isin(filter_info, out.fs_path):
key = key + out.fs.path.relparts(filter_info, out.fs_path)
if out.meta.isdir:
if out.meta.isdir or out.stage.is_import and out.stage.deps[0].meta.isdir:
prefixes[workspace].recursive.add(key)
prefixes[workspace].explicit.update(key[:i] for i in range(len(key), 0, -1))
return prefixes
Expand Down

0 comments on commit 93c556a

Please sign in to comment.