SVN create merged Branch

Source: Internet
Author: User

Code management is essential for development. The following describes how to create and merge SVN branches.

First, you need to create a branch on the trunk, assuming that the trunk is in the trunk:

Svn cp http://svn.alibaba-inc.com/repos/ali_cn/olps/exodus2/trunk/ http://svn.alibaba-inc.com/repos/ali_cn/olps/exodus2/ branches/071114_membermodifybug_wenyang_dev-M "Create a branch"

The role of this command is to create a branch named 071114_membermodifybug_wenyang_dev under the http://svn.alibaba-inc.com/repos/ali_cn/olps/exodus2/ branches, the branch content is from branch a branch ", if you do not enter "-M" Create a branch "after the command, a notepad will pop up for you to fill in the information. after entering the information, save and close the notepad, the command for creating the Branch will continue to be executed.

After creating the branch, let the command prompt path D disk, enter the command SVN Co http://svn.alibaba-inc.com/repos/ali_cn/olps/exodus2/ branches/071114_membermodifybug_wenyang_dev, then you can retrieve the branch named 071114_membermodifybug_wenyang_dev to the d disk.

After changing the code, go to the ddisk 071114_membermodifybug_wenyang_dev directory at the command prompt and enter the command SVN commit-M "update date", so that the Code will be submitted to the Branch on the svn server, add "update date" at the same time.

After the development is complete, you need to submit it to the trunk. First, use the svn Co command to extract the master or Development Branch to the local device. Enter the directory of the retrieved master or development branch at the command prompt, and enter the command: SVN log -- stop-on-copy-Q http://svn.alibaba-inc.com/repos/ali_cn/olps/exodus2/ branches/071114_membermodifybug_wenyang_dev. This command is used to check the history of the branches to be merged. The output is as follows:

------------------------------------------------------------------------

R16206 | Yang. weny | 16:31:27 + 0800 (Fri, 28 Sep 2007)

------------------------------------------------------------------------

R16205 | Yang. weny | 16:30:55 + 0800 (Fri, 28 Sep 2007)

------------------------------------------------------------------------

 

This output indicates that the created version is 16205. We need to merge the versions from this version. Then enter the command: SVN merge-r 16205: Head http://svn.alibaba-inc.com/repos/ali_cn/olps/exodus2/ branches/071114_membermodifybug_wenyang_dev. This command is used to copy the differences between the 071114_membermodifybug_wenyang_dev Branch and the retrieved trunk or Development Branch to the retrieved trunk or development branch path. Run the command: SVN St. The purpose of this command is to check for conflicts. The output of this command will be a changed file, and the output will be the file state before the file name. If the status is not C, there is no conflict. If there is no conflict, enter the svn commit command to complete the submission.

From: http://hi.baidu.com/chenwei6111/blog/item/8d4bdfecd4eca72363d09ffd.html

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.