I deleted a file from my Eclipse work space but that file is in SVN repository. Could any one help me to get my deleted file from SVN without using the command line?
-
are u using tortoise svn ? – Vinod VT Feb 18 '14 at 06:12
-
I just Tried. When i click on SVN HISTORY on a folder. I see Deleted Files. AM susing Subversion Plugin in Eclipse. Under Revision, If i click on 'D' rows, they show deleted code/file – Raghunandan Krishnamurthy Feb 18 '14 at 06:13
-
this may helps you http://stackoverflow.com/questions/490522/what-is-the-correct-way-to-restore-a-deleted-file-from-svn – Vinod VT Feb 18 '14 at 06:14
-
@RaghunandanKrishnamurthy,I can able to see deleted file.But my question is how to get back that to my own workspace? – kavie Feb 18 '14 at 06:22
-
From Vinod's Link... Use the Tortoise SVN copy functionality to revert commited changes: Right click the parent folder that contains the deleted files/folder Select the "show log" Select and right click on the version before which the changes/deleted was done Select the "browse repository" Select the file/folder which needs to be restored and right click Select "copy to" which will copy the files/folders to the head revision Hope that helps – Raghunandan Krishnamurthy Feb 18 '14 at 06:24
-
1if you have simply deleted the file from local working copy but haven't committed yet, simply do a revert and undo your delete action will solve the problem. – Adrian Shum Feb 18 '14 at 06:25
-
Right CLick on Deleted Items, say COPY... it creates back those files.. works for me – Raghunandan Krishnamurthy Feb 18 '14 at 06:25
3 Answers
There's a simpliest way to recover the file with Eclipse+SVN only.
Go to SVN Repositories view, find a folder your file was located, make a right click and choose Show History. You will see the list of commits to THIS FOLDER in the History view. Please make sure it's switched to Remote Revisions. From the list of commits find a commit that deleted the file. In the pane below there's a list of files involved with this commit - you can find deleted files with minus sign. Double click will open this file in editor...

- 385
- 3
- 15
If you've deleted the file in Eclipse, Eclipse has told Subversion to mark the file for deletion. This means the next commit will delete the file. You'll have to do a revert.
If you've deleted this file via Internet Explorer or some other file browser, and didn't tell Subversion, then the file isn't marked for deletion. Simply updating the file will bring it back.
This is where the command line client sings. With the command line client, I could tell Subversion to update or revert a nonexistent file. With a GUI, I would first have to select the file, then tell Subversion what to do. But without a file, I can't do anything.
Easiest solution: Recreate the file. The contents are not important. It can be empty or contain a dirty limerick for all you care. You're basically making a file you can select with your file browser.
Then, you can select the file and tell Subversion and/or Eclipse via the Team menu to revert it. This way, it doesn't matter how the file was deleted. Subversion will restore the file back to its original checked out version.

- 105,218
- 39
- 216
- 337
Along the lines of Bryn's solution, using Subclipse, find the delete 'D' entry for the file in SVN history, right-click and do "Copy..." which will then ask you to specifiy a location in your Eclipse workspace. Click OK, it will probably take a little while, and that's it.
I first tried "Export...", but that didn't work for me, seems like subclipse is looking in HEAD, even though an older revision was selected.

- 649
- 8
- 13