SVN: local delete/edit, incoming delete upon update

Have you ever encounter such a weird situation that you have no idea what happend and how to resolve this SVN conflict:

1
2
3
$ svn st
! + C foo
> local edit, incoming delete upon update

or

1
2
3
$ svn st
! C foo
> local delete, incoming delete upon update

This is because that file has been deleted from repository and you either edited or deleted it in your working directory. Even though it’s the right thing for you to do to delete the file locally, SVN will not satisfy with that! And here is a simple way to resolve this conflict: (NOTE: Here I assume you indeed want to delete that file. If you don’t, please BACKUP that file first and after done all steps here, commit it back to repository.)

1
2
3
4
$ touch foo
$ svn revert foo
$ rm foo
$ svn st

Done.