Ack! I just mistakenly ran "svn revert somefile" with the wrong filename pasted in. Now my nicely modified file is gone!
I'd like a "svn unrevert" command. AFIK there's no such thing. What is the next best way out of this mess?
Ack! I just mistakenly ran "svn revert somefile" with the wrong filename pasted in. Now my nicely modified file is gone!
I'd like a "svn unrevert" command. AFIK there's no such thing. What is the next best way out of this mess?
An undelete utility.
I like File Scavenger.
It's hit and miss, but you have a chance of getting your file back. The less disk activity since the delete, the greater your chance.
If you use Eclipse or IDEA they store local history, and you can use it to restore your changes. I don't think there is any other way.
There's no way to un-do a revert. You can revert because Subversion keeps a copy of the original file inside the .svn folder, and when you run the revert
command the backup copy is copied over the file in your working copy. Subversion doesn't back up your modified file before it performs the revert, so unless you made a copy of it somewhere you are probably out of luck.
It might have preserved the file as it was before the revert under another name, ${FILENAME}.orig or ${FILENAME}~ or some such. If it didn't, sorry, you're out of luck.