views:

427

answers:

4

Hi,

We had a file in our repository that we deleted several revisions ago. How do we get it back using TortoiseSVN without reverting our entire repository?

+1  A: 

In the repo browser, there is a menu that says some to the effect of goto version. From here you can browse the filed that were availble in that revision and drag and drop the file out. i would check the actual program bur I'm currently on my phone.

Hope this helps

edude05
A: 

Once you know the revision number where the file was deleted (using the repository browser is probably the easiest way to find this). Do a check out to a new location before that revision.

Jeremy
+1  A: 

The other answers appear to focus on restoring an entire revision (using a different location), so here's how to only restore a single file, without having to check out an entire revision, using TortoiseSVN:

  1. Open the revision log for the revision that deleted the file.
  2. Find the file in the changelist.
  3. Right-click the file and select "Revert changes from this revision...". Answer yes.

The file is restored and re-added to the repository. I am not 100% certain if Subversion will treat it as a different file, or as a new revision of the file.

Michael Madsen
+6  A: 
CMS
But this will lose the file history. Better to use the repository browser and from there use "copy to wc". That way the file history is preverved.Or another way: revert only the revision where the file was removed (4 entries above the "Save revision to..." in your screenshort).
Stefan