Merge pull request #1872 from mroutis/fix-1853

dvc: deprecate --remove-outs
This commit is contained in:
Ruslan Kuprieiev
2019-04-11 07:01:22 +03:00
committed by GitHub
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -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",
+5
View File
@@ -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
-1
View File
@@ -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 -/"