SVN fallback/update/Cancel to a version command in detail "Go"

Source: Internet
Author: User
Tags svn update

Transferred from: http://www.cnblogs.com/mfryf/p/4654110.html

1. Cancellation of Add/delete

Cancel file svn revert file name de directory svn revert--depth=infinity directory name 2. Fallback version Method 1: Use SVN merge1 first SVN up to ensure updates to the latest version, such as 20;2) and then use SVN log to view historical changes to find the version to restore, such as 10. If you want to know more about the situation, you can use SVN diff-r 10:20 [file or directory];3) to roll back to the version number 10:SVN merge-r 20:10 [file or directory], note the order between the version number, this is called reverse merge; 4) view the files in the current working version, such as Test.cpp and version 10 of the difference between the file: SVN diff-r test.cpp, the difference is manually changed; 5) If there is no difference, then submit: SVN ci-m "back to R 10,xxxxx" [file or directory]. A new version, such as 21, will be generated in the SVN library. Method 2: Use SVN up 2 steps such as Method 1, then direct SVN up-r 10. The current working version is version 10. Note, however, that no new version will be generated in the SVN repository, and will return to the current version after the next svn up. ======================== changes have been submitted (commit). Use the SVN merge command to roll back. The procedure for rolling back is as follows: 1. Make sure we get the latest code: SVN update assumes the latest version number is 28. 2. Then find out the exact version number to roll back: SVN log assumes that the version number to rollback is 25 based on the SVN log log, where something can be a file, directory, or entire project if you want to know more about the situation, you can use SVN diff-r 28:25 "" 3, Rollback to version number 25:SVN merge-r 28:25 "" For the sake of insurance, reconfirm the results of the rollback: SVN diff "" found correctly, submitted. 4, submit rollback: SVN commit-m "Revert revision from R28 to R25,because of ..." After the commit version becomes 29. Summarize the above actions as follows: 1. Three. SVN update,svn log to find the latest version (latest revision) 2. Find the version number you want to roll back (Rollbak revision) 3. Roll back with svn merge: SVN merge-r: Something update to a version of SVN update-r version numberSVN help updateupdate: Merge revisions of the repository into your working copy. Usage: Update [PATH ...] If no version is specified, the working copy is updated to the HEAD version. Otherwise, synchronize to the version specified by the-r option. Outputs one line of information per update, using the first character to report the actions performed. The meaning of these characters is: A has been added d deleted u updated C merge conflict g Merge success E already exists R replaced first column character report item itself. The second column represents the report item properties. The character "B" in the third column indicates that the lock on this file is terminated or stolen. The character "C" in the fourth column represents a tree conflict, and "C" appears in the first column or the second column, respectively, to indicate a content conflict or attribute conflict. If the "--force" option is used, the path of the barrier that is not versioned in the working copy does not automatically cause a checkout failure. If the barrier path is the same as the corresponding path type (file or directory) in the repository, it becomes a versioned path, but the content does not change. It means that the descendants of the barrier path, or the path of the barrier, are also subject to version control. Files in the barrier path, if different from the repository, are treated as local modifications to the working copy. All properties in the repository are applied to the barrier path. Use the first column of the character "E" to report the barrier path. If there is no update target specified in the working copy, but has its parent directory, the target is checked out to its parent directory on the specified path. If option--parents is used, all non-existent parent directories of the target are created (using option--depth=empty). Use the--set-depth option to set the new depth of the working copy of this action target. Valid options:-R [--revision] Arg:arg (some commands also accept ARG1:ARG2 range) The version parameter can be one of the following: number version ' {' Date '} ' works in the latest version ' base ' in the Version ' HEAD ' repository after the specified time Baseline version of the copy ' COMMITTED ' last commit or Baseline ' PREV ' COMMITTED previous version-n [--non-recursive]: obsolete; try--depth=files or--depth= Immediates--depth ARG: The limit operation depth is arg (' empty ', ' files ', ' immediates ', or ' infinity ')--set-depth arg: Sets the new depth of the working copy to Arg (' Exclud E ', ' empty ', ' files ', ' immediates ', or ' inf 'Inity ')-Q [--quiet]: Do not print information, or print only profile--diff3-cmd arg: use arg as merge command--force: Force operation run--ignore-externals: Ignore external project--changelist [--CL] ARG: can only manipulate members of the modified list arg--editor-cmd ARG: Use ARG as an external editor--accept ARG: Specifies automatic resolution of conflict actions (' postpone ', ' working ', ' base ', ' Mine-con Flict ', ' theirs-conflict ', ' mine-full ', ' theirs-full ', ' edit ', ' launch ') (shorthand: ' P ', ' MC ', ' TC ', ' MF ', ' TF ', ' e ', ' l ') --parents: Create intermediate Directory Global options:--username arg: Specify user name Arg--password arg: Specify password Arg--no-auth-cache: Do not cache user authentication token--non-interactive: Do not prompt--trust-server-cert: Do not prompt for an SSL server certificate issued by an unknown certification authority (only for option "--non-interactive")--config-dir arg: Read user profile from directory ARG-- Config-option ARG: Set User Configuration options in subordinate format: File:section:option=[value] For example: Servers:global:http-library=serf

SVN fallback/update/Cancel to a version command in detail "Go"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.