Index: support custom meta comparison function in diff #237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
index.diff(meta_cmp_key=...)
parameterold.meta
andnew.meta
(rather than comparing the entire meta instance)sorted(key=...)
, i.e.meta_cmp_key=lambda m: m.etag
can be used to only compareold.etag == new.etag
in diffentry.meta
is none,meta_cmp_key
will be ignoredindex.checkout()
will be passed intodiff()
(only used whenold
index is also passed intocheckout
)In DVC we want to avoid pushing a new version when the old and new checksums match, even if the version_ids do not match. i.e. someone else may have pushed a new version_id, but if their etag matches ours we do not need to push another duplicate copy, the "latest" version is still what we want it to be.
prerequisite for iterative/dvc#8409