I managed to shoot myself in the foot this morning by doing the following:
- Started working on a change to my project
- Made a bunch of edits to a bunch of files
- Realized that my approach was all wrong, and that I needed to start over
- cd'd to the top level of my project and did a "svn --recursive revert ." to restore my local sandbox to its pre-changes state.
- Howled in horror as I realized that there had been a number of other changes outstanding in my local sandbox, and I had just obliterated all of them. (the svn server had been down last Friday so I hadn't been able to check them in, and I had forgot about them over the weekend)
Fortunately in this case I had done an "svn diff > temp.txt" before leaving work on Friday, and the temp.txt file was still on my hard drive, so I was able to feed that file into "patch" and recover my lost changes.
But for my future reference (i.e. the next time I make the same dumb mistake)... is there any way to tell svn to undo an "svn revert"? Does svn keep a backup of the local/not-checked-in diffs anywhere?