Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN recover deleted file

If I delete a file in a trunk of an svn repository, can I get the file if I ask for a previous version, or was the file deleted forever?

like image 888
Sosi Avatar asked Apr 06 '10 09:04

Sosi


2 Answers

You will get it in the previous revision.

Actually, there is no "standard" way to get rid of a file completely in a Subversion repository. There is quite a lot of heated discussion around whether such a feature should be implemented (see this bug report and this blog post on the issue for example).

like image 52
Pekka Avatar answered Oct 06 '22 03:10

Pekka


There's no way (as of client version 1.6.18) to get the client to restore a previous version by addressing a deleted file directly since the client does not handle path change histories well.

One way to get the file is to export an older revision (to some safe place) You have to export the whole directory at that version. And then, if you want to commit the reversion to that revision, copy the file into place, add it, commit;

like image 44
Rondo Avatar answered Oct 06 '22 05:10

Rondo