Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn revert from changeset

Tags:

svn

Is there a way to revert from a particular changeset?

The changes has been committed, as I see from the changeset. Now, I want to revert back the files from before they were committed.

I did svn revert path/to/file but it's not asking for a password or anything. Nothing is happening.

like image 743
Woppi Avatar asked Oct 27 '10 09:10

Woppi


2 Answers

You can do a "reverse merge" i.e. "apply" all the changes FROM your current revision TO the revision you want to go back to (i.e. undo all the changes FROM the revision you want to go back to TO the current revision).

svn merge -r HEAD:nnnn .

where nnnn is the revision you want to go back to. http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.merge.html

After reviewing the changes, resolving any conflicts etc., use svn commit to push the changes to the repository.

like image 78
Adrian Smith Avatar answered Sep 20 '22 14:09

Adrian Smith


Solved: svn merge -r1234:4321 path/to/yourfile path/to/thefileyouwanttogobackto,

where
1234 is your revision
4321 is the revision you want to go back to.

like image 26
Woppi Avatar answered Sep 18 '22 14:09

Woppi