Http://www.cnblogs.com/jndream/archive/2012/03/20/2407955.html
There are two scenarios for canceling changes to your code:
The first case: The change was not committed (commit). In this case, the previous modification can be canceled using SVN revert. SVN revert usage is as follows: # svn revert [-r] something where something can be a relative path (directory or file) or an absolute path. When something is a single file, the direct svn revert something is OK, and when something is a directory, it needs to add the parameter-R (Recursive, recursion), otherwise it will only change the directory of something. In this case, you can also use the SVN Update command to cancel the previous modification, but it is not recommended. Because SVN update is going to connect to the warehouse server, it's time consuming. Note: The SVN revert itself is inherently dangerous because it is intended to discard uncommitted modifications. Once you have chosen recovery, Subversion has no way to retrieve uncommitted modifications.
The second case: The change has been committed (commit). In this case, use the SVN merge command to roll back. rollback is done as follows: 1, make sure we get the latest code: SVN update assumes that the latest version number is 28. 2, and then find out the exact version number to roll back:       SVN log [something] assuming that the version number to rollback is 25 based on the SVN log log, the something here can be a file, a directory, or an entire project if you want to learn more about the situation , you can use SVN diff-r 28:25 [something] 3, rollback to version number 25:       SVN Merge- R 28:25 something for the sake of insurance, reconfirm the results of the rollback:        SVN Diff [something] found to be correct and committed. 4, commit rollback:      SVN commit-m "Revert revision from R28 to R25,because of ..." & nbsp; after the commit version became 29. summarizes the above operations as three: 1. SVN update,svn log to find the latest version (latest revision) 2. Find the version number you want to roll back (Rollbak revision) &Nbsp; 3. Roll back with svn merge: SVN merge-r: something
SVN code rollback command