From 1b1f8f9d22d46bb89ee08aa626d85c518640271e Mon Sep 17 00:00:00 2001 From: Alexander Schepanovski Date: Tue, 31 Dec 2019 14:30:12 +0700 Subject: [PATCH] ui: error out for meaningless options for non-cloud dvc status --- dvc/repo/status.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dvc/repo/status.py b/dvc/repo/status.py index c5ec38db6..2e9a7a948 100644 --- a/dvc/repo/status.py +++ b/dvc/repo/status.py @@ -1,7 +1,9 @@ import logging +from itertools import compress from funcy.py3 import cat +from dvc.exceptions import DvcException from . import locked @@ -113,4 +115,15 @@ def status( remote=remote, all_tags=all_tags, ) + + ignored = list( + compress( + ["--all-branches", "--all-tags", "--jobs"], + [all_branches, all_tags, jobs], + ) + ) + if ignored: + msg = "the following options are meaningless for local status: {}" + raise DvcException(msg.format(", ".join(ignored))) + return _local_status(self, targets, with_deps=with_deps)