diff --git a/dvc/command/config.py b/dvc/command/config.py index 123566627..3ef3c2830 100644 --- a/dvc/command/config.py +++ b/dvc/command/config.py @@ -173,11 +173,11 @@ level_group.add_argument( help="Use system config.", ) level_group.add_argument( - "--repo", + "--project", dest="level", action="store_const", const="repo", - help="Use repo config (.dvc/config).", + help="Use project config (.dvc/config).", ) level_group.add_argument( "--local", diff --git a/tests/func/test_cache.py b/tests/func/test_cache.py index ad50db6ec..18822250c 100644 --- a/tests/func/test_cache.py +++ b/tests/func/test_cache.py @@ -258,5 +258,5 @@ def test_cache_dir_local(tmp_dir, dvc, caplog): assert path in caplog.text caplog.clear() - assert main(["cache", "dir", "--repo"]) == 251 + assert main(["cache", "dir", "--project"]) == 251 assert "option 'dir' doesn't exist in section 'cache'" in caplog.text diff --git a/tests/func/test_config.py b/tests/func/test_config.py index bf3a406b3..72ca171f4 100644 --- a/tests/func/test_config.py +++ b/tests/func/test_config.py @@ -85,13 +85,17 @@ def test_config_set_local(tmp_dir, dvc): (["remote.myremote.profile"], 0, "iterative"), (["remote.myremote.profile", "--local"], 0, "iterative"), ( - ["remote.myremote.profile", "--repo"], + ["remote.myremote.profile", "--project"], 251, "option 'profile' doesn't exist", ), (["remote.other.url"], 0, "gs://bucket/path"), (["remote.other.url", "--local"], 0, "gs://bucket/path"), - (["remote.other.url", "--repo"], 251, "remote 'other' doesn't exist"), + ( + ["remote.other.url", "--project"], + 251, + "remote 'other' doesn't exist", + ), ], ) def test_config_get(tmp_dir, dvc, caplog, args, ret, msg): @@ -262,7 +266,8 @@ def test_config_show_origin_single(tmp_dir, dvc, caplog): caplog.clear() assert ( - main(["config", "--show-origin", "--repo", "remote.myremote.url"]) == 0 + main(["config", "--show-origin", "--project", "remote.myremote.url"]) + == 0 ) assert ( "{}\t{}\n".format(os.path.join(".dvc", "config"), "s3://bucket/path") @@ -276,7 +281,7 @@ def test_config_show_origin_single(tmp_dir, dvc, caplog): ) caplog.clear() - assert main(["config", "--list", "--repo", "--show-origin"]) == 0 + assert main(["config", "--list", "--project", "--show-origin"]) == 0 assert ( "{}\t{}\n".format( os.path.join(".dvc", "config"),