diff --git a/dvc/repo/status.py b/dvc/repo/status.py index 8f1672565..85299d8ff 100644 --- a/dvc/repo/status.py +++ b/dvc/repo/status.py @@ -10,14 +10,9 @@ from . import locked logger = logging.getLogger(__name__) -def _local_status(self, targets=None, with_deps=False): +def _joint_status(stages): status = {} - if targets: - stages = cat(self.collect(t, with_deps=with_deps) for t in targets) - else: - stages = self.collect(None, with_deps=with_deps) - for stage in stages: if stage.locked and not stage.is_repo_import: logger.warning( @@ -32,6 +27,15 @@ def _local_status(self, targets=None, with_deps=False): return status +def _local_status(self, targets=None, with_deps=False): + if targets: + stages = cat(self.collect(t, with_deps=with_deps) for t in targets) + else: + stages = self.collect(None, with_deps=with_deps) + + return _joint_status(stages) + + def _cloud_status( self, targets=None,