Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Back to revision in Subversion

suppose you update your code to revision 10 which is broken. You want to go back to revision 9, work on the code and wait until someone will fix the build:

svn merge -rHEAD:9 . 

But it won't work, why?

like image 244
Etam Avatar asked Jul 08 '09 08:07

Etam


People also ask

What does update to revision do in svn?

svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up-to-date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision option.

What does revert in svn do?

Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will not only revert the contents of an item in your working copy, but also any property changes.


1 Answers

If you simply want to go back to an other revision, update is what you are looking for:

svn update -r 9 

You can work on the code but you can't commit changes. Well, if revision 10 didn't change the same file you changed, you could commit but it's better if you wait for revision 10 to be fixed.

Instead, if you want to go ahead and work on the code, you might consider to create a branch from revision 9, go ahead in the branch and reintegrate the branch into trunk when revision 10 is fixed.

like image 127
Simone Carletti Avatar answered Sep 20 '22 16:09

Simone Carletti