dvc: Failure to pull after importing a git repo
Please provide information about your setup
DVC version(i.e. dvc --version), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))
DVC 0.86.4, conda installation, Windows.
See https://discuss.dvc.org/t/importing-from-a-git-repo-then-pulling/320 for background.
After importing a directory from a git repository (not a dvc repository), dvc pull fails with ERROR: unexpected error - 'ExternalGitRepo' object has no attribute 'cache'.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 15 (15 by maintainers)
Works like a charm
@charlesbaynham, #3503 implemented exactly how you described.
dvc pullwill fetch using specifiedrev_lock.dvc importcan be used to import (or, forced re-import), and update will updaterev_lockifrevmoves. We haveupdate --revto move to a different revision.@charlesbaynham it actually does put it in the cache. Continuing your script:
But shouldn’t push it to the remote storage, indeed.
@skshetry in this case, I don’t understand why
dvc pullis even trying to pull from this import stage, since the output is already in cache ^ (and workspace).I think that’s the current
p0bug.dvc fetch\pullanddvc pushas well, just in case.Thanks for the bug report @charlesbaynham ! We’ll take a look ASAP.
@skshetry @efiop Fantastic, thank you! I’ll give it a try.
Able to reproduce with following tests:
Looks like it never worked before.
dvc importalready puts the file in the cache, anddvc updateshould be used for updating. Nevertheless, I’m trying to see what’s going on.