I managed to shoot myself in the foot this morning by doing the following:
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?
Right click on the selected revision(s), then select Context Menu → Revert changes from this revision. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision.
Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will revert not only the contents of an item in your working copy, but also any property changes.
There is a solution... go to your recycle bin you'll find there the latest version of the deleted file. Tortoise "throwing" to the recycle bin every file that it revert.
No, (absolutely) NO.
If you say to Subversion it should revert a file, all changes are gone by the wind.
Only your memory can get them back.
Exception: New files you had added, will only lose their status "added", but the file will remain in this directory, only status is unknown("?")
Platform / Software exception: Using TortoiseSVN on Windows, Revert first throws the files into Recycle Bin and then reverts them. You can dig into the Recycle Bin to recover the files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With