Skip to content

Conversation

django-kz
Copy link
Contributor

Some summary statistics regarding the folder/file.
How many files were added/deleted/modified. How the size was changed.
TO DO things:
1)To add support for detecting diff after dvc move
command.
2)To add unit tests.

@django-kz django-kz changed the title dvc: add support for dvc diff command [WIP]dvc: add support for dvc diff command Mar 25, 2019
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b_commit = ... a_ref looks pretty strange :) That's why I would probably just name params just --ref.

@django-kz
Copy link
Contributor Author

@shcheklein, @efiop Guys take a look, and we still need to discuss the CLI syntax.

@efiop
Copy link
Contributor

efiop commented Mar 29, 2019

@django-kz I don't think your patch works:

#!/bin/bash               
                          
set -e                    
set -x                    
                          
rm -rf myrepo             
mkdir myrepo              
cd myrepo                 
git init                  
dvc init                  
                          
git add .dvc              
git commit -m init        
git tag v0                
                          
mkdir dir                 
echo foo > dir/foo        
dvc add dir               
                          
git add dir.dvc .gitignore
git commit -m dir         
                          
dvc diff v0               

prints

dvc diff from 3faa54e3c1b68cc890ab2192214041a44408d7ca to baad677e62d8b8d44e783dea4314a1099a0ecfd0 
                                                                                                   
diff for 'dir'                                                                                     
-dir with md5 aa5f690fab1a8e34ad009d3de2ad38cb.dir                                                 
                                                                                                   
0 files not changed, 0 files modified, 0 files added, 1 file deleted, size was decreased by 4 Bytes

which doesn't seem right. Or am I missing something?

@django-kz
Copy link
Contributor Author

django-kz commented Mar 29, 2019

@efiop Actually, here it shows what changes happened from your current ref and specified one, I mean I expect it to work that way, so it is not a bug, it is a bad design )

@django-kz django-kz changed the title [WIP]dvc: add support for dvc diff command dvc: add support for dvc diff command Apr 3, 2019
@efiop
Copy link
Contributor

efiop commented Apr 3, 2019

@django-kz Also, please take a look at codeclimate report. It has some really good points in it.

django-kz added 23 commits April 5, 2019 15:02
Getting git snapshots of file/directory using GitTree object
repo.diff now returns list of dictionaries for each file/directory change
Now the dvc diff reference command will return
the difference betweent from specified commit to current HEAD.
@efiop
Copy link
Contributor

efiop commented Apr 5, 2019

Thanks! 🎉 Mind also adding a simple command reference to dvc.org? E.g. see iterative/dvc.org@6406bb8 as an example. Or, at least add an issue for it to dvc.org issues.

@efiop efiop merged commit 291fa05 into iterative:master Apr 5, 2019
@efiop
Copy link
Contributor

efiop commented Apr 5, 2019

@django-kz Also, please don't forget to at least add those "TODO"s as issues to https://github.com/iterative/dvc/issues .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants