If you ever want to resurrect files that you somehow deleted (like we did last week…) from Subversion – this is how it works:

1. Find the latest revision where the files (here: my_lost_folder) still existed (for example, 409)
2.  Do

svn copy http://repository.com/branches/old/lost_folder@409 ./lost_folder

The files are not only brought back to live, but also automatically added to Subversion again.

Good thing I read the SVN book yesterday :)

3 Comments »

  • Great site this http://www.realdevelopers.com and I am really pleased to see you have what I am actually looking for here and this this post is exactly what I am interested in. I shall be pleased to become a regular visitor :)

    Comment by SegureFus — April 4, 2009 @ 7:51 am
  • Oooops… the comment above is spam and I didn’t realize it at once. Only after seeing the website (now deleted) of the author, I became suspicious… and a quick search for “I shall be pleased to become a regular visitor :) ” yielded over 5000 results.
    Hard to imagine I once worked for a spam detection team in a huge & famous company.

    Comment by astro — April 5, 2009 @ 3:46 pm
  • Recently stumbled upon another case of lost changes to resurrect: Imagine you changed some files some iterations ago in a branch (e.g. release) and forgot to merge it back to trunk. Imagine further this branch was deleted or recreated from trunk in the meantime. So what to do? First of all find out the revision, in which your changes occured, lets say 12345. Then in the working copy folder do:

    svn merge http://repo.com/branches/release@12344
              http://repo.com/branches/release@12345 .
    Comment by Helga — May 26, 2009 @ 9:36 am

Email this Share this on Facebook Share this on LinkedIn Tweet This! RSS feed for comments on this post. TrackBack URL

Leave a comment