-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
RepoTree: add support for subrepo traversal #4381
Conversation
Right now, no actual "functionality" is surfaced as `subrepos` is always set to False by default for now.
@efiop, I cannot split this into smaller PR, though more than half of it is tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design-wise I think this looks a lot better than the first PR, but the some of the function naming was a bit confusing at first.
It wasn't entirely clear to me that _get_repo()
and _get_tree_pairs()
were returning Repo
objs and tree pairs for subrepos (when the specified paths are inside a subrepo) until I read through everything a few times. Even one-liner comments for those methods explaining things would probably work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Peter, looks much better than the previous one. Though it is clear that some concepts are still under development, so let's treat this PR as an evolutionary and cleanup more on top.
Tests are failing due to #4229, as now we create a ".dvcignore" on every |
Right now, no actual "functionality" is surfaced as
subrepos
is always set to False by default for now.Subrepos are collected dynamically and trie is created to track those repos inside
RepoTree
, and this does not incur any costas
.dvcignore
is shared among subrepos andRepoTree
just utilizes them.Possible alternative design
cons: Hard to traverse, especially heirarchial traversal required for dvc repos, etc.
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏