How to switch back to a previous version of a file without deleting its subsequent revisions


I have 4 versions of file A.txt in my subversion repository, say: A.txt.r1, A.txt.r2, A.txt.r3 and A.txt.r4. My working copy of the file is r4 and I want to switch back to r2. I don't want to use "svn update -r 2 A.txt" because this will delete all the revisions after r2, namely r3 and r4.

So is there any way that I update my working copy to r2 and still having the option to switch to r3 and r4 later? Put it another way, I want to still be able to see all 4 revisions by using "svn log A.txt" after doing the update.

Best Solution

To make a new revision of A.txt that is equal to revision 2:

svn up -r HEAD
svn merge -r HEAD:2 A.txt
svn commit

Also see the description in Undoing changes.