Skip to content

Misleading warning (Removing before checkout) #2016

@pauloalves86

Description

@pauloalves86

During a manual update of a file, I've faced the following message:

WARNING: data 'foo' exists. Removing before checkout.

It puzzled me, I thought it would overwrite my file, since checkout restores the file based on current DVC file.
I don't know why the file was replaced by the same file. It took a long time (huge file on a HDD).

@efiop provided me a script that reproduces the message:

#!/bin/bash     
                
set -e          
set -x          
                
rm -rf myrepo   
mkdir myrepo    
cd myrepo       
                
git init        
dvc init        
                
echo foo > foo  
dvc add foo     
                
echo bar > bar  
dvc add bar     
                
echo bar > foo  
dvc add foo     
cat foo         
dvc status

I think a better message and avoiding re-copying the file would be great improvements.

Metadata

Metadata

Assignees

Labels

bugDid we break something?p1-importantImportant, aka current backlog of things to doresearchuiuser interface / interaction

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions