From d415a05460ce6fed220fd7407002c2aa2bd85187 Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Tue, 6 Dec 2022 18:58:02 +0900 Subject: [PATCH] remote: disable gc and status -c for versioned remotes --- dvc/data_cloud.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dvc/data_cloud.py b/dvc/data_cloud.py index 7e3724c0e..7ba148ca5 100644 --- a/dvc/data_cloud.py +++ b/dvc/data_cloud.py @@ -97,6 +97,10 @@ class DataCloud: command: str = "", ) -> "HashFileDB": remote = self.get_remote(name=name, command=command) + if remote.fs.version_aware or remote.worktree: + raise RemoteConfigError( + f"'{command}' is unsupported for cloud versioned remotes" + ) return remote.odb def _log_missing(self, status: "CompareStatusResult"):