From f5699ce16b19dce3a06148d70d56242bf443d2f2 Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Mon, 5 Dec 2022 15:33:09 +0900 Subject: [PATCH] update: disable rev/to-remote/no-download for worktrees --- dvc/repo/update.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dvc/repo/update.py b/dvc/repo/update.py index 17e19fbf2..142942a1f 100644 --- a/dvc/repo/update.py +++ b/dvc/repo/update.py @@ -64,6 +64,18 @@ def update( remote_obj = self.cloud.get_remote(name=remote) if not remote_obj.worktree: raise StageUpdateError(other_stage_infos[0].stage.relpath) + if rev: + raise InvalidArgumentError( + "--rev can't be used with worktree update" + ) + if no_download: + raise InvalidArgumentError( + "--no-download can't be used with worktree update" + ) + if to_remote: + raise InvalidArgumentError( + "--to-remote can't be used with worktree update" + ) update_worktree_stages( self, other_stage_infos,