svn version rollback (rpm)

Original Address: svn version rollback (turn) Author: jaychang

svn version rollback

Cancel the changes to the code is divided into two situations:
 
The first case: the changes have not been submitted to (commit).
In this case, using the modified before svn revert can be canceled.
svn revert used as follows:
# svn revert [-R] something
Where something can be (directory or file) relative path or an absolute path.
When something as a single file, directly svn revert something on the line; when something is a directory, you need to add parameters -R (Recursive, recursive), otherwise it will only change something this directory.
In this case you can use svn update command to cancel changes to the previous, but not recommended. Because svn update will go to the warehouse server connection time-consuming.
Note: svn revert itself has inherent dangers, because its purpose is to discard the changes uncommitted. Once you've reverted, Subversion is no way to recover uncommitted changes.
 
The second case: the changes have been submitted to (commit).
In this case, the svn merge command rollback. 
   Rollback operation is as follows: 
   1, to ensure that we got the latest code: 
     svn update 
     Assume that the latest version number is 28. 
   2, and then find out the exact version number to be rolled back: 
     svn log [something]
     Assumptions based svn log log detected want to roll back the version number is 25, something here may be files, directories, or entire project
     If you want a more detailed understanding of the situation, you can use svn diff -r 28:25 [something]
   3, roll back to version 25:
       svn merge -r 28:25 something
     To be safe, the results again confirm the rollback:
       svn diff [something]
     We found correct submission.
   4, submitted rollback:
     svn commit -m ”Revert revision from r28 to r25,because of …” 
     After submitting into a version 29.
   The above operation is summarized in the following three:
   1. svn update, svn log, find the latest version (latest revision)
   2. Locate the version you want to roll back (rollbak revision)
   3. Roll back with svn merge: svn merge -r: something
Published 117 original articles · won praise 4 · views 80000 +

Guess you like

Origin blog.csdn.net/qq_36266449/article/details/78194642