Skip to content

Feature Request: dvc status should only show "update available" for imported files if the md5 has changed #10542

@evatt-harvey-salinger

Description

@evatt-harvey-salinger

I've imported a file from another DVC project using dvc import <repo url> <file/path> --rev <branch> . Whenever I make another commit to the source repo (even if I don't change the imported file), and then I call dvc status there is always an update available for that file.

$ cd import-project/
$ dvc update test_data.txt --rev main
Importing 'test_data.txt (../source-project)' -> test_data.txt
$ dvc status
Data and pipelines are up to date.  
$ cd ../source-project/
$ touch new_random_file.txt
$ git commit -a -m "no changes to the dvc tracked file were made"
$ cd ../import-project/
$ dvc status                                        
test_data.txt.dvc:                                                            
        changed deps:
                update available:  test_data.txt (../source-project)

I understand that the revision I'm tracking is just the head of the branch, so the "update" is to bring the file.dvc's "rev_lock" field to the latest commit. However, the underlying md5 hash hasn't change... it would be really nice if there was a way to call dvc status such that it only checked if the hash had changed in the most recent commit. All it would have to do is verify the outs.md5 values are the same.

I know that I can specify a particular commit hash as the --rev when i do the import/update. However, I really do want to know if the file actually changed when i do dvc status. If i make the --rev a particular commit hash, it won't ever tell me if that file changes in a later commit.

As of now, there's no way to tell the difference between: 1) has the HEAD of the source repo changed 2) is the actually a new version of my imported file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: statusRelated to the dvc diff/list/statusfeature requestRequesting a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions