Reputation: 93
I am in big trouble.
I committed from my local & took svn update on my server. That caused several files added or updated. It includes commit from other users too.
However I want to revert update & go back to previous state. please help
Thanks in advance
Upvotes: 0
Views: 155
Reputation: 2178
I believe what you are trying to do is actually undo your changes in the repository. Simply performing svn update -r myrevision
will update your working copy to the revision before you made the bad commit, but it will not get rid of the mistaken changes from the repository. Here is how to remove them (in Tortoise):
This is performing a reverse merge. So SVN looks at the changes made in that revision and attempts to undo them in current the current revision. This is the same process as trying to do a regular merge only backwards, so there is the possibility that you will have merge conflicts which you will need resolve. Your mistaken commit will still be in the repository, but the most recent version of your code should have all of the changes made during the bad commit removed.
Upvotes: 1
Reputation: 127
For GUI-client (Tortoise SVN for windows):
Step 1. Go to your working directory. Right click -> TortoiseSVN -> Show Log
Step 2: Note down the revision number to which you want to revert
Step 3: Open your server and type the command svn up -r revision-number
Upvotes: 0
Reputation: 1993
If you know last stable revision number, you can simply update to this revision:
svn up -r[NUMBER]
Upvotes: 1