From 31551e6e2e4534047c0817111422af3489d95ca5 Mon Sep 17 00:00:00 2001 From: Sadie Bartholomew Date: Tue, 29 Oct 2019 19:13:17 +0000 Subject: [PATCH 1/4] CLI: change return output for 'checkout' and 'pull' commands Change messages output after return of some commands: * Remove warning for 'dvc checkout' & commands calling it under the hood * Add an informational message output for 'dvc pull' command Fixes #2685. --- dvc/repo/checkout.py | 6 ------ dvc/repo/pull.py | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dvc/repo/checkout.py b/dvc/repo/checkout.py index 6f8abde42b..f753c14190 100644 --- a/dvc/repo/checkout.py +++ b/dvc/repo/checkout.py @@ -50,12 +50,6 @@ def _checkout( total=total, unit="file", desc="Checkout", disable=total == 0 ) as pbar: for stage in stages: - if stage.locked: - logger.warning( - "DVC-file '{path}' is locked. Its dependencies are" - " not going to be checked out.".format(path=stage.relpath) - ) - failed.extend( stage.checkout(force=force, progress_callback=pbar.update_desc) ) diff --git a/dvc/repo/pull.py b/dvc/repo/pull.py index 7c92588247..6fbce88511 100644 --- a/dvc/repo/pull.py +++ b/dvc/repo/pull.py @@ -1,6 +1,11 @@ from __future__ import unicode_literals -from . import locked +import logging + +from dvc.repo import locked + + +logger = logging.getLogger(__name__) @locked @@ -20,11 +25,16 @@ def pull( jobs, remote=remote, all_branches=all_branches, - all_tags=all_tags, with_deps=with_deps, + all_tags=all_tags, recursive=recursive, ) self._checkout( - targets=targets, with_deps=with_deps, force=force, recursive=recursive + targets=targets, + with_deps=with_deps, + force=force, + recursive=recursive, + ) + logger.info("Data retrieved successfully from DVC remote storage.") return processed_files_count From 0dd4d2361eb8684b67790558303f54c0af0910ae Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 1 Nov 2019 16:40:06 +0200 Subject: [PATCH 2/4] fix formatting --- dvc/repo/pull.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dvc/repo/pull.py b/dvc/repo/pull.py index 6fbce88511..9624fbc4c8 100644 --- a/dvc/repo/pull.py +++ b/dvc/repo/pull.py @@ -30,11 +30,7 @@ def pull( recursive=recursive, ) self._checkout( - targets=targets, - with_deps=with_deps, - force=force, - recursive=recursive, - + targets=targets, with_deps=with_deps, force=force, recursive=recursive ) logger.info("Data retrieved successfully from DVC remote storage.") return processed_files_count From 5c8a312002430ff8bafd9d7bee1e10e8784ed333 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 1 Nov 2019 16:41:22 +0200 Subject: [PATCH 3/4] fix order --- dvc/repo/pull.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/repo/pull.py b/dvc/repo/pull.py index 9624fbc4c8..cd052b651f 100644 --- a/dvc/repo/pull.py +++ b/dvc/repo/pull.py @@ -25,8 +25,8 @@ def pull( jobs, remote=remote, all_branches=all_branches, - with_deps=with_deps, all_tags=all_tags, + with_deps=with_deps, recursive=recursive, ) self._checkout( From c999b5d270e90b646fbfdb3cb147c172d07af60e Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 1 Nov 2019 16:45:41 +0200 Subject: [PATCH 4/4] remove info message --- dvc/repo/pull.py | 1 - 1 file changed, 1 deletion(-) diff --git a/dvc/repo/pull.py b/dvc/repo/pull.py index cd052b651f..822897e292 100644 --- a/dvc/repo/pull.py +++ b/dvc/repo/pull.py @@ -32,5 +32,4 @@ def pull( self._checkout( targets=targets, with_deps=with_deps, force=force, recursive=recursive ) - logger.info("Data retrieved successfully from DVC remote storage.") return processed_files_count