I'm relatively new to Subversion, coming from Source Safe, and it's driving me nuts. Using the Tortoise interface, Commit kept showing me .java files in my bin directory which it said were "missing" - ok, that's a separate question. Basically, when I tried several things to get rid of the spurious "bin" message, Tortoise instead deleted my entire source directory. I tried re-adding things, but when I added, it came in as new, with no history.
How do I take Subversion back to a particular revision? As if I had never happened? I know how to do this in VSS, but every time I try in TortoiseSVN, it just modifies my working copy. I don't want to then check in my working copy, because that would lose me all my history. Can Subversion forget?
Tried looking in stackoverflow already, btw, but the closest thing I found was exporting and reimporting the entire repository, and I don't think I'm at that point yet. Subversion must be able to do this most simple thing!
Subversion won't forget, but you can do something like the following:
Let's say your current revision is 100, and you want to go back to revision 70. You'll be creating a revision 101, which is exactly the same as 70.
1) Check out a nice clean working copy.
2) Merge (backwards) changes.
svn merge -r100:70 http://repo.com/my/project/trunk
3) Check sanity. Is your working copy exactly what you wanted? If so:
svn commit -m "rolled back to the good old days of r70
"
Since you specifically asked about TortoiseSVN you can do the following:
Then just commit your changes to the repository with an appropriate message.
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