Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: --recursive flag #3760

Merged
merged 4 commits into from
May 8, 2020
Merged

Conversation

nik123
Copy link
Contributor

@nik123 nik123 commented May 7, 2020

Fixes #3511

See iterative/dvc.org#1259

dvc/repo/update.py Outdated Show resolved Hide resolved
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 iterative: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