Search code examples
eclipsesvnsubclipse

I commited an svn file delete and now I want it back


I deleted a bunch of files from my env and committed the changes. Of course I now want one of them back.

What is the best way to bring the ONE file back out of the revision?

I have brought the file up from View History on the package (it is a java file), but don't see a way to bring it back short of copy and paste.

Eclipse 3.7.0, subclipse 1.6

UPDATE

It looks like Antonio Pérez and qor72 solutions both accomplish the goal. Antonio's can be done in eclipse but the number of reverts can be large. Also merge requests that one commit open changes.

I like qor72's solution. To access copy in this scenario:

  1. look at the history and find the deleted file.
  2. right click on file name and choose copy.
  3. select the original directory.
  4. OK.

Solution

  • What I have done in the past is ressurrect the file per the SVN documentation, for example:

    $ svn copy ^/calc/trunk/real.c@807 ./real.c
    

    Then readd/commit and off you go.