Skip to content

Conversation

@nik123
Copy link
Contributor

@nik123 nik123 commented May 7, 2020

Fixes #3511

See treeverse/dvc.org#1259

stages = self.collect(targets, recursive=recursive)
else:
stages = set()
for target in targets:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also

if isinstance(targets, str):
    targets = [targets]     

just as a convenience (we have that in dvc add too), since it is guaranteed someone will try to misuse it 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way are the any other commands which should contain isinstance(targets, str) check? repo.used_cache, repo.status, repo._checkout seem good candidates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nik123 Probably not used_cache but the rest could use it, sure. But let's not bother with it in this PR, it is out of scope 🙂

@nik123 nik123 requested a review from efiop May 8, 2020 13:44
@efiop efiop merged commit c922da4 into treeverse:master May 8, 2020
@efiop
Copy link
Contributor

efiop commented May 8, 2020

Thanks @nik123 ! 🙏

@nik123 nik123 deleted the UpdateCommandRecursive branch May 9, 2020 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update: add -R, --recursive flag

2 participants