From f417f49c6e9cb0c92272c886a21ce7d414579c95 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Wed, 10 Apr 2019 18:58:28 -0500 Subject: [PATCH] dvc: deprecate --remove-outs Close #1853 --- dvc/command/run.py | 2 +- dvc/stage.py | 5 +++++ scripts/completion/dvc.zsh | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dvc/command/run.py b/dvc/command/run.py index f29e15207..3a69a8852 100644 --- a/dvc/command/run.py +++ b/dvc/command/run.py @@ -175,7 +175,7 @@ def add_parser(subparsers, parent_parser): "--remove-outs", action="store_true", default=False, - help="Remove outputs before running the command.", + help="Deprecated, this is now the default behavior", ) run_parser.add_argument( "--no-commit", diff --git a/dvc/stage.py b/dvc/stage.py index eecfaa2b2..52769264a 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -471,6 +471,11 @@ class Stage(object): # NOTE: remove outs before we check build cache if remove_outs: + logger.warning( + "--remove-outs is deprecated." + " It is now the default behavior," + " so there's no need to use this option anymore." + ) stage.remove_outs(ignore_remove=False) logger.warning("Build cache is ignored when using --remove-outs.") ignore_build_cache = True diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index 606dc778f..9588e0af8 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -88,7 +88,6 @@ _dvc_run=( "--no-exec[Only create stage file without actually running it.]" "--overwrite-dvcfile[Overwrite existing dvc file without asking for confirmation.]" "--ignore-build-cache[Run this stage even if it has been already ran with the same command/dependencies/outputs/etc before.]" - "--remove-outs[Remove outputs before running the command.]" "--no-commit[Don't put files/directories into cache.]" {-f,--file}"[Specify name of the stage file.]:File:_files" {-c,--cwd}"[Deprecated, use -w and -f instead.]:CWD:_files -/"