Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is "local delete, incoming delete upon update" of a directory a conflict?

This is more of a hypothetical question, but I've always wondered why this case is considered a conflict. If I've locally deleted a directory which has already been deleted from the repository, why wouldn't this just resolve as you'd expect? What corner case am I not thinking of which would make the conflict status necessary?

like image 566
gzak Avatar asked Jul 01 '13 15:07

gzak


1 Answers

I started digging in to this, and I think it may come from the fact that SVN is not entirely sure whether the delete is a simple delete, or actually a move (a copy, and a delete). From the documentation, it states:

Because a move in Subversion is implemented as a copy operation followed by a delete operation, and these two operations cannot be easily related to one another during an update, all Subversion can warn you about is an incoming delete operation on a locally modified file. This delete operation may be part of a move, or it could be a genuine delete operation.

So it sounds like to be safe, SVN warns you instead that you should update. Of course, it could ignore the delete "conflict", and simply copy over the newly moved folder, but I think some metadata may perhaps be lost with that locally.

One potential fix is to revert your change locally and let the incoming update handle deletion.

like image 98
Igor Avatar answered Oct 07 '22 01:10

Igor