From f949b319762468c38a8611b7a3b3e128d6a4e52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Santos?= Date: Tue, 14 Jan 2020 17:54:20 +0000 Subject: [PATCH] status: implement support for imported files Fixes #2959 --- dvc/repo/status.py | 4 ++-- dvc/stage.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dvc/repo/status.py b/dvc/repo/status.py index 2e9a7a948..8f1672565 100644 --- a/dvc/repo/status.py +++ b/dvc/repo/status.py @@ -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 diff --git a/dvc/stage.py b/dvc/stage.py index 449cb261f..85832720b 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -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})