Http://blog.sina.com.cn/s/blog_5432f2730100vmz4.html
Canceling changes to the code can be divided into two situations: First: The changes were not submitted (commit). In this case, the svn revert can be used to cancel the previous modification. The Svn revert usage is as follows: # Svn revert [-r] Something where something can be (either a directory or a file) a relative path or an absolute path. When something is a single file, it is svn revert something directly, and when something is directory, you need to add Parameters-R (recursive, recursion), Otherwise, only changes to this directory will be 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 will be able to connect to the warehouse server, time consuming. Note: The svn revert itself is inherently dangerous because its purpose is to discard uncommitted modifications. Once you have chosen to recover, subversion has no way to retrieve uncommitted changes. In the second case: The change has been submitted (commit). In this case, use the Svn merge command to rollback. The process of rollback is as follows: 1, ensure that we get the latest code: svn update Assume the latest version number is 28.    2, then find the exact version number to roll back: svn log [something] Suppose the version number to be rolled back according to the Svn log log is 25, where the something can be a file, a directory, or an entire project If you want to know more about the situation, you can use Svn diff-r 28:25 [something] 3, roll back to version number: &NBsp; svn merge-r 28:25 Something for insurance purposes, Confirm the rollback result again: Svn diff [Something] Found correct, submitted. 4, commit rollback: svn commit-m "revert revision from R28 to R25, Because of ... " submitted version became 29. summarize the above actions as follows: 1. svn update, Svn log, find the latest version (latest revision) 2. Find the version number (Rollbak revision) 3 that you want to roll back. Rolling back and forth with Svn merge: svn merge-r: something
http://lee2013.iteye.com/blog/1074457
SVN view historical information you can use the SVN command to remove past versions, or specific modifications made by a version, based on time or revision numbers. The following four commands can be used to view SVN history:
SVN log is used to show SVN version author, date, path, and so on
SVN diff is used to display row-level details for a specific modification
SVN cat gets a specific version of a file to appear on the current screen
SVN list displays a directory or a file that exists in a version
(a) SVN log can display all the information, and if you only want to see information between certain two versions, you can use:
SVN log-r R1:R2
If you only want to view version modification information for a file, you can use the
SVN log A
If you want to get information for the directory to add-V
If you want to display directory information that qualifies for N records, use the
SVN log--limit N-v
(ii) SVN diff to check the details of historical changes
。 Check local modifications
。 Compare working copies with version libraries
。 Compare version and version libraries
(1) If you use SVN diff with no parameters, it will compare your working file with the "original" copy cached in. svn
SVN diff
Index:rules.txt
===================================================================
---rules.txt (revision 3)
+++ Rules.txt (Working copy)
@@ -1,4 +1,5 @@
Be Kind to others
Freedom = Responsibility
Everything in moderation
-chew with your mouth open
(2) Compare working copy and version Library
SVN diff-r 3 rule.txt is to compare your working copy and version number 3 in the repository Rule.txt
(3) Compare version Library with version library
Passing two version numbers separated by colons via-R (revision), these two versions are compared
SVN diff-r 2:3 rule.txt is used to compare changes to this file for version number 2 and 3 in the SVN working version
(iii) SVN cat
If you just want to check a past version and don't want to see their differences, use SVN cat
SVN cat-r version number Rule,txt
This command will display the contents of the file under that version number
(iv) Svn list
Svn list can view files in a directory without downloading files to a local directory:
$ svn list http://svn.collab.net/ REPOS/SVN
README
branches/
clients/
tags/
Basic use
trunk/
If you want to see more information, you can use--verbose (-V ) Parameter:
$ svn list-v http://svn.collab.net/repos/svn
20620 Harry 1084 June 2006 README
23339 Harry Feb branches/
21282 Sally Aug 09:41 developer-resources/
23198 Harry 01:40 17:17 tags/
23351 Sall Y Feb 13:26 trunk/
These columns tell you the last revised version of the file and directory, the user who made the changes, the
size of the file, and the last name of the modification date and item.