status: implement support for imported files

Fixes #2959
This commit is contained in:
Fábio Santos
2020-01-14 17:54:20 +00:00
parent 0ead08805e
commit f949b31976
2 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ def _local_status(self, targets=None, with_deps=False):
stages = self.collect(None, with_deps=with_deps)
for stage in stages:
if stage.locked:
if stage.locked and not stage.is_repo_import:
logger.warning(
"DVC-file '{path}' is locked. Its dependencies are"
" not going to be shown in the status output.".format(
@@ -27,7 +27,7 @@ def _local_status(self, targets=None, with_deps=False):
)
)
status.update(stage.status())
status.update(stage.status(for_status_command=True))
return status
+4 -2
View File
@@ -1006,10 +1006,12 @@ class Stage(object):
return ret
@rwlocked(read=["deps", "outs"])
def status(self):
def status(self, for_status_command=False):
ret = []
if not self.locked:
show_import = self.is_repo_import and for_status_command
if not self.locked or show_import:
deps_status = self._status(self.deps)
if deps_status:
ret.append({"changed deps": deps_status})