-
Notifications
You must be signed in to change notification settings - Fork 1.3k
commit: make sure deps/outs exist #4305
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,10 +199,7 @@ def changed_cache(self, filter_info=None): | |
|
|
||
| return self.cache.changed_cache(self.checksum, filter_info=filter_info) | ||
|
|
||
| def status(self): | ||
| if self.checksum and self.use_cache and self.changed_cache(): | ||
| return {str(self): "not in cache"} | ||
|
|
||
| def workspace_status(self): | ||
| if not self.exists: | ||
| return {str(self): "deleted"} | ||
|
|
||
|
|
@@ -214,6 +211,12 @@ def status(self): | |
|
|
||
| return {} | ||
|
|
||
| def status(self): | ||
| if self.checksum and self.use_cache and self.changed_cache(): | ||
| return {str(self): "not in cache"} | ||
|
|
||
| return self.workspace_status() | ||
|
|
||
| def changed(self): | ||
| status = self.status() | ||
| logger.debug(str(status)) | ||
|
|
@@ -280,6 +283,7 @@ def save(self): | |
| self.info = self.save_info() | ||
|
|
||
| def commit(self): | ||
| assert self.info | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this because https://github.com/iterative/dvc/blob/2f48bb4089c25c2144fa3c9d9d8d0ba69c4c3e51/dvc/cache/base.py#L280 shouldn't be there, really. It is a leftover from erepo/tree hacks we used to have, but some code is still using it, so need to get back to it in a separate PR. |
||
| if self.use_cache: | ||
| self.cache.save(self.path_info, self.cache.tree, self.info) | ||
|
|
||
|
|
||
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.
This status hack backfired a bit. Need to set self.tree properly here (it will pretty much be RepoTree for the external repo that this belongs to), so that things like
self.exists()work automatically.