Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN - How to make an older revision the head revision?

Tags:

svn

One of the files in my current head revision got corrupted. I want to make an older revision of that file the head revision as usually people sync to head revsion in my project. How to do that?

like image 643
Manoj Avatar asked Nov 07 '08 06:11

Manoj


People also ask

How do I revert in TortoiseSVN?

If you want to undo all changes you made in a file since the last update you need to select the file, right click to pop up the context menu and then select the command TortoiseSVN → Revert A dialog will pop up showing you the files that you've changed and can revert. Select those you want to revert and click on OK.

How do I undo a merge in svn?

You can use svn merge to “undo” the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference. (You can do this by specifying --revision 392:391 , or by an equivalent --change -392 .)

How do I checkout a specific revision in svn?

Click the revision button at top-right and change it to the revision you want. Then right-click your file in the browser and use 'Copy to working copy...' but change the filename it will check out, to avoid a clash.

What is Update to revision in Tortoise SVN?

If you want more control over the update process, you should use TortoiseSVN → Update to Revision... instead. This allows you to update your working copy to a specific revision, not only to the most recent one.


1 Answers

You should revert all changes since that old reversion. In principle,

svn merge -rHEAD:oldrev filename svn commit -m "rolled back to oldrev" 

should do. The later revisions are still there, but reverted.

like image 107
Martin v. Löwis Avatar answered Oct 06 '22 01:10

Martin v. Löwis