diff --git a/dvc/cli.py b/dvc/cli.py index ceb0cf023..9653df092 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -325,6 +325,11 @@ def parse_args(argv=None): default=False, help='Fetch cache for all dependencies of the ' 'specified target.') + pull_parser.add_argument( + '-f', + '--force', + help='Do not prompt when removing ' + 'working directory files.') pull_parser.set_defaults(func=CmdDataPull) # Push diff --git a/dvc/command/data_sync.py b/dvc/command/data_sync.py index 839da86f4..62586f90a 100644 --- a/dvc/command/data_sync.py +++ b/dvc/command/data_sync.py @@ -25,7 +25,8 @@ class CmdDataPull(CmdDataBase): show_checksums=self.args.show_checksums, all_branches=self.args.all_branches, all_tags=self.args.all_tags, - with_deps=self.args.with_deps) + with_deps=self.args.with_deps, + force=self.args.force) except Exception as exc: self.project.logger.error('Failed to pull data from the cloud', exc) diff --git a/dvc/project.py b/dvc/project.py index 69050f029..5763bc2c7 100644 --- a/dvc/project.py +++ b/dvc/project.py @@ -762,7 +762,8 @@ class Project(object): all_branches=False, show_checksums=False, with_deps=False, - all_tags=False): + all_tags=False, + force=False): self.fetch(target, jobs, remote=remote, @@ -770,7 +771,7 @@ class Project(object): all_tags=all_tags, show_checksums=show_checksums, with_deps=with_deps) - self.checkout(target=target, with_deps=with_deps) + self.checkout(target=target, with_deps=with_deps, force=force) def _local_status(self, target=None): status = {}