Jesper Evertsson
Jesper Evertsson

Reputation: 613

How to revert to old revision and then get back to HEAD revision

I'm new to using TortoiseSVN (have used TortoiseHG before) and I'm having some problems going back and forth between different revisions.

So for example if I'm working on my project and I notice a bug. I then want to see if this bug was also there 1 week ago. I right click on my project map and choose TortoiseSVN->Show log. Then I find a reviosn from a week ago and right click and select Revert to this revision. So far all good. I then see that the bug was indeed still there, I just hadn't noticed it, so now I want to go back to the HEAD revision. This is where I start to get problems. First of all when I open the Show log the bold text indicates that I'm still in the HEAD revision. If I right click on the project map and choose SVN Update it just says that I already have the HEAD revision and nothing happens. I then try to open the log, right click on the last revision and select Revert to this revision. This doesn't work either. At this point I'm frustrated nothing works, deletes my folder and does a SVN Checkout from the HEAD revision and then i can continue working.

What am I doing wrong?

Upvotes: 2

Views: 1865

Answers (2)

Ben
Ben

Reputation: 8905

What you did: "revert to this revision", which tells SVN to undo all the changes since that revision, so that you can commit the changes to HEAD, making HEAD match that revision. This adds changes to your HEAD working copy so you can modify the repository.

What you wanted: "update to this revision", which tells SVN to make your working copy point to that revision, so that you can examine it, and then update back to the HEAD later. This moves your working copy to a different revision, so you can examine old repository states.

Upvotes: 3

Ivan Jovović
Ivan Jovović

Reputation: 5298

First of all when I open the Show log the bold text indicates that I'm still in the HEAD revision. If I right click on the project map and choose SVN Update it just says that I already have the HEAD revision and nothing happens.

True, because by clicking Revert to this revision, you did reverse merge from HEAD to older revision. Your working copy is still pointing to HEAD, but has some local modifications.

If you want to go back to HEAD, just click:

TortoiseSVN > Revert....

Go through this SO thread to get much more details about this.

Upvotes: 2

Related Questions